redquill
Logging for pandas and more.
Description
There are functions specifically to log pandas dataframes as well as functions to count up the total number of errors and warnings.
Dependencies
- pandas: Tested on 0.20.3 and higher. May work for earlier versions.
Example
For this example, import both the customlogger and pandas.
import redquill as rq
import pandas as pd
Initialize the logger. Note, the logger always logs to the console by default. You may inrqude a log directory and the log file name, which will allow the logs to flow into a file as well.
log = rq.redquill()
The following will log any null values found in df.
df = pd.DataFrame({"A": [1, 2, None, 3],
"B": [4, 2, 2, 5]})
log.warn_null_values(df=df)
Console output.
2018-03-04 01:34:33,162 - 23512 - WARNING - test_redquill.test_warn_null_values -
A B
2 NaN 2
The following will log any duplicates found in column
B of df.
df = pd.DataFrame({"A": [1, 2, None, 3],
"B": [4, 2, 2, 5]})
log.warn_duplicate_values(df=df, subset="B", msg="Duplicates on B.")
Console output.
2018-03-04 02:29:41,419 - 31825 - WARNING - test_redquill.test_warn_duplicate_values - Duplicates on B.
A B
1 2.0 2
2 NaN 2
Metadata
Release files for redquill 0.0.1
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 | |
|---|---|---|---|---|
| redquill-0.0.1.tar.gz | 5.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| redquill-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.8 kB
Release files / redquill-0.0.1.tar.gz
| Download URL | redquill-0.0.1.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1e60228696beffeb14b4a72ca9c7f2ca6a8d77bbf4c0115a8c2691ea31d68d92
|
|
BLAKE2b-256 checksum How to use checksums |
1d416b5d04d92827f16f034d17cf98e072c0e1861d1a0e8fed4d1131080277ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.20.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1
|
Release files / redquill-0.0.1-py3-none-any.whl
| Download URL | redquill-0.0.1-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
817f3d982998543dc0d9226b6dd0d362a6b26f20c0459fd46a7b264c00727756
|
|
BLAKE2b-256 checksum How to use checksums |
5e1d875a949c747a0b5e9358913d7d6c72dfce33c8e8c8c3fe904e8b083bdea2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.20.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1
|
Security for redquill 0.0.1
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.