title: Python Type issue when Converting a CSV to custom JSON format
body: <p>I am trying to convert a CSV to a specific format. I have succeeded getting the the format desired but i now realize it has treated all csv values as string, where some should be floats, or literal, or int.</p>
  
  <p>Is there a method to correctly format the columns values to the desired for the JSON dump. I am sure there is also a simpler way to accomplish this too. </p>
  
  <pre><code>j = []
  
  with open("output.csv") as f:
      reader = csv.DictReader(f, delimiter=",")
      for row in reader:
  
      row["id"] = row["Id2"]
      row["ideca"] = row["schemaV"]
      row["schem"] = row["schema"]
      row["lore"] = row["serialNumber"]
      row["tore"] = row["msgschem"]
      row["fore"] = row["dschema"]
      row["created"] = row["created"]
      row["loaded"] = row["created"]
  
      row["geometry1"] = {
          "type": "point",
          "coordinates": row["latlong"]
      }
  
      row["location1"] = {
          "timestamp": row["timestamp"],
          "geometry": row["geometry1"]
      }
  
      row["ignition1"] = {
          "timestamp": row["timestamp"],
          "state": row["Value"]
      }
  
      row["data"] = {
        "engine_status": row["Value"],
        "state": row["Value"],
        "switch_status": row["Value"],
        "latitude": row["lat"],
        "longtitude": row["long"],
        "plantNumber": row["plantno"],
        "ignition": row["ignition1"],
        "location": row["location1"]
  
      }
  
  
      del(row[""])
      del(row["Epoch"])
      del(row["AssetId"])
      del(row["Value"])
      del(row["lat"])
      del(row["long"])
      del(row["serialNumber"])
      del(row["plantno"])
      del(row["msgschem"])
      del(row["dschema"])
      del(row["created"])
      del(row["intEpoch"])
      del(row["timestamp"])
      del(row["latlong"])
      del(row["Id"])
      del(row["Id2"])
      del(row["ignition1"])
      del(row["geometry1"])
      del(row["location1"])
  
      # Collect the changed row in the list of rows.
      j.append(row)
  
  print(json.dumps(j, indent=4))
  </code></pre>
  
  <p>Data example as below:</p>
  
  <pre><code>    Id  Epoch   AssetId Value   lat long    serialNumber    plantno Id2 schemaV schema  msgschem    dschema created intEpoch    timestamp   latlong
  0   1538317366  875 0   -1.6478 1.9428  1688889 1042225 168888;1538317366   1    d2xxxage    mxxx;v1    Sxxxxs  154900000   15900000    30/09/2018  2:22:46 PM  [ -1.647766499999996, 1.9428143 ]
  </code></pre>