Jan-03-2020, 02:13 PM
(This post was last modified: Jan-03-2020, 02:14 PM by sandeep_ganga.)
May be try using drop to remove rows with column conditions to your resulting dataframe, with str.match and str.contains to see if that helps you.
Sandeep
GANGA SANDEEP KUMAR
indexNames = df[~df['Aircraft-combined'].str.contains('D')].index df.drop(indexNames , inplace=True) print(df)#prints all having D and removes remaining rows df1=pandas.DataFrame(df) indexNames1 = df1[~df1['Aircraft-combined'].str.match('DL')].index df1.drop(indexNames1 , inplace=True) print(df1)#for the filtered df, now it show for matching word DLBest Regards,
Sandeep
GANGA SANDEEP KUMAR