Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Challenge: Analyze Inventory Health | Supply Chain Data Analysis
Python for Supply Chain
Sezione 1. Capitolo 5
single

single

bookChallenge: Analyze Inventory Health

Scorri per mostrare il menu

Before you tackle a real-world inventory health analysis, it is important to recall why tracking stock levels is essential for supply chain efficiency. Monitoring inventory across warehouses helps you spot products at risk of stockouts, avoid costly delays, and prioritize restocking efforts. Being proactive with restocking ensures that customer demand can be met without interruption and reduces the risk of lost sales or excess expedited shipping costs. By analyzing inventory data and visualizing low-stock products, you can quickly identify which items require urgent attention and communicate these findings clearly to your team.

123456789101112
import pandas as pd # Example inventory DataFrame data = { 'Product': ['Widget A', 'Widget B', 'Widget C', 'Widget D'], 'Warehouse 1': [15, 30, 8, 45], 'Warehouse 2': [3, 12, 6, 5], 'Warehouse 3': [2, 7, 4, 10] } inventory_df = pd.DataFrame(data) print(inventory_df)
copy

Your challenge is to use the inventory DataFrame above to perform a comprehensive inventory health analysis. Calculate the total stock for each product by summing inventory across all warehouses. Identify which products have a total stock below a threshold of 20 units—these are considered low-inventory items that may require urgent restocking. Create a bar chart visualizing the stock levels of only these low-inventory products, making it easy to compare which products are most at risk. Finally, print a summary listing the names of products that need urgent restocking, so that stakeholders can take immediate action. Use the pandas and matplotlib libraries as demonstrated previously.

Compito

Swipe to start coding

You are given a DataFrame with inventory levels for several products across three warehouses. Your task is to:

  • Calculate the total stock for each product by summing the stock across all warehouses.
  • Identify products with total stock at or below the threshold value (default is 20 units).
  • Visualize the stock levels of these low-inventory products using a bar chart.
  • Output a summary listing the names of all products that need urgent restocking.

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 5
single

single

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

some-alt