I have a dataframe that contains 4 columns (They are all part numbers). All I want is for this dataframe to have only 1 column that contains all the values from the 4 original columns (except the duplicates removed). This is what I have done. I don't get any error messages but for some reason I keep getting 4 columns instead of 1 single column when doing the merge. First I wrote this:
Supplier_Part_No = Supplier_Part_Numbers_Rename[['Supplier_Part_No']].copy()
Supplier_Part_No_1 = Supplier_Part_Numbers_Rename[['Supplier_Part_No..1']].copy()
Supplier_Part_No_2 = Supplier_Part_Numbers_Rename[['Supplier_Part_No..2']].copy()
Supplier_Part_No_3 = Supplier_Part_Numbers_Rename[['Supplier_Part_No..3']].copy()
That created 4 dataframes. Then I merge them back with the intention of getting one single column in a dataframe. I have no idea why it keeps giving me 4 instead, I also tried doing axis 1 that didn't help. No idea why its not giving me only 1 column but 4 instead:
Supplier_Parts_Combined = pd.concat([Supplier_Part_No, Supplier_Part_No_1,Supplier_Part_No_2, Supplier_Part_No_3], axis = 0)
Supplier_Parts_Combined