Skip to content

Commit dfcfa22

Browse files
use more public API
1 parent 0fce0ef commit dfcfa22

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

python/pyarrow/pandas_compat.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,9 @@ def _reconstruct_block(item, columns=None, extension_columns=None):
718718
unit, _ = np.datetime_data(block_arr.dtype)
719719
dtype = make_datetimetz(unit, item['timezone'])
720720
if _pandas_api.is_ge_v21():
721-
pd_arr = _pandas_api.pd.arrays.DatetimeArray(block_arr, dtype=dtype)
721+
pd_arr = _pandas_api.pd.array(
722+
block_arr.view("int64"), dtype=dtype, copy=False
723+
)
722724
block = _int.make_block(pd_arr, placement=placement)
723725
else:
724726
block = _int.make_block(block_arr, placement=placement,

0 commit comments

Comments
 (0)