how to get a pandas dataframe of ds.data_vars? #5309
-
I would like to turn
If I plug this into a pd.Dataframe I just get the variables
I have some workable pandas code but didn't know if the
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I don't think we have anything like that, yet. For reference, it's much easier to compute all at once: In [10]: ds = xr.tutorial.open_dataset("eraint_uvz")
...: pd.DataFrame(
...: [[name, var.dims] for name, var in ds.data_vars.items()],
...: columns=["Data Variable", "Dimensions"],
...: )
Out[10]:
Data Variable Dimensions
0 z (month, level, latitude, longitude)
1 u (month, level, latitude, longitude)
2 v (month, level, latitude, longitude) |
Beta Was this translation helpful? Give feedback.
I don't think we have anything like that, yet. For reference, it's much easier to compute all at once: