pandas删除满足特定列信息的行记录
#!/usr/bin/python import pandas as pd df = pd.read_excel('c:\data\zichan.xlsx') df_sn = pd.read_excel('c:\data\SN.xlsx') sn_series = pd.Series(df_sn['SN'].values) print(sn_series.size) new_df = df[~df['SN'].isin(sn_series)] new_df.to_excel('c:\data\out.xlsx')