python 使用无法调用的分析对象时出错

mfpqipee  于 2023-04-04  发布在  Python
关注(0)|答案(3)|浏览(154)

我试图使用pandas profiling for profile report.我得到了错误“module' object is not callable.我如何从Anaconda在Jupyter notebook中修复。
我的代码:

import pandas as pd
import pandas_profiling
df = pd.read_csv(r'C:\Users\tai.phan\Desktop\Pythone training\Data\titanic.csv')
pandas_profiling.profile_report(df)

错误:

TypeError: 'module' object is not callable
fnx2tebb

fnx2tebb1#

pandas_profiling不是函数

import pandas as pd
import pandas_profiling.profile_report as report
df = pd.read_csv(r'C:\Users\tai.phan\Desktop\Pythone training\Data\titanic.csv')
report.whateverfunctionyouwant(df)

查看文档以了解此模块的更多信息

也可以从下面的函数列表中为profile_report选择函数

  • 清除配置
  • 描述集
  • df哈希
  • 获取描述
  • 获取重复项
  • get_rejected_variables
  • 获取样本
  • 超文本标记语言
  • json
  • 预处理
  • 报告
  • 集合变量
  • 集合变量
  • 标题
  • 到_app
  • 至_文件
  • 至_html
  • 到_json
  • 到_notebook_iframe
  • 到_widgets
  • 小工具
cbjzeqam

cbjzeqam2#

df.profile_report()为我工作

wribegjk

wribegjk3#

import pandas_profiling

df.profile_report()

以上是为我工作

相关问题