专家们,
这是我的代码块,我收到以下错误。
import pandas
import os
trainFile = r'C:\PythonProjects\sample.csv'
pwd = os.getcwd()
os.chdir(os.path.dirname(trainFile))
trainData = pandas.read_csv(os.path.basename(trainFile))
p=pandas_profiling.ProfileReport(trainData)
os.chdir(pwd)
-------------------------------------------------- ------------------------- NameError Traceback (last last call last) in () 6 trainData = pandas.read_csv(os.path.basename(trainFile )) ----> 7 p=pandas_profiling.ProfileReport(trainData) 8 os.chdir(pwd)
您能否提供您的输入/建议来解决此错误。NameError:名称“pandas_profiling”未定义