I'm trying to select all columns that start with a certain string and then fill all the null values in with a new value. What I'm doing now just turns all the column headers into a list instead though.
lifestyle_var = [col for col in list(df) if col.startswith('lifestyle')]
df[lifestyle_var].fillna(1, inplace=True)