Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoestq committed Aug 21, 2020
1 parent e6422f2 commit 52ace77
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/nlp/arrow_dataset.py
Expand Up @@ -706,7 +706,9 @@ def _getitem(
# but there is a bug in pyarrow that makes ignores the types_mapper in that case
# see https://issues.apache.org/jira/browse/ARROW-9664
# We build a table with one column and call to_pandas on it instead
one_column_table = pa.Table.from_arrays([self._data[key]], schema=pa.schema([self._data.schema.field(key)]))
one_column_table = pa.Table.from_arrays(
[self._data[key]], schema=pa.schema([self._data.schema.field(key)])
)
if format_columns is None or key in format_columns:
if format_type == "pandas":
outputs = one_column_table.to_pandas(types_mapper=pandas_types_mapper)[key]
Expand Down

0 comments on commit 52ace77

Please sign in to comment.