Skip to main content

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:

si5

Table visual

si5

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) # method in which you can immediately initialize a matrix with header
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
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)

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

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

vismatrix-0.4.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file vismatrix-0.4.tar.gz.

File metadata

  • Download URL: vismatrix-0.4.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for vismatrix-0.4.tar.gz
Algorithm Hash digest
SHA256 02fd1ded04c4b53b4bab3ba6e8e78451debc8d2a510ce92dc9250620bd840926
MD5 2aa6be86ed605837c9443b958eb15141
BLAKE2b-256 5e613501fd3094424fcf878d10881c4c076518a03604cd7082ab76364c192838

See more details on using hashes here.

Supported by

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