Notes:
-
Problem Solved: Calculates inventory turnover ratio to evaluate how efficiently inventory is managed.
-
Benefits: Helps identify slow-moving products, reduce holding costs, and improve working capital.
-
Adoption: Use this script in monthly financial reviews or ERP integration.
Python Code:
import pandas as pd
class TurnoverAnalyzer:
def __init__(self, inventory_df):
self.df = pd.DataFrame(inventory_df)
def calculate_turnover(self):
self.df['TurnoverRatio'] = self.df['COGS'] / self.df['AverageInventory']
self.df['DaysInInventory'] = 365 / self.df['TurnoverRatio']
return self.df[['SKU', 'TurnoverRatio', 'DaysInInventory']]
# Sample inventory data
data = [
{'SKU': 'Item001', 'COGS': 50000, 'AverageInventory': 10000},
{'SKU': 'Item002', 'COGS': 30000, 'AverageInventory': 5000},
{'SKU': 'Item003', 'COGS': 80000, 'AverageInventory': 16000},
]
analyzer = TurnoverAnalyzer(data)
result = analyzer.calculate_turnover()
print(result)
No comments:
Post a Comment