Jan-03-2020, 05:15 PM
(This post was last modified: Jan-03-2020, 05:22 PM by sandeep_ganga.)
Try adding na=False and test again.
print(aircraft.unique().tolist())
df=pd.DataFrame(aircraft)
<<add those lines here, with dataframe columnname and conditions as needed>>
Best Regards,
Sandeep
GANGA SANDEEP KUMAR
print(df) # before changes indexNames = df[~df['Aircraft-combined'].str.contains('D',na=False)].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',na=False)].index df1.drop(indexNames1 , inplace=True) print(df1)#for the filtered df, now it show for matching word DLi see line 38-40 of your post have output generated and turned to dataframe, so assign that line 40 to name df to re-process output. Also, you mentioned the output dataframe have column names as Venue BID Date DISPLAY/ Aircraft-combined and you need Aircraft-combined dataframe column re-processed i believe.
print(aircraft.unique().tolist())
df=pd.DataFrame(aircraft)
<<add those lines here, with dataframe columnname and conditions as needed>>
Best Regards,
Sandeep
GANGA SANDEEP KUMAR