sumproduct

specific sumproduct list comprehension in pandas

specific sumproduct list comprehension in pandas Question: suppose i have a dataframe df = pd.DataFrame({"age" : [0, 5, 10, 15, 20], "income": [5, 13, 23, 18, 12]}) age income 0 0 5 1 5 13 2 10 23 3 15 18 4 20 12 i want to iterate through df["income"] and calculate the sumproduct as …

Total answers: 3