我刚刚在pycharm上下载了熊猫,就像通常下载模块一样。运行代码s=df.stack().sort_index(level=1).to_frame(0).T
s.columns=s.columns.map('{0[1]}{0[0]}'.format)
s
A0 A1 A2 B0 B1 B2
0 1 2 3 11 12 13
时,我仅收到以下错误
import pandas
我也尝试过使用Traceback (most recent call last):
File "/Users/walid/Documents/Python/pandas/csv.py", line 1, in <module>
import pandas
File "/Users/walid/.conda/envs/Python/lib/python3.7/site-packages/pandas/__init__.py", line 145, in <module>
from pandas.io.api import (
File "/Users/walid/.conda/envs/Python/lib/python3.7/site-packages/pandas/io/api.py", line 8, in <module>
from pandas.io.excel import ExcelFile, ExcelWriter, read_excel
File "/Users/walid/.conda/envs/Python/lib/python3.7/site-packages/pandas/io/excel/__init__.py", line 1, in <module>
from pandas.io.excel._base import ExcelFile, ExcelWriter, read_excel
File "/Users/walid/.conda/envs/Python/lib/python3.7/site-packages/pandas/io/excel/_base.py", line 9, in <module>
from pandas._libs.parsers import STR_NA_VALUES
File "pandas/_libs/parsers.pyx", line 12, in init pandas._libs.parsers
ImportError: cannot import name QUOTE_MINIMAL
将其安装在终端中,但后来我得到了:
pip install pandas
可能是什么问题?我是熊猫的新手,但从来没有在pycharm上安装模块的问题。