I have a .csv file with a few cells set to null and am trying to store this data in mongodb using pymongo. However I will be feeding this data to an API so I need the fields to be null instead of a string that says "null". I tried setting the null cells with None-
data.append( { 'date' : row[0] if row[0] != 'null' else None} )
but this produces the following document-
{ "_id" : ObjectId("5f3713b36e752a743d5b293d") }
The field that I set to null is not present, which returns undefined when accessed.
Is there a way to set this to null?