简体   繁体   中英

I am getting the “no module named pandas:” error after pandas being installed

I am trying to remove duplicates from a CSV file with the following script:

import pandas as pd

toclean = pd.read_csv('LCG.csv')

deduped = toclean.drop_duplicates([col1,col2])
deduped.to_csv('LCGc.csv')

But I am getting the error "no module named pandas". However I have already installed pandas via miniconda.

康达清单显示熊猫已安装

似乎您有多个版本的Python,而当前使用的版本是python 2.7,因此要在该特定版本上安装熊猫,请尝试以下操作:

pip27 install pandas

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM