csvtojson

Prevent Python CSV to JSON for loop iteration from overwriting previous entry

Prevent Python CSV to JSON for loop iteration from overwriting previous entry Question: I have a pretty basic Python For statement that I’m using to try to remap a CSV file into geoJSON format. My script looks like this: def make_json(csvFilePath, jsonFilePath): # create a dictionary data = { "type": "FeatureCollection", "features": [] } feature …

Total answers: 2