在 conda 环境中使用 Visual Studio Code、Python 3.6.7,我从 Pylint 收到一条错误消息:“生成器‘generator’没有‘iloc’成员。
代码在 Jupyter Notebooks 中运行正常。会不会和我使用的conda环境有关?
engine = create_engine('sqlite:///' + database_filepath)
df = pd.read_sql_table('MessageClassification',con=engine)
X = df.iloc[:,1]
Y = df.iloc[:,4:]
category_names=list(df.columns[4:])
return X,Y,category_names
Run Code Online (Sandbox Code Playgroud)
Pylint 在 df 下划线并显示以下错误消息:
Generator 'generator' has no 'iloc' member pylint(no-member)
Run Code Online (Sandbox Code Playgroud)