Replies: 3 comments
-
I don't think it is possible at the moment. Would be worthwhile to add, I think. I prefer doing my data wrangling in xarray while preserving other metadata as well, but I guess some libraries and the like work only with dataframes, so compatibility (limited, of course, given that some metadata carried by xarray will always be lost in conversion) would be nice. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply, sounds good! (In most cases it might also be possible with using Xarray, one just need to find the right function.) |
Beta Was this translation helpful? Give feedback.
-
+1 from me for a way to keep units if the user wants. But I wouldn't use pint-pandas straight out of the box, it's pretty unstable and forces the entire column to have the same unit which might not be what we want |
Beta Was this translation helpful? Give feedback.
-
Is there a way to keep units when converting to a DataFrame?
E.g. for
With
pint-pandas
maybe?When there is only a single column of emissions this could also be a separate column.
When converting to a DataFrame for some data wrangling i can also store them from the attribute 'units' and
quantify
later again but i was wondering whether there is a simpler way.Beta Was this translation helpful? Give feedback.
All reactions