Answers for "how to drop range of columns in pandas"

18

drop multiple columns pandas

yourdf.drop(['columnheading1', 'columnheading2'], axis=1, inplace=True)
Posted by: Guest on May-16-2020
1

pandas drop column by index range

# drop columns 0 to 3
droprange = list(range(0, 4))
df.drop(df.columns[droprange], axis=1, inplace=True)
Posted by: Guest on May-18-2021

Code answers related to "how to drop range of columns in pandas"

Python Answers by Framework

Browse Popular Code Answers by Language