This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!
Project Description

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:

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

  1. Load dbTable into your interpreter/project
import dbTable
  1. Make a connection to a database
db = Database('test.db') # Replace with your database or use ":memory:" to load an in-memory database
  1. Select a table:
table1 = db['table1']
  1. 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

Release History

Release History

0.0.4

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
dbTable-0.0.4-py2.py3-none-any.whl (11.2 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Dec 1, 2015
dbTable-0.0.4-py3-none-any.whl (11.2 kB) Copy SHA256 Checksum SHA256 py3 Wheel Dec 1, 2015
dbTable-0.0.4.tar.gz (10.9 kB) Copy SHA256 Checksum SHA256 Source Dec 1, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting