DanDB
DanDB is a multi-purpose module built for statistics, analyitics, and some other uses (such as a limited selection of machine learning functions).
Current release is 0.0.3. It can: -Create and manipulate some basic two-dimensional graphs -Print out spreadsheets of those graphs -Provide an amount of essential formulas for graphing, data science, and machine learning (currently W.I.P with ML formulas)
IMPORTANT NOTICE: This project is currently in pre-alpha. It currently isn't meant for any serious work; it is mostly a fun side project I am building.
Guide
Guide to using the module's functions. Install using pip install DanDB. Importing the module is what you do for any other module: import DanDB. That's it.
Creating a table:
To create a basic chart, use the create_table() function. The create_table() function has all the essential parameters for creating a basic table. It requires name and rows parameters to function; their usage is self explanatory. You must set a variable to create_table for it to work. Example: table = create_table(args)
The name parameter simply refers to the name you want to give the chart in both JSON and pretty print form, while the rows parameter refers to the amount of rows you want to give your chart.
Likewise, the columns parameter refers to the amount of columns you want to give your chart, though it isn't necessary (defaulted to one if not specified). The data parameter can either be a list or string, though only a list will have effect (any string will be IGNORED). As the name suggests, the data parameter will include the data visualized on your chart. If not inputted, it defaults to 0 for each column and row on your list. It also should be noted that the length of your list should reflect the size of the table (rows * columns). If it is less, default values of 0 will be added, and larger values will result in crashes.
The xcolumn_names and ycolumn_names parameters refer to the names of your columns (xcolumn) and rows (ycolumn). The default value for these parameters is "Unspecified". You can either input a list or string for each of them, though inputting a string will cause every row/column of your table to have that exact name. Lists are expected to be the exact length of either your columns or rows; wrong values can lead to unexpected behavior.
Modifying a table:
Tables have multiple methods and functions you can use to modify them. Here is a list of them:
methods:
table.addrow(rows, row_name, content)Adds a row (or multiple rows) to your table.rowsparameter specifies how many rows you want to add, whilerow_nameparameter specifies what the names for the rows should be. The value given to this parameter will be used for each row added to the table through this function.contentis used to specify the data given to the row. Unlike other methods/functions,contentmust strictly be a list for it to function.table.changetitle(newtitle)Pretty straightforward. You can change the visual title for your table using this function. Thenewtitleparameter specifies what your new title should be called. It must be a string.table.destroy()Destroys your entire table, and replaces it with a dummy table. Pretty straightforward; no parameters.table.replace(lines, newval)Replaces values atlineslist/int with data fromnewvallist.linescan be an int, though it will only replace data from one line.table.getlongestrow()Returns the longest row in the table.table.getlongestcolumn()Returns the longest column in the table.table.getjson()Returns the formatted json of the table.table.writejson(filename)Downloads the formatted json of the table onto the file path you choose (filename)
functions
-
DanDB.prettyprint(table)Prints the formatted contents of atableonto the terminal in an excel-like style. -
DanDB.returnraw(table)Prints the raw contents of atableonto the terminal.
Outro
This README is a work in progress, and doesn't cover half of the things in this module. I would advise you to look into the DanDB.py file for more info on the functions and attributes of this module.
Good luck! -Dan.
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 dandb-0.0.4.tar.gz.
File metadata
- Download URL: dandb-0.0.4.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13ff40d7ef22bc6c5ee2f4428083661fcb05ba486aa161a4b48f1d347752e15e
|
|
| MD5 |
c2efc8aa18937aa3c63127dbf14697d9
|
|
| BLAKE2b-256 |
d192973b244e955de78cf736b2b8d2d125952861c2b3c21cbe122d2f1b5a7217
|
File details
Details for the file dandb-0.0.4-py3-none-any.whl.
File metadata
- Download URL: dandb-0.0.4-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a89792f08327627c0c11366a22589efda6a52f44fe21d1c779384947cf344578
|
|
| MD5 |
8931cf59f287c7b067f92870960a3a41
|
|
| BLAKE2b-256 |
ba1e5973eb169780a752ec18ad9804448a441170945317101833073f07a82a89
|