I have a dataset where I would like to convert the values within a specific column to a long date. The long date will always be the first of the first month of that quarter.
**Ex. Q122 = 1/1/2022, Q222 = 4/1/2022, Q322 = 7/1/2022, Q422 = 10/1/2022**
Data
ID Date Location
AA Q123 NY
BB Q425 CA
CC Q226 NY
CC Q326 NY
Desired
ID Date Location LongDate
AA Q123 NY 1/1/2023
BB Q425 CA 10/1/2025
CC Q226 NY 4/1/2026
CC Q326 NY 7/1/2026
Doing
df['Date'] = pd.PeriodIndex(qs, freq='Q').to_timestamp()
Error is unable to parse. I am thinking there has to be initial conversion here. Researching this, any suggestion is appreciated.