AlenkaF commented on code in PR #46884:
URL: https://github.com/apache/arrow/pull/46884#discussion_r3302641177
##########
python/pyarrow/pandas_compat.py:
##########
@@ -378,7 +378,10 @@ def _index_level_name(index, i, column_names):
if index.name is not None and index.name not in column_names:
return _column_name_to_strings(index.name)
else:
- return f'__index_level_{i:d}__'
+ j = i
+ while f'__index_level_{j:d}__' in column_names:
+ j += 1
+ return f'__index_level_{j:d}__'
Review Comment:
Isn't schema based conversion already buggy without this change when it
comes to the index levels? It probably silently ignores the duplicated level
`0` currently?
--
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]