0

I am trying to combine multiple Excel Files using the pandas data frames. Normally I could use append or concat but as the documentation says this will create a new object and re-assign it back to you.

The other method which I came across is by using the loc method and do [df[len(df)] = df_dict for df_dict in def.to_dict('r')] where df is another dataframe which i edit on the go.

I wanted to know which method is better to use, considering that we use this for a large amount of data so whatever makes it more efficient

Nathan
  • 674
  • 8
  • 22
  • Did you check the `copy` parameter of the `concat` function ? – Mayeul sgc Sep 04 '19 at 07:33
  • it says `do not copy unnecessarily` however it does create a brand new dataframe object and return that to the calling convention. – Nathan Sep 04 '19 at 08:29
  • https://stackoverflow.com/questions/18295630/how-do-i-concatenate-pandas-dataframes-without-copying-the-data – Nathan Sep 04 '19 at 08:37

0 Answers0