Answers for "pandas filter column not in list"

0

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] = ...
Posted by: Guest on November-08-2021

Code answers related to "pandas filter column not in list"

Python Answers by Framework

Browse Popular Code Answers by Language