Skip to content

xarray.Dataset.from_dataframe link to pandas.DataFrame.to_xarray #3895

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

Closed
raybellwaves opened this issue Mar 26, 2020 · 3 comments · Fixed by #3994
Closed

xarray.Dataset.from_dataframe link to pandas.DataFrame.to_xarray #3895

raybellwaves opened this issue Mar 26, 2020 · 3 comments · Fixed by #3994

Comments

@raybellwaves
Copy link
Contributor

Is it worth referencing https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_xarray.html in http://xarray.pydata.org/en/stable/generated/xarray.Dataset.from_dataframe.html?

is the pandas method preferred?

@max-sixty
Copy link
Collaborator

Yes, for sure worth a reference in See Also, if you'd be up for a PR.

The functionality is basically the same: https://github.com/pandas-dev/pandas/blob/v1.0.3/pandas/core/generic.py#L2787-L2868

@raybellwaves
Copy link
Contributor Author

Sure. Can update the docs. but won't be able to for a week or so.

Curious is there is much/any difference? is worth deprecating and pointing maintenance/development to the pandas version instead?

@max-sixty
Copy link
Collaborator

No strong view on whether it's worth having both. I'm personally more partial to the duplication given they're on different objects. e.g. Series.todict() or dict(Series)

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