I am a student and today's topic was on adding pandas and other packages to python. I am using vs code to do the coding but as soon as I run the code I get the error. I have been suffering for 3 hours now and decided to ask you guys for some help. This is the code:
import pandas
XYZ_web= {
'Day':[1,2,3,4,5,6],
"Visitors":[1000, 700,6000,1000,400,350],
"Bounce_Rate":[20,20, 23,15,10,34]
}
print(XYZ_web)
print('\n');
df = pandas.DataFrame(XYZ_web)
print(df)
And this is the error:
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\Cameron Ganesh\Documents\Python> & "C:/Users/Cameron Ganesh/AppData/Local/Programs/Python/Python38-32/python.exe" "c:/Users/Cameron Ganesh/Documents/Python/idc.py"
Traceback (most recent call last):
File "c:/Users/Cameron Ganesh/Documents/Python/idc.py", line 1, in <module>
import pandas
File "C:\Users\Cameron Ganesh\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pandas\__init__.py", line 11, in <module>
__import__(dependency)
File "C:\Users\Cameron Ganesh\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numpy\__init__.py", line 140, in <module>
from . import core
File "C:\Users\Cameron Ganesh\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numpy\core\__init__.py", line 22, in <module>
from . import multiarray
File "C:\Users\Cameron Ganesh\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numpy\core\multiarray.py", line 12, in <module>
from . import overrides
File "C:\Users\Cameron Ganesh\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numpy\core\overrides.py", line 7, in <module>
from numpy.core._multiarray_umath import (
AttributeError: module 'datetime' has no attribute 'datetime_CAPI'
Thank you so much and any help will be greatly appreciated. Thank you