df_trend = df.groupby(["Trend"])
average_trades = df_trend["Total Traded Quantity"].mean()
print("The average traded quantity is: ", average_trades)
>>The average traded quantity is: Trend
Slight or No Change 1.635627e+06
Name: Total Traded Quantity, dtype: float64
But I have 9 types of trends in Trend
column, although I get only one type here in the output. How shall I proceed?