df.groupby("Prices")["Discounts"].mean() Prices 421.0 93.243137 415.0 91.830721 147.0 96.098335 451.0 98.308000 532.0 99.58