Skip to content
A little tool to transform a CSV file into a JSON file with Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
csv2json.py

README.md

CSV2JSON

A little tool to transform a CSV file into a JSON file with Python

Usage

  1. edit csv2json.py file to specify column names of your CSV file. Example:

     #EDIT THIS LIST WITH YOUR REQUIRED JSON KEY NAMES
     fieldnames=["firstname","secondname","age"]
    
  2. run

     python csv2json.py myCSVfile.txt
    

where myCSVfile.txt it's your CSV file.

It will create a JSON array in a file named myCSVfile.json

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.