I think there are NaN
s values, so need specify parameter na
:
df = pd.DataFrame({
'column': ['Total','a',np.nan],
'B': list(range(3))
})
print (df)
column B
0 Total 0
1 a 1
2 NaN 2
df = df[~df["column"].str.contains("Total", na=False)]
print (df)
column B
1 a 1
2 NaN 2
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…