Skip to main content

Helpers for data work in supply chain analytics (and others?)

Project description

mis_analytics

This file will become your README and also the index of your documentation.

Developer Guide

If you are new to using nbdev here are some useful pointers to get you started.

Install mis_core in Development mode

# make sure mis_core package is installed in development mode
$ pip install -e .

# make changes under nbs/ directory
# ...

# compile to have changes apply to mis_core
$ nbdev_prepare

Usage

df = get_demo_data()
df
<style scoped> .dataframe tbody tr th:only-of-type { vertical-align: middle; } .dataframe tbody tr th { vertical-align: top; } .dataframe thead th { text-align: right; } </style>
order_id product quantity defects production_time
0 101 Widget A 50 2 120
1 102 Widget B 30 1 95
2 103 Widget A 75 3 150
3 104 Widget C 20 0 80
4 105 Widget B 45 2 110
@track
def aggregate_by_product(df):
    return df.groupby(["product"])[["quantity", "defects", "production_time"]].sum()
@track
def filter_products(df):
    return df[df["product"] != "Widget C"]
steps = [
    (filter_products, {'vrbs':True}),
    (aggregate_by_product, {}),
]
_df = pipeline(df, steps, vrbs_default=False)
*************** filter_products ***************
Total Time: 1.75 ms

Start: 2025-12-18 16:05:55.759474
  End: 2025-12-18 16:05:55.761225

Input DataFrame:
  order_id   product quantity defects production_time
0      101  Widget A       50       2             120
1      102  Widget B       30       1              95
2      103  Widget A       75       3             150
         :         :        :       :               :
3      104  Widget C       20       0              80
1      102  Widget B       30       1              95
4      105  Widget B       45       2             110
0      101  Widget A       50       2             120
2      103  Widget A       75       3             150
         :         :        :       :               :
2      103  Widget A       75       3             150
3      104  Widget C       20       0              80
4      105  Widget B       45       2             110

        Input:   5 rows, 5 cols
                     ↓       ↓
        Diff:   -1 rows, 0 cols
                     ↓       ↓
        Output:  4 rows, 5 cols
        
Output DataFrame:
  order_id   product quantity defects production_time
0      101  Widget A       50       2             120
1      102  Widget B       30       1              95
2      103  Widget A       75       3             150
         :         :        :       :               :
4      105  Widget B       45       2             110
0      101  Widget A       50       2             120
2      103  Widget A       75       3             150
1      102  Widget B       30       1              95
         :         :        :       :               :
1      102  Widget B       30       1              95
2      103  Widget A       75       3             150
4      105  Widget B       45       2             110

Installation

Install latest from the GitHub repository:

$ pip install git+https://github.com/MIS-Analytics/mis_analytics.git

or from pypi

$ pip install mis_analytics

Documentation

Documentation can be found hosted on this GitHub repository’s pages. Additionally you can find package manager specific guidelines on pypi.

How to use

Fill me in please! Don’t forget code examples:

1+1
2

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

mis_analytics-0.0.3.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mis_analytics-0.0.3-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file mis_analytics-0.0.3.tar.gz.

File metadata

  • Download URL: mis_analytics-0.0.3.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for mis_analytics-0.0.3.tar.gz
Algorithm Hash digest
SHA256 2dd3f2e1ceace4afedfea3c6fd8427fd5a22e66c12bb088843f62d182c09e56e
MD5 e8f66a88b5d1a40822e85bef4ed76a53
BLAKE2b-256 7e44d35d63fd67bae17bbdf45c3bbcdeda0688c406671b34b6caa6e5eeb94f02

See more details on using hashes here.

File details

Details for the file mis_analytics-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: mis_analytics-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for mis_analytics-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 21acec431e9795c1f96839d5a31aaf5a78d6342b99c79f2e14a7c69f396ee03b
MD5 029ab93904a77ad6025c18b424c37ae2
BLAKE2b-256 acbe0c84e43bf8e1d8169b8f868154c0e563d39b0bcd32a350ab12ab7b3a21a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page