Skip to content

Commit 494590d

Browse files
authored
Add test for pyarrow date32 repr (#52815)
1 parent 961f9c4 commit 494590d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pandas/tests/extension/test_arrow.py

+7
Original file line numberDiff line numberDiff line change
@@ -2567,3 +2567,10 @@ def test_quantile_temporal(pa_type):
25672567
result = ser.quantile(0.1)
25682568
expected = ser[0]
25692569
assert result == expected
2570+
2571+
2572+
def test_date32_repr():
2573+
# GH48238
2574+
arrow_dt = pa.array([date.fromisoformat("2020-01-01")], type=pa.date32())
2575+
ser = pd.Series(arrow_dt, dtype=ArrowDtype(arrow_dt.type))
2576+
assert repr(ser) == "0 2020-01-01\ndtype: date32[day][pyarrow]"

0 commit comments

Comments
 (0)