pandas subset by two columns code example Example: python - subset specific columns name in a dataframe columns = ['b', 'c'] df1 = pd.DataFrame(df, columns=columns)