小编Y. *_*eng的帖子

这是什么意思?xarray 错误:无法处理非唯一的多索引

我正在尝试将数据帧转换为 xarray。头部是这样的:

z   Class    DA       x          y          iline      xline      idz                                                      
2     651   289  1455.0        2.0        0.62239  2345322.0  76720.0
            290  1460.0        0.0        0.46037  2345322.0  76720.0
            291  1465.0        4.0        0.41280  2345322.0  76720.0
            292  1470.0        0.0        0.39540  2345322.0  76720.0
            293  1475.0        2.0        0.61809  2345322.0  76720.0
Run Code Online (Sandbox Code Playgroud)

当我使用xr.DataSet.from_dataframe, or 时df.to_xarray,我收到以下错误消息:

cannot handle a non-unique multi-index!

有人知道这里发生了什么吗?

python pandas python-xarray

5
推荐指数
2
解决办法
2万
查看次数

标签 统计

pandas ×1

python ×1

python-xarray ×1