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.2.tar.gz (15.2 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.2-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mis_analytics-0.0.2.tar.gz
  • Upload date:
  • Size: 15.2 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.2.tar.gz
Algorithm Hash digest
SHA256 c75eb6a1797e1e660d9fe31b7b2f490534714acd1e31b98c0ade94688095c263
MD5 0d79b3e1af94756954b25dac9f24bf4e
BLAKE2b-256 8bf84d3f3cf89aa7769fe770f0091f98d6b283338bceb72e5c423f418ee70ae9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mis_analytics-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 44c4b770bfd4b9c3991771a3ab8e855a33bcacb48a36b7f127f6aed748dc6ea1
MD5 5a684dc774cef51f47a38a4adc7d07bc
BLAKE2b-256 83ab9572ddd98930de314276ce8f3003515d80ed5541e1b4b747f2b6ee5b1a0a

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