简体   繁体   English

在 Jupyter Notebook 3.7 中读取 PD

[英]PD Read in Jupyter Notebook 3.7

I began a simple project and I cannot get pandas in my Jupyter notebook to read my file as I get an attribute error message:我开始了一个简单的项目,但在收到属性错误消息时,我无法在 Jupyter 笔记本中获取 Pandas 来读取我的文件:

import pandas as pd  
bank_churn = pd.read.csv('CustomerChurn')

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-15-38cc87a5bfa3> in <module>
----> 1 bank_churn = pd.read.csv('CustomerChurn')

~\Anaconda3\lib\site-packages\pandas\__init__.py in __getattr__(name)
    212 
    213             return Panel
--> 214         raise AttributeError("module 'pandas' has no attribute '{}'".format(name))
    215 
    216 

AttributeError: module 'pandas' has no attribute 'read'

你会想要使用

pd.read_csv(filename)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM