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.4.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.4-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mis_analytics-0.0.4.tar.gz
Algorithm Hash digest
SHA256 5bc0a2808d2bab6a47a5999757f96b82911e6a319273223140742457b0d90c9e
MD5 bfe0da1d468f7e82a3b0fbc34c020723
BLAKE2b-256 f84c172166c8b1ae56d65e31cd25fa86896ae8f5d336c662c008c268556f5a1f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mis_analytics-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 87d8413e502d2b69aaed0a7bd5cbcb2451c41e03d35ec55488f7ea0f9a285256
MD5 46969cff6340d3773eb2d07f42ac562e
BLAKE2b-256 57e37451e802c7431ced5c5afc4d557178db3da9ab0ceb2ceb86947dd5486918

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