You can drop columns from pandas dataframe using the drop() method.
You can drop a single column or multiple columns by passing column names as a string or list of strings to the drop() method.
Here is the code to drop a single column:
main.py253 chars12 lines
Output:
main.py56 chars5 lines
Here is the code to drop multiple columns:
main.py273 chars12 lines
Output:
main.py36 chars5 lines
gistlibby LogSnag