Python Forum
append dataframes in loop
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
append dataframes in loop
#2
df1.append returns a new object So, change lines 5-8 to
    df1 = df1.append(df_temp1, ignore_index = True)
    df_temp2 = get_df2(i)
    df2 = df2.append(df_temp2,ignore_index=True)
and it will work fine.
Reply


Messages In This Thread
append dataframes in loop - by ghena - Feb-17-2020, 11:25 AM
RE: append dataframes in loop - by jefsummers - Feb-17-2020, 08:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Merging two DataFrames based on indexes from two other DataFrames lucinda_rigeitti 0 1,746 Jan-16-2020, 08:36 PM
Last Post: lucinda_rigeitti

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020