Skip to content

Commit cd5ff8f

Browse files
alippaimroeschke
authored andcommitted
Backport PR pandas-dev#52332: Use date32 for pyarrow date
1 parent 055c4cd commit cd5ff8f

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
@@ -1999,7 +1999,7 @@ def _dt_second(self):
19991999

20002000
@property
20012001
def _dt_date(self):
2002-
return type(self)(self._data.cast(pa.date64()))
2002+
return type(self)(self._data.cast(pa.date32()))
20032003

20042004
@property
20052005
def _dt_time(self):

pandas/tests/extension/test_arrow.py

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

0 commit comments

Comments
 (0)