Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas drop if present

df = df.drop(["col1", "col2"], axis=1, errors='ignore')
# default errors='raise'
Source by pandas.pydata.org #
 
PREVIOUS NEXT
Tagged: #pandas #drop #present
ADD COMMENT
Topic
Name
2+8 =