Skip to content

This simple code will input a Json file up to 500k lines, and output it in a CSV file. I also added another py file that will count how many US cities are in that output.

Notifications You must be signed in to change notification settings

VitorCoelho/Json-to-csv-with-counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

JSON to CSV Converter This simple Python code converts JSON data to CSV format. It processes a JSON file containing city data and exports it to a CSV file. The script uses the pandas library to handle data manipulation and conversion.

Usage json_to_csv.py

This script converts a JSON file containing city data to CSV.

Input:

Modify the input_json_file variable to specify the path to your JSON file. Modify the output_csv_file variable to specify the desired output CSV file path. Usage:

bash Copy code python json_to_csv.py US Cities Counter

This Python script counts the number of unique US cities in a CSV file containing business data. It uses a predefined list of US state codes to identify US cities.

Input:

Modify the csv_file_path variable to specify the path to your CSV file containing business data. Usage:

bash Copy code python us_cities_counter.py How to Use Clone Repository:

bash Copy code git clone https://github.com/your_username/your_repository.git Run JSON to CSV Converter:

bash Copy code cd your_repository python json_to_csv.py Run US Cities Counter:

bash Copy code python us_cities_counter.py Feel free to customize the README according to your repository's structure and organization.

About

This simple code will input a Json file up to 500k lines, and output it in a CSV file. I also added another py file that will count how many US cities are in that output.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages