df = pd.DataFrame.from_dict(df)
split = df['device_data'].apply(lambda x: pd.json_normalize(json.loads(x)))
a = df.drop(columns=['device_data'])
b = pd.concat(list(split), ignore_index=True)
df = a.join(b)
This is the code I am attempting to run. It works when I run a csv file but I am continuously streaming data from DyanmoDB and this code will not work and I receive the following error when attempting to do so.