My current data is in the following monthly format:
DATE         HPI_F_ARIMA 
1987-01-01     63.967000
1987-02-01     64.42600
1987-03-01     64.736000             ...
...             ...
...             ...
2021-12-01      236.078323
--------Code so far----------
import pandas as pd
import matplotlib.pyplot as plt
if __name__ == '__main__':
    usdata = pd.read_csv('arima_forecast.csv')
    usdata['DATE'] = pd.to_datetime(usdata['DATE'])
    usdata.set_index('DATE', inplace = True)
print('monthly format')
print(usdata)
Question 1: How do I convert this so it's in the quarterly format whereby the monthly values are averaged for the relevant months in a quarter and Does the DATE column have the last date value of each quarter? The end goal is to get data in the following format, save it to a dataframe and then save the dataframe to a CSV file.
DATE         HPI_F_ARIMA 
1987-03-31     64.37
1987-06-30     ...
1987-09-30     ...
...             ...
...             ...
2021-12-31      ...
Also, how do I attach the CSV file I am using?
 
     
    