Answers for "how to drop column index in pandas from a range"

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 column index in pandas from a range"

Python Answers by Framework

Browse Popular Code Answers by Language