Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #removes null values for data downloaded from exoplanets.eu
- import pandas as pd
- df = pd.read_csv('C:/Users/Sridhar Gajendran/AppData/Local/Programs/Python/Python36/exoplanet.eu_catalog.csv')
- print(df) #flags null values as NAN
- new_df = df.dropna() #drops rows with zero values
- print(new_df)
- new_df.to_csv('removed.csv', index = False, header = False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement