Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas drop columns by index

cols = [1,2,4,5,12]
df.drop(df.columns[cols],axis=1,inplace=True)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #drop #columns #index
ADD COMMENT
Topic
Name
4+6 =