I have a DataFrame:
import pandas as pd import numpy as np df = pd.DataFrame({\'foo.aa\': [1, 2.1, np.nan, 4.7, 5.6, 6.8], \'foo.fighters
In my case I needed a list of prefixes
colsToScale=["production", "test", "development"] dc[dc.columns[dc.columns.str.startswith(tuple(colsToScale))]]