Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas drop column if exists

df = df.drop(['row_num','start_date','end_date','symbol'], axis=1, errors='ignore')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #drop #column #exists
ADD COMMENT
Topic
Name
9+3 =