Skip to content

SwarajJalkote/csv_to_dat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a Python Library to Read the CSV file and convert it into .dat file and vice versa

Description:

PyPi: https://pypi.org/project/csvtodat/
image

Installation:

pip install csvtodat

Functions:

CSV to DAT Conversion

csv_to_dat(input_file, input_del=",", output_path="output.dat", output_del="|", column_names=list())
Parameter Description
input_file csv file which needs to be converted with complete path
input_del used in input file. Default: , (comma)
output_path dat file which will be created as output with expected path
output_del delimiter used in output file: Default:
column_names list of names of columns which you want to extract from csv
read_csv_file(input_file, input_del=",", column_names=list()) 
Parameter Description
input_file csv file which needs to be converted with complete path
input_del used in input file. Default: , (comma)
column_names list of names of columns which you want to extract from csv
convert_to_dat(csv_data, output_path="output.dat", output_del="|") 
Parameter Description
csv_data pandas DataFrame returned by read_csv()
output_path dat file which will be created as output with expected path
output_del delimiter used in output file: Default:

DAT to CSV Conversion

 dat_to_csv(input_file, input_del="|", output_path="output.csv", output_del=",", column_names=list())
Parameter Description
input_file dat file which needs to be converted with complete path
input_del used in input file. Default:
output_path csv file which will be created as output with expected path
output_del delimiter used in output file: Default: , (comma)
column_names list of names of columns which you want to extract from dat
read_dat_file(input_file, input_del="|", column_names=list()) 
Parameter Description
input_file dat file which needs to be converted with complete path
input_del used in input file. Default:
column_names list of names of columns which you want to extract from dat
convert_to_csv(dat_data, output_path="output.csv", output_del=",") 
Parameter Description
dat_data pandas DataFrame returned by read_csv()
output_path csv file which will be created as output with expected path
output_del delimiter used in output file: Default: , (comma)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages