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

single

bookChallenge: Analyze Inventory Health

Swipe um das Menü anzuzeigen

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.

Aufgabe

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.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 5
single

single

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

some-alt