在daraframe中去掉包含“金融业”的整行记录
import pandas as pd
df = pd.DataFrame(data=[{'symbol':'000001','Industry':'金融业'}, {'symbol':'000002','Industry':'采矿业'}, {'symbol': '000003', 'Industry': '建筑业'}])
df
df.drop(df.index[(df['Industry'] == '金融业')], inplace=True)
df
参考链接
https://blog.csdn.net/wiowei/article/details/122464303