Skip to main content

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:

  1. table.addrow(rows, row_name, content) Adds a row (or multiple rows) to your table. rows parameter specifies how many rows you want to add, while row_name parameter 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. content is used to specify the data given to the row. Unlike other methods/functions, content must strictly be a list for it to function.
  2. table.changetitle(newtitle) Pretty straightforward. You can change the visual title for your table using this function. The newtitle parameter specifies what your new title should be called. It must be a string.
  3. table.destroy() Destroys your entire table, and replaces it with a dummy table. Pretty straightforward; no parameters.
  4. table.replace(lines, newval) Replaces values at lines list/int with data from newval list. lines can be an int, though it will only replace data from one line.
  5. table.getlongestrow() Returns the longest row in the table.
  6. table.getlongestcolumn() Returns the longest column in the table.
  7. table.getjson() Returns the formatted json of the table.
  8. table.writejson(filename) Downloads the formatted json of the table onto the file path you choose (filename)

functions

  1. DanDB.prettyprint(table) Prints the formatted contents of a table onto the terminal in an excel-like style.

  2. DanDB.returnraw(table) Prints the raw contents of a table onto 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.

Metadata

Release files for DanDB 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for DanDB 0.0.4
File Size Uploaded
dandb-0.0.4.tar.gz 6.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for DanDB 0.0.4
File Interpreter ABI Platform
dandb-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 17.3 kB

Release files / dandb-0.0.4.tar.gz

Download URL dandb-0.0.4.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
13ff40d7ef22bc6c5ee2f4428083661fcb05ba486aa161a4b48f1d347752e15e
BLAKE2b-256 checksum
How to use checksums
d192973b244e955de78cf736b2b8d2d125952861c2b3c21cbe122d2f1b5a7217
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / dandb-0.0.4-py3-none-any.whl

Download URL dandb-0.0.4-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a89792f08327627c0c11366a22589efda6a52f44fe21d1c779384947cf344578
BLAKE2b-256 checksum
How to use checksums
ba1e5973eb169780a752ec18ad9804448a441170945317101833073f07a82a89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page