Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use aggregated.to_dataset().to_dataframe() within aggregated.to_dataframe() #20

Closed
raybellwaves opened this issue Sep 19, 2021 · 1 comment · Fixed by #26
Closed

use aggregated.to_dataset().to_dataframe() within aggregated.to_dataframe() #20

raybellwaves opened this issue Sep 19, 2021 · 1 comment · Fixed by #26

Comments

@raybellwaves
Copy link
Contributor

When dealing with time data aggregated.to_dataframe() will return columns as data_var0, data_var1.

xarray has a method to convert to a dataframe http://xarray.pydata.org/en/stable/generated/xarray.DataArray.to_dataframe.html which moves coords to an multiindex.

You would just have to add in the geometry and crs from the incoming geopandas to make it a geopandas dataframe.

@ks905383
Copy link
Owner

Oh this is excellent. Will implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants