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.1. 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. 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.

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.

functions

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

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

dandb-0.0.3.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dandb-0.0.3-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file dandb-0.0.3.tar.gz.

File metadata

  • Download URL: dandb-0.0.3.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for dandb-0.0.3.tar.gz
Algorithm Hash digest
SHA256 003eaf41bf99d7ecbfd5eedd2c660db5086af7d3dfbaab1fa31a6e7d3eb5ead3
MD5 09d6f26031861e5a883ec336408a682f
BLAKE2b-256 dd8d18c6a8e95fe81b44a1c40432aa51c8ef6360681af5f17daf33208fb1949d

See more details on using hashes here.

File details

Details for the file dandb-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: dandb-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for dandb-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 374c3513ff2099af5d7d1113715084acfd920ed97a8909d5938ad1c4b4896348
MD5 fdf78163a383c9abff1735fb84ff15f7
BLAKE2b-256 5f6a395fd55c74c9d27e0466207d76068dfb520c1b919b7a28f70002e9c0bc6c

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.4

2 files

This release

0.0.3 This release

2 files

0.0.2

2 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