Я создаю фрейм данных простого словаря, и при импорте Pandas в PyCharm выдает эту ошибку
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.2.2\helpers\pydev\_pydev_bundle\pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.2.2\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/Admin/PycharmProjects/test.py", line 99, in <module>
import pandas as pd
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.2.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\pandas\__init__.py", line 11, in <module>
__import__(dependency)
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.2.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\numpy\__init__.py", line 140, in <module>
from . import _distributor_init
File "C:\Program Files\JetBrains\PyCharm Community Edition 2019.2.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\numpy\_distributor_init.py", line 26, in <module>
WinDLL(os.path.abspath(filename))
File "C:\Users\Admin\AppData\Local\Programs\Python\Python37-32\lib\ctypes\__init__.py", line 356, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application
Я пробовал это в Интерпретаторе, и он прекрасно работает
my_dict = {'Employee' : { 'Dev' : {'Desgination' : 'Manager', 'Salary':20000},'Luv': {'Desgination' : 'Worker', 'Salary':30000}}}
print(my_dict)
import pandas as pd
df = pd.DataFrame(my_dict)
print(df)
Ожидаемый результат:
Сотрудник
Dev {'Desgination': 'Manager', 'Salary': 20000} Luv {'Desgination': 'Worker', 'Salary': 30000}