How to process json data inside a csv file I am trying to use from_json but with that I need to specify my schema where as my schema keeps varying.
sample input:-
userid type data
26594 p.v {}
26594 s.s {"sIds":["1173","1342","12345"]}
26594 s.r {"bp":"sw"}
26594 p.v {}
26594 s.r {"c":"tracking","action":"n","label":"ank"}
26593 p.v {}
26594 p.sr {"pId":"11234","pName":"sahkas","s":"n","is":"F","totalCount":0,"scount":0}
I am looking to convert this into a dataframe using which we can query the json.
Looking for output like:-
userid type data_sids data_bp data_c data_action data_label
26594 p.v null null null null null
26594 s.s 1173 null null null null
26594 s.s 1173 null null null null
26594 s.s 1342 null null null null
26594 s.s 12345 null null null null
26594 s.r null sw null null null
Is this doable?
Could you please help me with this.
Thanks,
Ankush Reddy.