Skip to content

Commit cf5288c

Browse files
committed
add pyarrow autogenerated prefix
1 parent 79067a7 commit cf5288c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/io/parsers/arrow_parser_wrapper.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ def _get_pyarrow_options(self) -> None:
100100
)
101101
}
102102
self.convert_options["strings_can_be_null"] = "" in self.kwds["null_values"]
103+
# autogenerated column names are prefixed with 'f' in pyarrow.csv
104+
if self.header is None and "include_columns" in self.convert_options:
105+
self.convert_options["include_columns"] = [
106+
f"f{n}" for n in self.convert_options["include_columns"]
107+
]
108+
103109
self.read_options = {
104110
"autogenerate_column_names": self.header is None,
105111
"skip_rows": self.header

0 commit comments

Comments
 (0)