I am working with a large dataset and I had to clean some rows, so the indices are now not followed, as some are missing. Now I have:
A
2 2
5 4
7 5
8 6
17 6
21 8
No matter what the column A means, I had to work with it, split it and transform it. So, in the end, I had two variables resulting from that operations (A_case1, A_case2) where:
print(A_case1)
2 4
7 2
17 3
21 2
print(A_case2)
5 2
8 1
But now I want to merge these two variables and join to the original dataframe. So I want the final result to be:
A A_case1_Case2
2 2 4
5 4 2
7 5 2
8 6 1
17 6 3
21 8 2
I have already tried pd.concat but it is not possible to join to the dataframe. Can anyone help me, please?