我有一个大的dataframe,我想删除'test'这个词出现在列Source (object类型)中的所有行。然而,这个词可以有多种形式,例如:
'test'
'Test'
'TESTE'如何使用regex不区分大小写的方法从数据中删除这些行?我试过以下几种方法:
mask = df.iloc[:,'Source'].str.contains('/test/ig', regex = True)
df = df.loc[~mask]发布于 2020-08-18 18:39:12
https://stackoverflow.com/questions/63474599
复制相似问题