jorisvandenbossche commented on code in PR #44963:
URL: https://github.com/apache/arrow/pull/44963#discussion_r1879576970


##########
python/pyarrow/pandas_compat.py:
##########
@@ -181,19 +181,18 @@ def get_column_metadata(column, name, arrow_type, 
field_name):
             )
         )
 
-    assert field_name is None or isinstance(field_name, str), \
-        str(type(field_name))
+    assert isinstance(field_name, str), str(type(field_name))
     return {
         'name': name,
-        'field_name': 'None' if field_name is None else field_name,
+        'field_name': field_name,
         'pandas_type': logical_type,
         'numpy_type': string_dtype,
         'metadata': extra_metadata,
     }
 
 
-def construct_metadata(columns_to_convert, df, column_names, index_levels,
-                       index_descriptors, preserve_index, types):
+def construct_metadata(columns_to_convert, df, column_names, 
column_field_names,
+                       index_levels, index_descriptors, preserve_index, types):

Review Comment:
   This should indeed be internal yes (although it is accessible as 
`pyarrow.pandas_compat.construct_metadata` ... which doesn't necessarily look 
as private ..)
   
   The docstring is not the most informative, but pushed an update to at least 
keep it up to date.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to