Earlier quoted context omitted.
Sorry, this is not true _at all_ for geospatial data. A quick benchmark [0] shows that saving to GeoPackage, FlatGeobuf, and GeoParquet are roughly 10x faster than saving to CSV. Additionally, the CSV is much larger than any other format. [0]: https://gist.github.com/kylebarron/f632bbf95dbb81c571e4e64cd...
And here's my quick benchmark, dataset from my full-time job: > import geopandas as gpd > import pandas as pd > from shapely.geometry import Point > d = pd.read_csv('data/tracks/2024_01_01.csv') > d.shape (3690166, 4) > list(d) ['user_id', 'timestamp', 'lat', 'lon'] > %%timeit -n 1 > d.to_csv('/tmp/test.csv') 14.9 s ± 1.18 s per loop (mean ± std. dev. of 7 runs, 1 loop each) > d2 = gpd.GeoDataFrame(d.drop(['lon', 'la…
You need to use pyogrio [1], its vectorized counterpart, instead. Make sure you use `engine="pyogrio"` when calling `to_file` [2]. Fiona does a loop in Python, while pyogrio is exclusively compiled. So pyogrio is usually about 10-15x faster than fiona. Soon, in pyogrio version 0.8, it will be another ~2-4x faster than pyogrio is now [3].
[0]: https://github.com/Toblerity/Fiona
[1]: https://github.com/geopandas/pyogrio
[2]: https://geopandas.org/en/stable/docs/reference/api/geopandas...