Output matrix or table in beautiful form
Project description
Visual Matrix
About:
Visual Matrix - module for python, allowing you to display matrices or tables in a beautiful form.
Functional:
- Create and view tables and matrix;
Screenshots:
Table visual
Table visual (with border)
Matrix visual
How to use:
from vismatrix import VisualMatrix
header = ["Name", "Age", "Sex"]
m = [["Alexandra", "18", "Female"],
["Igor", "21", "Male"],
["Vladimir", "18", "No"]]
matrix = VisualMatrix() # initialization
matrix.setMatrix(m, header, True) # method in which you can immediately initialize a matrix with header
# and without borders
matrix.myMatrix()
matrix.setMatrix(m) # method in which you can immediately initialize a matrix without header
matrix.myMatrix()
First way
from vismatrix import VisualMatrix
matrix = VisualMatrix() # initialization
# second way (in this way you cant change no_border parameter)
matrix.addHeader(["Name", "Age", "Sex"])
matrix.addRow(["Alexandra", "18", "Female"])
matrix.addRow(["Igor", "21", "Male"])
matrix.addRow(["Vladimir", "18", "No"])
matrix.myMatrix()
matrix.addRow(["Alexandra", "18", "Female"])
matrix.addRow(["Igor", "21", "Male"])
matrix.addRow(["Vladimir", "18", "No"])
matrix.myMatrix()
Second way
-The output from both methods will be the same. You can immediately assign lists to methods (as in the first method with header)
addHeader(header)
Adds a table header.
| Parameter | Type | Description |
|---|---|---|
header |
list |
Is the header for the table |
addRow(row)
Adds a row table/matrix.
| Parameter | Type | Description |
|---|---|---|
row |
list |
Matrix or table row |
setMatrix(user_matrix, header, no_border)
Creates a matrix or table (Depending on whether a header is specified or not).
| Parameter | Type | Description |
|---|---|---|
user_matrix |
list |
Matrix or table`s data |
header |
list |
Table`s header |
no_border |
bool |
Use borders (True - No, False - Yes) |
myMatrix()
Output table or matrix. Must be written at the end of creating a matrix or table
Install:
pip install vismatrix
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vismatrix-0.5.1.tar.gz.
File metadata
- Download URL: vismatrix-0.5.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0003c25cac7c298e09734c1c84257e0482f6251e3fad096c3870d2265ded93aa
|
|
| MD5 |
b0e74077967795e3fd9bab64b59797c7
|
|
| BLAKE2b-256 |
be1fa3e6c99a4819653b676c375b8605d0b994fdf03acebf13e72108c3ebbc10
|
File details
Details for the file vismatrix-0.5.1-py3-none-any.whl.
File metadata
- Download URL: vismatrix-0.5.1-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d13bb3a69f594a3619c538daf56640ad45da950246d7ddd6e17eb6198950d83
|
|
| MD5 |
fd80667d84bfc57d342b180b277c6cfd
|
|
| BLAKE2b-256 |
6cb20974e3bfb6d4bd25e67d66784ee8d11fc22af32c50ef6ded020ca2a5f5e2
|