Using pandas as db in python
Project description
Using Pandas as database in python
Using Pandas (Parquet) as database in python
Method
- set_owner
- set_debug
- cols
- filter
- update
- insert
- upsert
- save
- load
Sample
Table
class User(pddb.pdtbl):
def init_obj(self) -> dict:
path = "./data/users.parquet"
obj = {"uid": {"type": str, "uuid": True, "ignupd": True},
"usr_cde": {"type": str, "key": True},
"usr_name": {"type": str}}
return (obj, path)
class Password(pddb.pdtbl):
def init_obj(self) -> dict:
path = "./data/passwords.parquet"
obj = {"uid": {"type": str, "uuid": True, "key": True, "ignupd": True},
"password": {"type": str, "require": True, "md5": True}}
return (obj, path)
View
class VW_User_Password(pddb.pdvw):
def init_obj(self) -> dict:
usr = User()
pwd = Password()
cfg = {"source": [{"name": "usr", "tbl": usr}, {"name": "pwd", "tbl": pwd, "join": ["uid"]}],
"cols": [{"tbl": "usr", "col": "uid"}, {"tbl": "usr", "col": "usr_cde"}, {"tbl": "pwd", "col": "password"}]}
return cfg
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pddb-genwch-0.0.4.tar.gz
(6.1 kB
view details)
Built Distribution
File details
Details for the file pddb-genwch-0.0.4.tar.gz
.
File metadata
- Download URL: pddb-genwch-0.0.4.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61cb9cbcd49f09645720f68123aca96b7d51952c64101205b327cecd6aaa12ed |
|
MD5 | 607ec5e54c4793aef414452ad48a8616 |
|
BLAKE2b-256 | 8cde01988d44d8e4a28c60873e5542aecd9ea89f1a41dfc547fef0d4bbbf9a15 |
Provenance
File details
Details for the file pddb_genwch-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: pddb_genwch-0.0.4-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb5e7a4def23b644d006843f1e97585d0a880cff08e5791a88725f9064ec31ea |
|
MD5 | fc886608a5d07e690a7db1316d778c1b |
|
BLAKE2b-256 | 7f40286d912b391125be068f44e65bb5d9f87891e8af9f1068afd12f1ac8b4f3 |