learn-python/contrib/mini-projects/Convert_JSON_to_CSV
Yatharth ea62a209dc added project Convert_JSON_to_CSV 2024-05-13 12:25:42 +05:30
..
README.md added project Convert_JSON_to_CSV 2024-05-13 12:25:42 +05:30
convert.py added project Convert_JSON_to_CSV 2024-05-13 12:25:42 +05:30
input.json added project Convert_JSON_to_CSV 2024-05-13 12:25:42 +05:30
output.csv added project Convert_JSON_to_CSV 2024-05-13 12:25:42 +05:30

README.md

Convert a JSON File into a CSV

This script takes a JSON file as input and generates a CSV file as output.

Prerequisites modules

  • json: This module is required for handling JSON files.
  • Run pip install json to install the required external module.

How to Run the Script

  1. Make sure you have the necessary prerequisites installed.
  2. Download or clone the script converter.py.
  3. Open a terminal or command prompt.
  4. Navigate to the directory where converter.py is located.
  5. Run the script by executing the command py converter.py.

Additional Information

  • The script reads data from the input JSON file and converts it into CSV format.
  • It handles nested JSON structures and converts them into flattened CSV rows.
  • The output CSV file is created in the same directory as the input JSON file.
  • You can customize the behavior of the script by modifying the source code according to your requirements.