Google colaboratory GoogleColab中的pandas_profiling.ProfileReport(dataframe)

Google colaboratory GoogleColab中的pandas_profiling.ProfileReport(dataframe),google-colaboratory,Google Colaboratory,为什么pandas\u profiling.ProfileReport(dataframe)不能在google colab中工作 返回类型错误 TypeError: concat() got an unexpected keyword argument 'join_axes' 只需使用pandas profiling 2.7.1版,就可以了。在colab中运行此命令!pip安装==2.7.1Aishah Ismail可能会帮助您解决此问题 使用pip安装pandas分析包。 !pip安装htt

为什么
pandas\u profiling.ProfileReport(dataframe)
不能在google colab中工作

返回类型错误

TypeError: concat() got an unexpected keyword argument 'join_axes'

只需使用pandas profiling 2.7.1版,就可以了。在colab中运行此命令!pip安装==2.7.1

Aishah Ismail可能会帮助您解决此问题

使用pip安装pandas分析包。
!pip安装https://github.com/pandas-profiling/pandas-profiling/archive/master.zip

重新启动内核=转到选项菜单中的“运行时”并单击“重置所有运行时”

执行代码以创建数据帧并创建熊猫配置文件

import pandas as pd
import numpy as np
from pandas_profiling import ProfileReport
 
df = pd.read_excel('fileName.xlsx')
profile = ProfileReport(df)
profile.to_notebook_iframe()
如果上述导入不起作用,您可能需要pip安装。
!pip安装==2.7.1
在pip安装后重新执行代码

当您试图显示配置文件时,不要使用.to_widgets()--它在Colab中不起作用

如果上述方法不起作用,我建议切换到Jupyter实验室或Jupyter笔记本电脑。pandas profile仪表板在Jupyter环境中运行良好


我希望这有帮助!Pandas Profiling是一个很棒的EDA工具,非常节省时间。

如果有更多关于这个问题的上下文,这会很有帮助,代码中会出现在哪里?你想做什么?试着上传任何数据集并使用ProfileReport。错误会突然出现。为什么会发生这种情况,我如何解决它?您可以尝试从sklearn导入数据集,dataset.load_iris()