Pass postgres data to pandas dataframe
Project description
DFTOPO
How to Install
pip install dftopo
Import into your code
from dftopo import dfps
Examples
Connection.
dbname='your_dbname'
user='your_user'
password='your_password'
host='your_host'
port='your_port'
schema='your_schema1,your_schema2'
engine = dfps.connection(dbname,user,password,host,port,schema)
Pure SQL.
query = f"""
SELECT * FROM your_schema1.your_table
"""
list(dfps.query_execution(query, engine))
Read data from postgres in python.
query = f"""
SELECT * FROM your_schema2.your_table
"""
df = dfps.read(query, engine)
Load data from python to Postgres.
dfps.load(df,"test2", engine,'your_schema1')
dfps.load(df,"test2", engine,'your_schema2')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dftopo-1.0.6.tar.gz
(2.8 kB
view details)
Built Distribution
File details
Details for the file dftopo-1.0.6.tar.gz
.
File metadata
- Download URL: dftopo-1.0.6.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 373bfb5d273dbc525918240072937a3c00d00f0c1cacf97560192eda1a404b05 |
|
MD5 | aa368e3652fd2fefef5f8bd086454daf |
|
BLAKE2b-256 | 5129c03ac833047d9ac4b3f96eea73493857664be8fee45092827f3d4011290f |
File details
Details for the file dftopo-1.0.6-py3-none-any.whl
.
File metadata
- Download URL: dftopo-1.0.6-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa160bc1bb9867d85e19c26e4a9ec52adc551632856d4da3291eb1d2890b1918 |
|
MD5 | c4b874eb4a062ee630a124fb04a854d9 |
|
BLAKE2b-256 | fa8fb737d6a275d32c91d860739a1289d3b84995df3b26caf5c7f357952a83fa |