Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- df = pd.read_csv('./Sample.csv')
- df.drop('col3', axis = 1, inplace = True) # Delete columns
- df.drop(df.index[[1,4]], inplace = True) # Delete rows
- df.to_csv('new_sample.csv', index = False) # Write to file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement