Pandas Dataframe Drop Examples

  movie_award_2022.drop(['title','movie_id'], axis=1, inplace=True) # drop duplicate columns 

source

  cs3 = cs2.drop(['Gender','Education','Occupation','Region','Rented_OwnHouse'],axis = 1)
cs3.drop(['Good_Bad'],axis = 1, inplace = True)
cs3 

source

  #Drop missing data
df2.dropna()
 

source

  # drop missing vallues
gobike_df = gobike_df.dropna() 

source

Copyright © Code Fetcher 2022

 

 

Leave a comment

Your email address will not be published. Required fields are marked *