From 9c3fdf96a7c2d609e9dc0b4b42cf42cc703ef3b8 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Wed, 18 Oct 2023 09:49:49 +0200 Subject: [PATCH] GH-35081: [Python] Remove usage of pandas internals DatetimeTZBlock --- python/pyarrow/pandas_compat.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/pyarrow/pandas_compat.py b/python/pyarrow/pandas_compat.py index e232603ba45ac..22caa9865212f 100644 --- a/python/pyarrow/pandas_compat.py +++ b/python/pyarrow/pandas_compat.py @@ -718,9 +718,9 @@ def _reconstruct_block(item, columns=None, extension_columns=None): elif 'timezone' in item: unit, _ = np.datetime_data(block_arr.dtype) dtype = make_datetimetz(unit, item['timezone']) - block = _int.make_block(block_arr, placement=placement, - klass=_int.DatetimeTZBlock, - dtype=dtype) + block = _int.make_block( + np.atleast_2d(block_arr), placement=placement, dtype=dtype + ) elif 'object' in item: block = _int.make_block(pickle.loads(block_arr), placement=placement)