Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

cannot read csv file using pandas

im trying to import dataset in jupyter:

import pandas as pd
dataset = pd.read__csv("Cost_of_Living_Index_2022.csv")

but every time i receive this error:

AttributeError                            Traceback (most recent call last)
    ~\AppData\Local\Temp/ipykernel_9348/548915215.py in <module>
    ----> 1 dataset = pd.read__csv("Cost_of_Living_Index_2022.csv")
    
    ~\anaconda3\lib\site-packages\pandas\__init__.py in __getattr__(name)
        242         return _SparseArray
        243 
    --> 244     raise AttributeError(f"module 'pandas' has no attribute '{name}'")
        245 
        246 
    
    AttributeError: module 'pandas' has no attribute 'read__csv'

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You are using an extra _ in your function name.

Use:

pd.read_csv("Cost_of_Living_Index_2022.csv")

Instead of:

pd.read__csv("Cost_of_Living_Index_2022.csv")
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading