A simple and efficient file converter package for various data file types.
- Convert CSV to JSON and vice versa.
- Convert CSV to TXT and vice versa.
- Convert JSON to TXT and vice versa.
- (More conversion features to be added…)
pip install file_converter
$ python
import pandas as pd
from file_converter import FileConverter
# convert a txt file to a json format.
def txt_to_json(create_test_files):
output_json = "tests/test_files/output_from_txt.json"
FileConverter.txt_to_json(TXT_FILE, output_json)
file_converter.FileConverter.json_to_csv("input_file.json", "output_file.csv")
file_converter.FileConverter.json_to_txt("input_file.json", "output_file.txt")
file_converter.FileConverter.csv_to_txt("input_file.csv", "output_file.txt")
file_converter.FileConverter.csv_to_json("input_file.csv", "output_file.json")
file_converter.FileConverter.txt_to_csv("input_file.txt", "output_file.csv")
For license information, see LICENSE.txt.
Created by Henok B Ademtew, 2023