Mar-28-2020, 04:01 PM
Hi,
I have two csv files,
csv1:
csv2:
I want to read both files(ignore headers), and merge data:
desired output:
I use below code,
but they are not merging properly.
I have two csv files,
csv1:
1 2 |
c1 c2 c3 c4 c5 BB 2 5 6 O |
1 2 |
c7 c8 c9 c10 c11 C 0 2 0 L |
desired output:
1 2 |
BB 2 5 6 O C 0 2 0 L |
but they are not merging properly.
1 2 3 4 5 6 7 |
final_df = [] for filename in fList: df = pd.read_csv(filename, index_col = None , header = 0 ) print (df) print ( "--" * 12 ) final_df.append(df) df_concat = pd.concat(final_df, axis = 0 , ignore_index = True ) |