I have a collection of JSON variables, all with the same format and data irregularities, that I'd like to correct and then reassign to data frames for processing.
I'm getting stuck at the point, post-cleaning, that I have a generic dataframe, df, that I now want to assign to a permanent data frame before moving to the next variable.
I've included the respective code below. With variable names [a, b, c], I'd like to assign df to a new data frame called df_a, df_b, and df_c respectively. Any ideas on how to do this.
vars = [a, b, c]
# clean data iteratively
for i in vars:
df = pd.DataFrame(i)
df['value'] = df['value'].replace('.', np.nan).fillna(method='bfill')
df['value'] = pd.to_numeric(df['value'])
[???] = df