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.