Skip to content

Commit 54acc25

Browse files
committed
handle columns=None
1 parent 9aae0b2 commit 54acc25

File tree

1 file changed

+8
-7
lines changed
  • src/nested_pandas/nestedframe

1 file changed

+8
-7
lines changed

src/nested_pandas/nestedframe/io.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,14 @@ def _read_parquet_into_table(
219219
# Specifically handles attempted partial loads of nested structures
220220
# in list-struct format
221221
# only need to check if a potential partial load is requested
222-
check_schema = False
223-
for col in columns:
224-
if "." in col: # may be unneccesary if column just has a "." in the name, but we can't know
225-
check_schema = True
226-
break
227-
if check_schema:
228-
_validate_structs_from_schema(data, columns=columns, filesystem=filesystem)
222+
if columns is not None:
223+
check_schema = False
224+
for col in columns:
225+
if "." in col: # may be unneccesary if column just has a "." in the name, but we can't know
226+
check_schema = True
227+
break
228+
if check_schema:
229+
_validate_structs_from_schema(data, columns=columns, filesystem=filesystem)
229230

230231
with fsspec.parquet.open_parquet_file(
231232
path_to_data.path,

0 commit comments

Comments
 (0)