Deep Developer Utilities
This package consists of developer utilities specifically used for data operations and handeling within deep air environment.
Package structure
deepair_dev_utils
.
├── general
│ ├── init.py
│ └── tools.py
├── init.py
└── loader
├── init.py
└── tools.py
2 directories, 5 files
Dependencies
Note: The following python3 packages are necessary for this package to run:
- numpy
- scipy
- pandas
- sklearn
- tqdm
Function Declarations
Here are the signatures for the functions in the package that can be used for deepair-dev.
general.py
Below are the functions that can be accessed by importing this module as from deepair_dev_utils.general.tools import <function_name>.
log:
def log(message):
'''
prints message on console
input :
message : msg to print (string)
'''
get_data:
def get_data(path):
'''
Single file loader function
input :
path : abs path to load from (string)
'''
daterange:
def daterange(s_date, e_date):
'''
To return a list of all the dates from
start date to end date (excluding end date)
input :
s_date : start date (datetime)
e_date : end date (datetime)
returns :
list of dates
'''
Loader
This subpackage contains tools for loading data as Handler.
Handler
Below are the functions that can be accessed by importing this module as from deepair_dev_utils.loader.tools import Handler.
Then create an object to access the fuctions. example obj = Handler() and then obj.<function_name>
__init__:
def __init__(self, verbose=True):
'''
Handlder (class) constructor.
inputs:
verbose: Indicator for log and progress bar (bool)
'''
loader:
def loader(self, dir_path, start_date, end_date,
prefix='', postfix='', ext='.csv'):
'''
Primary loader function to load the data from start date to
end date in concatinated (single dataframe) format.
inputs:
dir_path : absolute path to the directory path (series)
start_date : load start date in dd-mm-yyyy format (string)
end_date : load end date in dd-mm-yyyy format (string)
prefix : file prefix [if necessary] (string)
postfix : file postfix [if necessary] (string)
ext : file extension [default is .csv] (string)
return:
df: loaded concatenated dataframe (pandas df)
'''
single_loader:
def single_loader(self, dir_path, start_date, end_date,
prefix='', postfix='', ext='.csv'):
'''
Single loader function to load the data from start date to
end date in individual datewise (each dataframe is of one date)
format.
inputs:
dir_path : absolute path to the directory path (series)
start_date : load start date in dd-mm-yyyy format (string)
end_date : load end date in dd-mm-yyyy format (string)
prefix : file prefix [if necessary] (string)
postfix : file postfix [if necessary] (string)
ext : file extension [default is .csv] (string)
return:
data: list of data frames datewise (list)
'''
batch_loader:
def batch_loader(self, dir_path, start_date, end_date,
batch_size=1, prefix='', postfix='', ext='.csv'):
'''
Batch loader function to load the data from start date to
end date in batches (each dataframe is in the form of batch datewise)
format.
inputs:
dir_path : absolute path to the directory path (series)
start_date : load start date in dd-mm-yyyy format (string)
end_date : load end date in dd-mm-yyyy format (string)
batch_size : batch size (int)
prefix : file prefix [if necessary] (string)
postfix : file postfix [if necessary] (string)
ext : file extension [default is .csv] (string)
return:
data: list of data frames datewise (list)
'''
_load_action:
def _load_action(self, df):
'''
@abstractmethod
User defined Bottle neck pipeline within load.
NOTE -> Default job of this function is pass i.e. do nothing
inputs:
df: Dataframe to apply this method on (pandas df)
return:
df: Modified dataframe (pandas df)
'''
Metadata
Release files for deepair-dev-utils 0.0.2
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 |
|---|---|---|---|---|
| deepair_dev_utils-0.0.2.tar.gz | 4.4 kB | Without provenance | Details for deepair_dev_utils-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| deepair_dev_utils-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for deepair_dev_utils-0.0.2-py3-none-any.whl |
Total release size: 10.5 kB
Release files / deepair_dev_utils-0.0.2.tar.gz
| Download URL | deepair_dev_utils-0.0.2.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7d95a772162b55c13ed2df979c96c9e02cfa1a6eaefd6988e276292ba207f9d2
|
|
BLAKE2b-256 checksum How to use checksums |
4845ca64fb59ac90f1249993be8c98be8ff929f6587f18fb4d123aa0ece144f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/2.7.12
|
Release files / deepair_dev_utils-0.0.2-py3-none-any.whl
| Download URL | deepair_dev_utils-0.0.2-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
640efefcccfa8e3fa9e255662c31798ed43e225526086fdb5c7bc87f4cdf8ac0
|
|
BLAKE2b-256 checksum How to use checksums |
5bd82ff64fd704bf8145f6a5859975ae8192fadc7a7413720b9e6f1379c88ad9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/2.7.12
|
Security for deepair-dev-utils 0.0.2
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.