Package mytable-lucien
A simple package for processing data in the form of a table.
Pay attention, all indexes start from 0 instead of 1.
To install:
pip install mytable-lucien
To import:
import mytable_lucien
Module mycsv
This is a simple reader and writer for CSV files by Lucien Shaw. It consumes less resource and processes more quickly than the current csv module, though a lot less functional.
It reads CSV files as plain texts and stores the table in a list, whose elements are lists of cells of the current row. The list is the value to the key 'full' of a dict, which is the returned value of the function.
Here is the guidance.
Import
from mytable_lucien import mycsv
Function read()
This reads a CSV file and store the table in a list.
Function write()
This creates a CSV file.
Module mytools
Useful tools. Simple, yet powerful.
Import
from mytable_lucien import mytools
Function excel_ctn()
All functions of this package use numbers as indexes, but Excel uses alphabets as indications of the columns, such as 'A' for column 0 (We count from 0, remember?), 'Z' for column 25, and 'AA' for column 26.
This converts the alphabetical column Characters To pure Numbers.
Module myview
This provides a better view of the tables.
Import
from mytable_lucien import myview
Function select_range()
In some circumstances, there are so many columns that they cannot be fully displayed in excel, and columns that exceed the limit cannot be visualized.
This allows you to select some columns and rows so that you can extract them to a new temporary CSV file and view them with your favorite table viewer, like Excel.
Module myedit
Edit the table the easy way.
Import
from mytable_lucien import myedit
Function combine_rows()
This combines rows of multiple tables with the same total number of columns.
Function combine_columns()
This combines columns of multiple tables with the same total number of rows.