I need help creating a NDJSON object from the following parsed data from on of the leading Advertising Platform. I intend to upload the data to bigquery.
I succeeded in creating an NDJSON using pandas but I can't control for datatypes and it creates error during loading. [Especially between Int & Floats]
This is my object
datadict = {
'start_time': ['2019-03-26','2019-03-27','2019-03-28'],
'id': ['campaignid10', 'campaignid10', 'campaignid10'],
'impression': [100, 200, 0],
'tweets' : [10, None, None]
}
Desired Output: also None should be null
{'start_time':'2019-03-26', 'id':'campaignid10', 'impression':100, 'tweets':10 }
{'start_time':'2019-03-27', 'id':'campaignid10','impression':200, 'tweets':null}
{'start_time':'2019-03-28', 'id':'campaignid10', 'impression':0, 'tweets':null}