Advertisement
elena1234

replace all blank space with np.nan in Python

Nov 23rd, 2022 (edited)
974
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | Source Code | 0 0
  1. df_auto = df_auto.replace(r'^\s*$', np.nan, regex=True)
  2. df_auto.head()
  3.  
  4.  
  5. ###########################################################
  6. df_jobs.Currency = df_jobs.Currency.replace('n/a', np.nan)
  7.  
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement