0
点赞
收藏
分享

微信扫一扫

关于pandas_profiling和pandas1.4.1版本不匹配的问题

phpworkerman 2022-04-03 阅读 64
python

本来想试着分析下数据,结果疯狂报错(晚上做梦都是这个该死的错误)

下面是出错的代码,其中data1是一个pandas里面的dataframe

pfr = ppf.ProfileReport(data1)
pfr.to_file("report.html")
  w_median = (data[weights == np.max(weights)])[0]
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

解决方案很简单,问题原因详见Potential incompatiblity with Pandas 1.4.0 · Issue #911 · ydataai/pandas-profiling · GitHub

 我的解决方案是直接重装pandas,改成1.3.5的版本,就可以跑了。

 

举报

相关推荐

scanpy和umap版本不匹配问题总结

0 条评论