Data Science, Machine Learning, Causal Inference, AI, Linear Programming.
assignments.append([i, j]) values.append([x[i, j].solution_value(), costs[i][j] * x[i, j].solution_value(), order_value[i][j]]) # Create a DataFrame from the collected data df = pd.DataFrame(assignments, columns=['customer', 'treatment']) df['assigned'] = [x[0] for x in values] df['cost'] = [x[1]