I have a dataframe named IND_Split as:
0 1 2 3 4 5 6
0 TY 50
1 TY XT 50
2 TY 100
3 TY 200
4 TY 500
What I desire : to get a concatenated single column based on a condition - "if the value in next column is not blank then concatenate with "%20" in between else do not concatenate next column"
Desired output must look like:
0
0 TY%2050
1 TY%20XT%2050
2 TY%20100
3 TY%20200
4 TY%20500
What I have tried:
IND_Concat = IND_Split[0] + "%20" if IND_Split[1]!='' else ''.....
IND_Concat.head()
Output I got :