geopandas.GeoDataFrame.to_feather¶
- GeoDataFrame.to_feather(path, index=None, compression=None, **kwargs)¶
Write a GeoDataFrame to the Feather format.
Any geometry columns present are serialized to WKB format in the file.
Requires ‘pyarrow’ >= 0.17.
WARNING: this is an initial implementation of Feather file support and associated metadata. This is tracking version 0.1.0 of the metadata specification at: https://github.com/geopandas/geo-arrow-spec
This metadata specification does not yet make stability promises. As such, we do not yet recommend using this in a production setting unless you are able to rewrite your Feather files.
New in version 0.8.
- Parameters
- pathstr, path object
- indexbool, default None
If
True
, always include the dataframe’s index(es) as columns in the file output. IfFalse
, the index(es) will not be written to the file. IfNone
, the index(ex) will be included as columns in the file output except RangeIndex which is stored as metadata only.- compression{‘zstd’, ‘lz4’, ‘uncompressed’}, optional
Name of the compression to use. Use
"uncompressed"
for no compression. By default uses LZ4 if available, otherwise uncompressed.- kwargs
Additional keyword arguments passed to to
pyarrow.feather.write_feather()
.
See also
GeoDataFrame.to_parquet
write GeoDataFrame to parquet
GeoDataFrame.to_file
write GeoDataFrame to file
Examples
>>> gdf.to_feather('data.feather')