Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas column not in list

col_list = ['Fx', 'Fy','Fz']
col_mask = ~(df.columns.isin(col_list)) # boolean list of whether each col in df is in col_list
other_cols = data.columns[col_mask] 
df[other_cols] = ...
 
PREVIOUS NEXT
Tagged: #pandas #column #list
ADD COMMENT
Topic
Name
1+2 =