Final
Final
# Load the data (ensure the CSV has a 'Week' column for proper
parsing)
df = pd.read_csv("C:/Users/Tisha/Downloads/input.csv")
# Group by 'Round' and 'Week' to sum the required columns over the 5
days of each week for each round
weekly_sum = df.groupby(['Round', 'Week'])[['total order', 'demand of
retailer1', 'demand of retailer2']].sum().reset_index()
# Create subplots
fig, axs = plt.subplots(3, 1, figsize=(12, 18))
# Adjust layout
plt.tight_layout()
plt.show()
# Define target variables for demand1, demand2, and total orders
target_retailer1 = week_sum['demand of retailer1']
target_retailer2 = week_sum['demand of retailer2']
target_total_orders = week_sum['total order']
# Loop through each target variable and perform the ADF test
for name, target in targets.items():
result = adfuller(target)
print(f'ADF Statistic for {name}: {result[0]}')
print(f'p-value for {name}: {result[1]}')
import pmdarima as pm
import pandas as pd
import pmdarima as pm
import pandas as pd