Data Science, Simulation, Deep Dives, Hands On Tutorials, Product Analytics.
def get_total_demand_model(raw_demand_est_model_df, capacity = 1000): demand_est_model_df = raw_demand_est_model_df.pivot(index = 'date', columns = 'segment', values = 'users') demand_est_model_df['total_demand'] = demand_est_model_df.sum(axis = 1) demand_est_model_df['capacity'] = capacity