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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for quick_csv-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73249e1e422573f90ea0e7558d6183354a2a18cc8f144c2765d20c7535481692 |
|
MD5 | d0cd03f28442ee6b319452451cb2ba98 |
|
BLAKE2b-256 | b33cdd6dbae030a7c794745d0766ca845ee0584c6503b48e9412a5f3939b3534 |