Skip to main content

Read and write CSV or TXT files in a simple manner

Project description

Quick CSV

Read and write CSV or TXT files in a simple manner

Installation

pip install quick-csv

Usage

Example 1: read and write csv or txt files

from quickcsv.file import *
# read a csv file
list_model=read_csv('data/test.csv')
for idx,model in enumerate(list_model):
    print(model)
    list_model[idx]['id']=idx
# save a csv file
write_csv('data/test1.csv',list_model)

# write a text file
write_text('data/text1.txt',"Hello World!")
# read a text file
print(read_text('data/text1.txt'))

Example 2: create dataframe from a list of models

from quickcsv.file import *
# read a csv file
list_model=read_csv('data/test.csv')
# create a dataframe from list_model
df=create_df(list_model)
# print
print(df)

License

The quick-csv project is provided by Donghua Chen.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quick-csv-0.0.3.tar.gz (9.7 kB view hashes)

Uploaded Source

Built Distribution

quick_csv-0.0.3-py3-none-any.whl (8.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page