price_data['SPY'].plot(figsize=(15, 7))
while executing above line, following error generated.
TypeError: Cannot interpret '<attribute 'dtype' of 'numpy.generic' objects>' as a data type
i have all necessory files imported in Jupyter Notebook
import numpy as np
import pandas as pd
For plotting
import matplotlib.pyplot as plt
%matplotlib inline
plt.style.use('seaborn-darkgrid')
Hi Vivek,
It seems that the package versions may be old on your system. Could you please run the following code and share the output?
import pandas as pd
print(pd.__version__)
import numpy as np
print(np.__version__)
The output should be
1.2.4
1.19.5
If it is not, please refer to this blog to set up your environment with the correct packages. If the version numbers match, please share your jupyter notebook by attaching the file here.
Thanks!
import pandas as pd
print(pd.__version__)
import numpy as np
print(np.__version__)
after typing above ,here is a output
C:\Users\vivek\Anaconda3\lib\importlib\_bootstrap.py:219: RuntimeWarning: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88, got 80
return f(*args, **kwds)
C:\Users\vivek\Anaconda3\lib\importlib\_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216, got 192
return f(*args, **kwds)
C:\Users\vivek\Anaconda3\lib\importlib\_bootstrap.py:219: RuntimeWarning: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88, got 80
return f(*args, **kwds)
C:\Users\vivek\Anaconda3\lib\importlib\_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216, got 192
return f(*args, **kwds)
0.23.4
1.20.1
Hello,
The package versions are incorrect. Please refer to this blog to set up your environment with the correct packages.
Let me know if you have any more questions!
Thanks