Skip to main content

canomaly

Searching for cumulative anomalies.

Open Source Love Documentation Status PyPI version PyPI - Downloads License Code style: Black

Project Description

This package detects specific types of anomalies with an emphasis in looking for cumulative changes.

Installation

This package can be installed through PyPi using

pip install canomaly

or

pip3 install canomaly

Example Usage

>>> import pandas as pd
>>> from canomaly.searchtools import cumrexpy
>>> # Get some data
>>> data = {
            'date': [
                '2018-11-20',
                '2018-11-21',
                '2018-11-22',
                '2018-11-22',
                '2018-11-23',
                '2018-11-24'],
            'email': [
                'john.doe@example.com',
                'jane.smith@example.com',
                'bob-johnson_123@example.com',
                'sarah@mydomain.co.uk',
                'frank@mydomain.com',
                'jessica_lee@mydomain.com'
                    ]
            }
>>> df = pd.DataFrame(data)
>>> df['date'] = pd.to_datetime(df['date'])
>>> # Extract regular expressions
>>> cumrexpy(df, 'email', 'date')
date
2018-11-20                           [^john\.doe@example\.com$]
2018-11-21                [^[a-z]{4}\.[a-z]{3,5}@example\.com$]
2018-11-22    [^[a-z]{4,5}[.@][a-z]+[.@][a-z]+\.[a-z]{2,3}$,...
2018-11-23    [^frank@mydomain\.com$, ^[a-z]{4,5}[.@][a-z]+[...
2018-11-24    [^frank@mydomain\.com$, ^[a-z]+[.@_][a-z]+[.@]...
Name: email_grouped, dtype: object

We can look at the results in markdown for clarity.

date email_grouped
2018-11-20 00:00:00 ['^john\.doe@example\.com$']
2018-11-21 00:00:00 ['^[a-z]{4}\.[a-z]{3,5}@example\.com$']
2018-11-22 00:00:00 ['^[a-z]{4,5}[.@][a-z]+[.@][a-z]+\.[a-z]{2,3}$', '^bob\-johnson_123@example\.com$']
2018-11-23 00:00:00 ['^frank@mydomain\.com$', '^[a-z]{4,5}[.@][a-z]+[.@][a-z]+\.[a-z]{2,3}$', '^bob\-johnson_123@example\.com$']
2018-11-24 00:00:00 ['^frank@mydomain\.com$', '^[a-z]+[.@_][a-z]+[.@][a-z]+\.[a-z]{2,3}$', '^bob\-johnson_123@example\.com$']

Build Documentation Locally

cd /path/to/canomaly/docs
make html

Star History Chart

Metadata

Release files for canomaly 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for canomaly 0.0.5
File Size Uploaded Provenance Actions
canomaly-0.0.5.tar.gz 16.4 kB Without provenance Details for canomaly-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for canomaly 0.0.5
File Interpreter ABI Platform Actions
canomaly-0.0.5-py3-none-any.whl Python 3 none any Details for canomaly-0.0.5-py3-none-any.whl

Total release size: 32.3 kB

Release files / canomaly-0.0.5.tar.gz

Download URL canomaly-0.0.5.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c8f351804bac05517db16ecdea6096df46b0b0953d042e884a8823a5d0bb8fac
BLAKE2b-256 checksum
How to use checksums
819aaf0e677cd96f018fbd7fa36a465f12a4e9fc7c4e2a647155a958063a33d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / canomaly-0.0.5-py3-none-any.whl

Download URL canomaly-0.0.5-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7e8e051e7eeb32cff612ad117265bb7c5470d360bf1d2e92eb4245c3b6d729a
BLAKE2b-256 checksum
How to use checksums
06f940ba3f14fb9b6bf9ca237761d1f69b6a0e702461a4aca4d35ed3c21b8e74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Security for canomaly 0.0.5

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page