Just a random package to deal with CSV files
Project description
ManagerCSV
Just a random package to deal with csv file.
Installation
Just use pip
pip install ManagerCSV
Usage
For some reason, to import the lib you need to precise .index
after the lib name
Read a file:
from ManagerCSV.index import CSV_manager
csv_file = CSV_manager("/path/to/your/file")
for values in csv_file.read_csv():
print(values)
Since the read_csv
method, return a generator of lists, you must iterate over it to read the file content.
Write a file:
from ManagerCSV.index import CSV_manager
csv_file = CSV_manager("/path/to/your/file")
datas: list[list[any]] = [ [ "Name", "First name", "Birth Year" ], [ "Turing", "Alan", 1912 ], [ "Lovelace", "Ada", 1815 ], [ "Shanon", "Claude", 1916 ], [ "Truong", "André", 1936 ] ]
csv_file.write_csv(datas)
To write into a file you have to provide a 2-dimensional array, Each Subarray in the main array represents columns and the data present in them, will be displayed on rows. In this case, the csv file, will looks like this
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
ManagerCSV-1.0.1.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for ManagerCSV-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f79b6b05906833fb0f29238a9ce8040c82d7a1c313bea0e0902a994be3914be7 |
|
MD5 | 3586123647a00034124338dc4b0845e9 |
|
BLAKE2b-256 | 8282dfd33aa7ab709c35268c006560f9eb442bc34be481c8c8075f345eb6d76c |