I was wondering whether there is a way to use the .replace() and .fillna() for columns headers that begin with part of a string.
For example:
data['Q5_A'].fillna(value='Not Applicable', inplace=True)
This will only apply .fillna() to column Q5_A.
Similarily:
data["Q5_S"] = data["Q5_S"].replace(",", "", regex=True)
This will only apply .replace() to column Q5_S.
What if I would like it to apply to any columns that have "Q5_" in the header?
Thanks!