dbTable
dbTable is a innovative library built on the Python SQLite Library that allows you to manipulate views on tables in Databases, select data from them, and modify them in many ways. This library abstracts out all SQL queries with native Python syntax, and has built-in lazy computation as well. Furthermore, this library provides an interface to load tables from SQLite into in-memory table structures like Pandas DataFrames or Numpy Array for further analysis.
Check out the full documentation at DOCUMENTATION
Quickstart Guide:
Installation
Make sure you have numpy and tabulate installed
pip install numpy pip install tabulate
Install dbTable through PyPI (This’ll automatically install numpy and tabulate)
pip install dbTable
You can also install the built distribution in the dist/ folder, or for portable cases, just download the dbTable.py file, and place it in your project folder
Load dbTable into your interpreter/project
import dbTable
Make a connection to a database
db = Database('test.db') # Replace with your database or use ":memory:" to load an in-memory database
Select a table:
table1 = db['table1']
Exporting / Importing
To convert a dbTable to any other form, use:
new_df = db['table1'].to_df() # Returns a Pandas DataFrame Object
new_table = db['table1'].to_table() # Returns a UCB Datascience Table
new_ndarray = db['table1'].to_numpy_array() # Returns a Numpy Array
To save a DataFrame, UCB Table, or Numpy Array, use:
db.store_table(new_df,'newtablename')
Here’s a sampling of modifications and filters you can do with dbTable
table2 = table1.select(['col1','col2']) # Selecting columns from database
table3 = table2.where(table2['col1']> 20) # Filters
table4 = table3.sort('col2',descending=False) # Sort data
grouped_table = table4.group(table4['col1'])
table4['col2'] = table4['col1']*10 # Modify columns
table4['col3'] = table4['col1']+table4['col2']
table4['col3'] *= 2
Have fun!
Check out the full documentation at DOCUMENTATION
Metadata
Release files for dbTable 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dbTable-0.0.4.tar.gz | 10.9 kB | Without provenance | Details for dbTable-0.0.4.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dbTable-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for dbTable-0.0.4-py3-none-any.whl |
| dbTable-0.0.4-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for dbTable-0.0.4-py2.py3-none-any.whl |
Total release size: 33.2 kB
Release files / dbTable-0.0.4.tar.gz
| Download URL | dbTable-0.0.4.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6bb2a66639288017eb4ae85d72c706ae6e4e5e71ae310b8b40996db18b4b895
|
|
BLAKE2b-256 checksum How to use checksums |
a387033c3c92be77d937c2a787486b121198a85144bc3714c4ed676e3e6ca009
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / dbTable-0.0.4-py3-none-any.whl
| Download URL | dbTable-0.0.4-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4566b9854d591076c108b88472e57e405c261f4b56cdfe00a0c89adee81118b
|
|
BLAKE2b-256 checksum How to use checksums |
9d4565dc44f5ea8ee23be6789982361e58301c6081150c1a62c7423355dbca6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / dbTable-0.0.4-py2.py3-none-any.whl
| Download URL | dbTable-0.0.4-py2.py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a40d9feb8479e332b7f5bbe649fafbc8f310b68323fdebdc81261c9f8f31aba1
|
|
BLAKE2b-256 checksum How to use checksums |
a9556c303117b11ec1207f6e9fd3919905c628e50a4f6f0552f8cea94bdb24f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for dbTable 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.