I feel @kopshtik might know. 
Best practice for saving a value that applies to whole dataframe? A column with the same value repeating — a separate file — something else?
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Relational databases?
-
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.
- 3 more replies
New conversation -
-
-
A whole new table that stores that value and has a foreign key relationship with the other table.
-
Thanks sounds very right — is that easy in pandas?
-
So create a new df with a single row and then in that row include all the keys from the original df? Does that actually save space over a
-
column in the original df with all items set to value?
-
I'm not sure I can do this in Geopandas but I get the concept.
End of conversation
New conversation -
-
-
"saving" how? to disk? what format are you saving the dataframe in? Is this just a metadata item?
-
Saving to disk as geojson. When you say this you mean the thing true for the whole df? No, it's a value that applies to all the df.
-
A parameter that the original df was created with — if that makes sense?
End of conversation
New conversation -
-
-
This Tweet is unavailable
-
Yes, but I want a standard because I want to share and ensure easily run on others machines etc.
-
If you're looking for an interchange format (rather than a quick personal-project hack), http://xarray.pydata.org/ may be worth looking into.
-
I gave it a test-drive recently, it's a bit of a pain transitioning from Pandas (things work differently) but for (N>2)-dim data? - winner!
-
Geopandas though. I need the plot etc functions.
-
Ah, OK. Not familiar with Geo. xarray has to/from dataframe funcs, but probably more hassle than worth for a single attribute.
-
I need the cool mapping stuff, eg http://geopandas.org/mapping.html
End of 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.