I am trying to calculate the average opening price for a stock, depending on different periods (week, month, year).
Here you can see a part of my df : My dataframe (9