From 82399872d4f4f058b8ce74ee4a34a7efd1431203 Mon Sep 17 00:00:00 2001 From: smeax <114774652+smeax@users.noreply.github.com> Date: Sat, 15 Oct 2022 10:39:04 +0530 Subject: [PATCH] Delete scripts/csv_to_json directory --- scripts/csv_to_json/README.md | 8 -------- scripts/csv_to_json/script.py | 15 --------------- 2 files changed, 23 deletions(-) delete mode 100644 scripts/csv_to_json/README.md delete mode 100644 scripts/csv_to_json/script.py diff --git a/scripts/csv_to_json/README.md b/scripts/csv_to_json/README.md deleted file mode 100644 index 5f2d167..0000000 --- a/scripts/csv_to_json/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# CSV to EXCEL -This simple script will convert CSV file to json. - -## Usage - -* requires pandas -* Use `pip install pandas` -* Run `python script.py` diff --git a/scripts/csv_to_json/script.py b/scripts/csv_to_json/script.py deleted file mode 100644 index 7f8e6b0..0000000 --- a/scripts/csv_to_json/script.py +++ /dev/null @@ -1,15 +0,0 @@ -import pandas as pd -import os,json - -def csv_to_json(): - file = input("Enter csv path: ") - df = pd.read_csv(file) - name=os.path.basename(file).replace("csv","json") - data =df.to_dict("r") - with open(file,'w') as f: - json.dump(df, d) - - print(f"file saved at {name}") - - -csv_to_json() \ No newline at end of file