Skip to content

Commit 4d1c994

Browse files
authored
Use date32 for pyarrow date (#52332)
1 parent 6d89d8c commit 4d1c994

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pandas/core/arrays/arrow/array.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2015,7 +2015,7 @@ def _dt_second(self):
20152015

20162016
@property
20172017
def _dt_date(self):
2018-
return type(self)(self._pa_array.cast(pa.date64()))
2018+
return type(self)(self._pa_array.cast(pa.date32()))
20192019

20202020
@property
20212021
def _dt_time(self):

pandas/tests/extension/test_arrow.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2156,7 +2156,7 @@ def test_dt_properties(prop, expected):
21562156
result = getattr(ser.dt, prop)
21572157
exp_type = None
21582158
if isinstance(expected, date):
2159-
exp_type = pa.date64()
2159+
exp_type = pa.date32()
21602160
elif isinstance(expected, time):
21612161
exp_type = pa.time64("ns")
21622162
expected = pd.Series(ArrowExtensionArray(pa.array([expected, None], type=exp_type)))

0 commit comments

Comments
 (0)