-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
Panel is removed from pandas (as a result of the success of xarray! 😁 ), but we're still attempting to call it from .to_pandas()
MCVE Code Sample
# Your code here
In [4]: import numpy as np
In [1]: import xarray as xr
In [5]: xr.DataArray(np.random.rand(2,3,4)).to_pandas()
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-5-7d1b667d5cac> in <module>
----> 1 xr.DataArray(np.random.rand(2,3,4)).to_pandas()
~/workspace/corpfin/.venv/lib64/python3.6/site-packages/xarray/core/dataarray.py in to_pandas(self)
2267 )
2268 indexes = [self.get_index(dim) for dim in self.dims]
-> 2269 return constructor(self.values, *indexes)
2270
2271 def to_dataframe(self, name: Hashable = None) -> pd.DataFrame:
TypeError: object() takes no parameters
Expected Output
Either a MultiIndexed DataFrame or a proper error (4D gives ValueError: cannot convert arrays with 4 dimensions into pandas objects)