django - ezhc heatmap.build 需要 pandas.core.index 但它是 Pandas.core.index 已弃用
问题描述
我使用 ezhc 和 pandas 为热图生成数据
def industry_heatmap(csv):
df = pd.read_csv(csv).set_index('Industry').groupby(level=0).mean()
idx, col, data = hc.build.series_heatmap(df) …
return idx, col, data
return json
然而,由于 pandas 1.3.1 弃用 pandas.core.index ...
C:\Users\lib\site-packages\ezhc\build.py, line 338, in series_heatmap
return series
def series_heatmap(df, *args, **kwargs):
idx = df.index
col = df.columns
assert(isinstance(idx, pd.core.indexe.Index)) …
for c in col:
assert(df[c].dtype.kind in 'if')
dft = df.copy()
dft.index = range(len(df.index))
dft.columns = range(len(df.columns))
我收到归因错误
module 'pandas.core' has no attribute 'index'
ezhc 为 highchart javascript 生成数据的任何解决方法或替代方法???提前致谢
解决方案
推荐阅读
- node.js - 为我的捆绑 javascript 库导入打字稿定义
- javascript - 将带有自动完成功能的搜索框从导航栏移到页脚?
- crash - 如果通过拖动选项卡对编辑器选项卡重新排序,SQL Server Management Studio 版本 18.7.1 会崩溃
- azure - 基于条件的 Azure 数据工厂 Databricks 参数
- pentaho - Pentaho 中的转置/透视 Excel 文件(使用多个文件)
- ruby-on-rails - Capistrano 部署找不到 Gemfile
- r - R - 向量化嵌套的 for 循环以将新值分配给矩阵
- sql - SQL 查询有助于检索带或不带前导零的行
- vector - 如何在illustrator中制作偏移路径以剪切背面对象
- facebook - 取消链接后无法(重新)将 Facebook 页面连接到 Facebook 应用