You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/01/06 17:33:47 UTC

[GitHub] [arrow] jbrockmendel commented on a change in pull request #8957: ARROW-10768: [Python] pass ndim to pandas make_block

jbrockmendel commented on a change in pull request #8957:
URL: https://github.com/apache/arrow/pull/8957#discussion_r552840598



##########
File path: python/pyarrow/pandas_compat.py
##########
@@ -730,15 +733,18 @@ def _reconstruct_block(item, columns=None, extension_columns=None):
             block_arr, categories=item['dictionary'],
             ordered=item['ordered'])
         block = _int.make_block(cat, placement=placement,
-                                klass=_int.CategoricalBlock)
+                                klass=_int.CategoricalBlock, ndim=ndim)
     elif 'timezone' in item:
         dtype = make_datetimetz(item['timezone'])
+        cls = dtype.construct_array_type()
+        block_arr = cls._simple_new(block_arr, dtype=dtype)

Review comment:
       IIRC the motivation here was to stop passing `dtype` to make_block, since that kwarg isnt used within pandas and AFAICT this usage is the blocker to deprecating/removing it.  could be considered separate from the matter at hand, but while im in the neighborhood




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org