When I tried to read the csv file using pandas, the following error message was displayed.
Traceback (most recent call last):
File "C:\python\iris_pandas.py", line 1, in <module>
import pandas as pd
File "C:\python\pandas\__init__.py", line 22, in <module>
from pandas.compat.numpy import (
File "C:\python\pandas\compat\numpy\__init__.py", line 9, in <module>
_np_version = np.__version__
AttributeError: module 'numpy' has no attribute '__version__'
The code is below.
import pandas as pd
df = pd.read_csv('IRIS.csv')
df
From the error message, I thought that there was something wrong with numpy, so when I rewrote pandas to numpy, the following error message was displayed.
Traceback (most recent call last):
File "C:\python\iris_pandas.py", line 3, in <module>
df = pd.read_csv('IRIS.csv')
AttributeError: module 'numpy' has no attribute 'read_csv'
I would like to know if there is any solution.
Recommended Posts