GeoPandas: implement GeoDataFrame.to_feather
- Dominant language
- Java
- Stars
- 2.4k
- Forks
- 784
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 58
Description
Part of #2230.
Implement `GeoDataFrame.to_feather`, which currently raises `NotImplementedError`.
Keep the geopandas signature (`path`, `index`, `compression`, `schema_version`, `**kwargs`), which the existing stub already matches, and pass extra keywords through to `pyarrow.feather.write_feather`.
Feather is a single file format and Spark has no writer for it, so the proposed approach is to collect the frame to the driver and let GeoPandas write it. `GeoDataFrame.to_arrow` also delegates to `to_geopandas()`, for a different reason: it returns an in-memory GeoPandas object that has no Sedona equivalent. I have a working implementation and tests locally, and I would appreciate feedback on whether driver side collection is acceptable for a file writer before I open the PR.
Document the driver collection cost and the index behavior. Because Sedona converts `RangeIndex` into a general `Index`, `index=None` writes the index, and reading the file back gives an `Index` where geopandas gives a `RangeIndex`. `to_arrow` documents a related caveat, but its wording about the index appearing as a column does not carry over to Feather, where pandas restores it as the index.
Tests should cover `index=False`, `index=True`, `index=None` and keyword pass-through, reading back with `geopandas.read_feather`. Sedona has no `read_feather` of its own, so the Sedona half of the round trip goes through `GeoDataFrame(geopandas.read_feather(path))`.
cc @petern48
Contributor guide
Research direction
Start at the GeoDataFrame.to_feather stub and compare its existing signature with GeoDataFrame.to_arrow; inspect how the GeoPandas writer handles path, index, compression, schema_version, and extra keywords. Add coverage for index=False, index=True, index=None, keyword pass-through, and round trips through geopandas.read_feather and GeoDataFrame, including the documented driver-collection cost and index behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 74/100