An open API service indexing awesome lists of open source software.

https://github.com/michaelfarquhar/python-csv-to-json

Python script to convert a CSV file to JSON.
https://github.com/michaelfarquhar/python-csv-to-json

csv json python python-script

Last synced: 5 months ago
JSON representation

Python script to convert a CSV file to JSON.

Awesome Lists containing this project

README

          

# Python CSV to JSON
Python script to convert a CSV file to JSON.

## Demo
You can demo this project on [Replit](https://replit.com/@MichaelFarquhar/python-csv-to-json#README.md).

## How To Use
1. Place your CSV to be converted into the directory.
2. Add header values to the csv file. Column headers will be set as the key for each key-value pair.
3. In the main() function, change the `csv_filename` variable to match your csv file name. The JSON file with be generated with the same name.
4. Run the script:
```
python main.py
```