Skip to content

Commit 4ccf675

Browse files
committed
Remove pandas 1.2 compability
1 parent 2ffea47 commit 4ccf675

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

spatialpandas/io/parquet.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
to_parquet as dd_to_parquet,
1919
)
2020
from dask.utils import natural_sort_key
21-
from packaging.version import Version
2221
from pandas.io.parquet import to_parquet as pd_to_parquet
2322
from pyarrow.parquet import ParquetDataset, ParquetFile, read_metadata
2423

@@ -31,9 +30,6 @@
3130
validate_coerce_filesystem,
3231
)
3332

34-
# improve pandas compatibility, based on geopandas _compat.py
35-
PANDAS_GE_12 = Version(pd.__version__) >= Version("1.2.0")
36-
3733

3834
def _load_parquet_pandas_metadata(
3935
path,
@@ -91,15 +87,10 @@ def to_parquet(
9187
"compression": compression,
9288
"filesystem": filesystem,
9389
"index": index,
90+
"storage_options": storage_options,
9491
**kwargs,
9592
}
9693

97-
if PANDAS_GE_12:
98-
to_parquet_args.update({"storage_options": storage_options})
99-
elif filesystem is None:
100-
filesystem = validate_coerce_filesystem(path, filesystem, storage_options)
101-
to_parquet_args.update({"filesystem": filesystem})
102-
10394
pd_to_parquet(**to_parquet_args)
10495

10596

0 commit comments

Comments
 (0)