Skip to content

esvin2661/Convert_JSON_to_CSV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JSON to CSV Converter

This Python script converts JSON data to CSV format using the json and csv modules.

Usage

  1. Replace the example_json variable in the script (json_to_csv.py) with your actual JSON data.
  2. Specify the desired CSV file name in the output_csv_file variable.
  3. Run the script:
python json_to_csv.py

Example:

# Example JSON data
example_json = '[{"Name": "John", "Age": 25, "City": "New York"}, {"Name": "Alice", "Age": 22, "City": "San Francisco"}]'

# Specify the desired CSV file name
output_csv_file = 'output.csv'

# Convert JSON to CSV
json_to_csv(example_json, output_csv_file)
print(f"Conversion completed. CSV file saved as {output_csv_file}")


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages