I'm trying to concatenate two DataFrames created with pandas. The first one is obtained from a excel sheet (df) and the second is created after applying some operations with the data from "df".
The code that I've used for is:
pd.concat([df,df2], sort = False, ignore_index = True) print(df)
The problem is that the output from the concatenation is the following:
Bits Binario
A 0 2 4 8 9 NaN
B 0 2 5 8 9 NaN
C 0 2 4 5 8 9 NaN
D 0 2 6 8 9 NaN
E 0 2 4 6 8 9 NaN
F 0 2 5 6 8 9 NaN
G 02 4 5 6 8 9 NaN
H 0 2 7 8 9 NaN
I 0 2 4 7 8 9 NaN
0 NaN 789.0
1 NaN 805.0
2 NaN 821.0
3 NaN 837.0
4 NaN 853.0
5 NaN 869.0
6 NaN 884.0
7 NaN 901.0
8 NaN 917.0
What can I do? I look for the next output:
Bits Binario
A 0 2 4 8 9 789
B 0 2 5 8 9 805
C 0 2 4 5 8 9 821
D 0 2 6 8 9 837
E 0 2 4 6 8 9 853
F 0 2 5 6 8 9 869
G 02 4 5 6 8 9 884
H 0 2 7 8 9 901
I 0 2 4 7 8 9 917
Thank you!