I am working with an adult dataset where I split the dataframe to label encode categorical columns. Now I want to append the new dataframe with the original dataframe. What is the simplest way to perform the same?
Original Dataframe-
age | salary |
---|---|
32 | 3000 |
25 | 2300 |
After label encoding few columns
country | gender |
---|---|
1 | 1 |
4 | 2 |
I want to append the above dataframe and the final result should be the following.
age | salary | country | gender |
---|---|---|---|
32 | 3000 | 1 | 1 |
25 | 2300 | 4 | 2 |
Any insights are helpful.