code: def row_to_geojson(row, lon, lat, precision, date_format='epoch'):
      
  
      # Let pandas handle json serialization
      row_json = json.loads(row.to_json(date_format=date_format, date_unit='s'))
      return geojson.Feature(geometry=geojson.Point((round(row_json[lon], precision), round(row_json[lat], precision))),
                             properties={key: row_json[key] for key in row_json.keys() if key not in [lon, lat]})
docs: Convert a pandas dataframe row to a geojson format object.  Converts all datetimes to epoch seconds.