I need to split 1 column value into 3 columns.
df['Campaign name']
0 US_FEMALE_20to30
1 US_MIX_35to45
2 US_FEMALE_20to30
3 US_MIX_35to45
4 US_MALE_30to35
5 US_MIX_35to45
so in the end, it will look like that
region gender age
0 US FEMALE 20to30
1 US MIX 35to45
2 US FEMALE 20to30
3 US MIX 35to45
4 US MALE 30to35
5 US MIX 35to45
thanks a lot
out=df['Campaign name'].str.split('_',expand=True)after that rename columnsout.columns=['region','gender','age']now if you print out you will get your output see the documentation of str.split