pandas 如何从panda_profiling运行配置文件报告?

4uqofj5v  于 2023-01-24  发布在  其他
关注(0)|答案(1)|浏览(151)

我导入了Pandas,麻木和Pandas配置文件与下面的代码,但由于某种原因,它不会显示任何数据,但3行信息,所以这里有代码:

from pandas_profiling import ProfileReport
profile=ProfileReport(df, title='Pandas Profiling Report', html={'style':{'full_width':True}})
profile

...下面是输出:

HBox(children=(HTML(value='Summarize dataset'), FloatProgress(value=0.0, max=26.0), HTML(value='')))

HBox(children=(HTML(value='Generate report structure'), FloatProgress(value=0.0, max=1.0), HTML(value='')))

HBox(children=(HTML(value='Render HTML'), FloatProgress(value=0.0, max=1.0), HTML(value='')))

有人知道为什么它不起作用吗?

1l5u6lss

1l5u6lss1#

Marcelina,我不得不使用下面的代码来查看结果,因为我是从脚本或命令行运行它的(它只会给予我一个空行;多么令人沮丧!):

import pandas_profiling,pandas,os
profileReport0=pandas_profiling.ProfileReport(pandas.read_csv(r'C:\Users\johndoe\Downloads\ipos.csv'))
file0=r'C:\Users\johndoe\Documents\profileReport0.html'
profileReport0.to_file(file0)
os.system(r'''start "" "'''+file0+'''"''')

相关问题