Skip to content

Commit 74683ab

Browse files
Merge remote-tracking branch 'upstream/main' into fix/to-datetime-with-origin
* upstream/main: CI: test with last few released versions for numpy and pyarrow (pandas-dev#64165)
2 parents 3ed9978 + 20bd243 commit 74683ab

4 files changed

Lines changed: 3914 additions & 1670 deletions

File tree

pandas/tests/extension/test_arrow.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3991,3 +3991,11 @@ def test_timestamp_reduction_consistency(unit, method):
39913991
f"{method} for {unit} returned {type(result)}"
39923992
)
39933993
assert result.unit == unit
3994+
3995+
3996+
def test_fillna_zero():
3997+
# https://github.com/pandas-dev/pandas/issues/62878 - specific pyarrow bug
3998+
ser = pd.Series([1, 2, 3, 4, pd.NA, 6], dtype="int64[pyarrow]")
3999+
result = ser.fillna(0)
4000+
expected = pd.Series([1, 2, 3, 4, 0, 6], dtype="int64[pyarrow]")
4001+
tm.assert_series_equal(result, expected)

pandas/tests/frame/methods/test_drop_duplicates.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,3 +514,14 @@ def test_drop_duplicates_set():
514514
result = df.drop_duplicates({"AAA", "B"}, keep=False)
515515
expected = df.loc[[0]]
516516
tm.assert_frame_equal(result, expected)
517+
518+
519+
def test_drop_duplicates_with_empty_missing():
520+
# https://github.com/pandas-dev/pandas/issues/62611 - specific bug with pyarrow
521+
df = DataFrame(data={"A": ["a", "b", "", "a", None, "b"]})
522+
df["B"] = "b"
523+
result = df.drop_duplicates()
524+
expected = DataFrame(
525+
data={"A": ["a", "b", "", None], "B": ["b", "b", "b", "b"]}, index=[0, 1, 2, 4]
526+
)
527+
tm.assert_frame_equal(result, expected)

0 commit comments

Comments
 (0)