I have one data frame and i am reading that with pandas python , in that one column contains dictonay values and i want to normalize that column i.e i want to split and i am using this:
if 'X' in df_cols:
def only_dict(d):
'''
Convert json string representation of dictionary to a
python dict
'''
return d
A = json_normalize(df['X'].apply(only_dict).tolist()).add_prefix('X.')
df = df.drop('X', axis=1).join(A)
but this column contains some null values too, so i want to apply only on column which have not null values using labmda is anyone have idea how to do it?