Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #removes null values for data downloaded from exoplanets.eu
  2. import pandas as pd
  3. df = pd.read_csv('C:/Users/Sridhar Gajendran/AppData/Local/Programs/Python/Python36/exoplanet.eu_catalog.csv')
  4. print(df) #flags null values as NAN
  5. new_df = df.dropna() #drops rows with zero values
  6. print(new_df)
  7. new_df.to_csv('removed.csv', index = False, header = False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement