Skip to content

Commit a1b28c8

Browse files
lithomas1meeseeksmachine
authored andcommitted
Backport PR pandas-dev#41443: Revert "Pin fastparquet to leq 0.5.0"
1 parent 7bc9992 commit a1b28c8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

pandas/io/parquet.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,14 @@ def read(
300300
if is_fsspec_url(path):
301301
fsspec = import_optional_dependency("fsspec")
302302

303-
parquet_kwargs["open_with"] = lambda path, _: fsspec.open(
304-
path, "rb", **(storage_options or {})
305-
).open()
303+
if Version(self.api.__version__) > Version("0.6.1"):
304+
parquet_kwargs["fs"] = fsspec.open(
305+
path, "rb", **(storage_options or {})
306+
).fs
307+
else:
308+
parquet_kwargs["open_with"] = lambda path, _: fsspec.open(
309+
path, "rb", **(storage_options or {})
310+
).open()
306311
elif isinstance(path, str) and not os.path.isdir(path):
307312
# use get_handle only when we are very certain that it is not a directory
308313
# fsspec resources can also point to directories

0 commit comments

Comments
 (0)