Tools for working with an Oracle database from Pandas
Project description
This package includes methods for:
Running a specified query, passed in as a string, on an Oracle database and returning the result to a Pandas data frame.
Executing a command with no return data.
Inserting the contents of a Pandas data frame into an Oracle database table.
Installation
pip install oracle_db_tools
Overview
Sample usage:
from pandas_oracle.tools import query_to_df query = "select id, name from students where name like '%Oscar%'" query_to_df(query, "config.yml")
Returns:
ID NAME 0 3298272 Meyer,Oscar 1 2304928 Wilde,Oscar 2 7654321 Grouch,Oscar . ... ... 128 2234879 De La Hoya,Oscar 129 9872322 Peterson,Oscar 130 9082394 Sanchez,Oscar [131 rows x 2 columns]
Sample config file:
database: username: "OGROUCH" password: "SECR3TPASSWORD" host: > (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = servername.myschool.edu) (PORT = 1521) ) (CONNECT_DATA = (SERVER = DEDICATED) (SID = dbname) ) )
If you don’t wish to store your password in the configuration file, you can omit that line. If a password isn’t present in the configuration file, you will be prompted for it at runtime.
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
Built Distribution
File details
Details for the file pandas_oracle-1.1.0.tar.gz
.
File metadata
- Download URL: pandas_oracle-1.1.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e954b227167d625752f33f0c725d72bfb1d8f2b24a46dee59eb2478182b44868 |
|
MD5 | 38108f77aaba294e6ca5e7a4afc6cda2 |
|
BLAKE2b-256 | 164cec92e428370dd6b4eac9d108c2a620b73db4633b841194dbc20cb22e301b |
File details
Details for the file pandas_oracle-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: pandas_oracle-1.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93f6c26a7afd85bbca2d095424ced4fd47a51541e78049ef4630535bedc17963 |
|
MD5 | b6db5a43a1e73cb27c2bccc78801bda0 |
|
BLAKE2b-256 | 00d75d45d6c9bd2b888e548d58fad14394169f24fbec63e37b78df01afbbdd65 |