-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[Python] Table.rename_columns should accept tuple #43588
Copy link
Copy link
Closed
Description
Describe the bug, including details regarding any error messages, version, and platform.
I've been using pyarrow.Table.rename_columns with tuple of str. This means I can store the column names in global variables, and not worry about someone mutating the list of names.
But since pyarrow 17.0.0 it stopped working:
import pyarrow as pa
pa.table(
{
"col1": [1, 2, 3],
"col2": [1, 2, 3],
}
).rename_columns(("col_1", "col_2"))
Raises:
TypeError: names must be a list or dict not <class 'tuple'>
I think this (welcomed) change introduced it https://github.com/apache/arrow/pull/40645/files
I'm happy to send a fix for it.
Component(s)
Python
Reactions are currently unavailable
Metadata
Metadata
Assignees
Type
Fields
Give feedbackNo fields configured for issues without a type.