I have two csv files and I want to make them to be one csv file
df1: aa bb cc 0 65 33 A 1 50 32 B 2 40 23 C df2: 0 1 2 0 70 40 7 1 50 30 8 2 40 23 9
the result should like this:
aa bb cc 0 1 2 0 65 33 A 70 40 7 1 50 32 B 50 30 8 2 40 23 C 40 23 9 but I get this: aa bb cc Unnamed 0 1 2 0 65 33 A 0 70 40 7 1 50 32 B 1 50 30 8 2 40 23 C 2 40 23 9
here's my code:
df_new = pd.concat([df1, df3], axis=1)
result = df_new.to_csv("C:/Users/AZ/.spyder-py3/DATASET1/new.csv")
Can anyone help?