Best practice for saving a value that applies to whole dataframe? A column with the same value repeating — a separate file — something else?
Sorry to be more specific saving as geoJSON from within geopandas but willing to change to other compatible filetype. But has to be GEOpd.
-
-
why not save normally with to_csv(…, compression=‘gzip’)? standard compression algs should be able to handle this just fine
-
if you want to be more systematic about it, used composition and create your own class that stores the DF internally along w/ metadata
-
csv allows metadata?
-
I want to ideally save as a text file be it csv or json, both of which I am aware geopandas allows me to. Metadata is important but like
-
others have mentioned it's not really supported for my case even though there is some mention of metadata in pandas it seems sketchy.
-
what’s the downside to adding extra columns to the DF? you can make it a categorical to save memory, and compress txt to save disk space
-
Nice ideas. Super thanks.

- 1 more reply
New conversation -
-
-
Not sure if useful, but I did some CSV->GeoJSON where I looked through CSV, made some geopy calls, then wrote to JSON with geojson module
-
i.e., maybe not necessary to go through (Geo)Pandas, depending on what you're doing
-
It is, I'm doing very very big data and using tons of pandas and geopd stuff. Regardless how did you save metadata?
-
The bulk of the code is written in geopd for the data. Rewriting it not to use geopd would be pointless.
-
Gotcha :). I was just making a GeoJSON for use with Google Maps API, based on my own arbitrary CSV (not sure what metadata you mean?)
-
OK, so this is what my question was about how to save metadata — more here:https://twitter.com/geospacedman/status/848952209207422977 …
-
Ah, ok, I understand Q now. Seems like there isn't a dedicated metadata object http://gis.stackexchange.com/questions/96158/metadata-and-geojson … https://pypi.python.org/pypi/geojson
-
yes, I can save to a number of file type with geopandas none of which are officially seeming to support much of anything for metadata.
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.