I would like to add for each category within the Customer_Acquisition_Channel
column all values in Days_To_Acquisition
column to a separate df.
All Customer_ID vales are unique in dataset below
DF
Customer_ID Customer_Acquisition_Channel Days_To_Acquisition
323 Organic 2
583 Organic 5
838 Organic 2
193 Website 7
241 Website 7
642 Website 1
Desired Output: Days_To_Acq_Organic_Df
Index Days_To_Acquisition
0 2
1 5
2 2
Days_To_Acq_Website_Df
Index Days_To_Acquisition
0 7
1 7
2 1
This is what I have tried so far, but I would like to use a for loop instead going through each column manually
sub_1 = df.loc[df['Customer_Acquisition_Channel'] == 'Organic']
Days_To_Acq_Organic_Df=sub_1[['Days_To_Acquisition']]
sub_2 = df.loc[df['Customer_Acquisition_Channel'] == 'Website']
Days_To_Acq_Website_Df=sub_2[['Days_To_Acquisition']]