Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Challenge: Analyze Inventory Health | Supply Chain Data Analysis
Practice
Projects
Quizzes & Challenges
Quizzen
Challenges
/
Python for Supply Chain
Sectie 1. Hoofdstuk 5
single

single

bookChallenge: Analyze Inventory Health

Veeg om het menu te tonen

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.

Taak

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.

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 1. Hoofdstuk 5
single

single

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

some-alt