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.
- Host: GitHub
- URL: https://github.com/michaelfarquhar/python-csv-to-json
- Owner: MichaelFarquhar
- Created: 2022-06-04T13:25:38.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-05T15:02:16.000Z (almost 4 years ago)
- Last Synced: 2025-01-19T07:14:33.580Z (about 1 year ago)
- Topics: csv, json, python, python-script
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```