I have a dataframe, df, that contains two columns that contain quarter values. I would like to create two more columns that are the equivalent "long dates".
Data
ID Quarter Delivery
A Q1 2022 Q3 2022
A Q1 2022 Q3 2022
B Q1 2022 Q3 2022
B Q1 2022 Q3 2022
Desired
ID Quarter Delivery QuarterFull DeliveryFull
A Q1 2022 Q3 2022 1/1/2022 07/1/2022
A Q1 2022 Q3 2022 1/1/2022 07/1/2022
B Q4 2022 Q2 2023 10/1/2022 04/1/2023
B Q4 2022 Q2 2023 10/1/2022 04/1/2023 Q1 is 01
Q2 is 04
Q3 is 07
Q4 is 10
Doing
My approach/logic is to create variables or a dictionary that holds or map to specific dates (key/value pairs)
dict = {"Q1": "01","Q2": "04","Q3": "07""Q4": "10"
}
Not exactly sure how to implement this as columns. I am still troubleshooting this. Any suggestion is appreciated