pandas get columns based on list code example Example: dataframe select columns based on list df.filter(lst)