I'm working with a few DataFrames. One is pulling from a newer csv, with added columns, and continuing dates. However, most columns are the same. I would like to combine them, to get one DataFrame with all dates and all columns present?
the csvs are something like these, with some same columns and some different columns, but with all unique dates:
df1:
day alice bob
8/11 0 0
8/25 2 5
9/1 2 0
df2:
day alice charlie
9/12 1 1
9/25 2 3
9/1 2 1
resulting dataFrame should be something like this, with one column of dates and all columns present (i can convert NaN to fillna later, i just need to know how to combine):
df3:
day alice bob charlie
8/11 0 0 0
8/25 2 5 0
9/1 2 0 0
9/12 1 0 1
9/25 2 0 3
9/1 2 0 1
When I combine my actual 2 DataFrames with pd.concat, i get the following error:
AssertionError: Number of manager items must equal union of block items
# manager items: 65, # tot_items: 66
Not sure what the issue could be. In the meantime, thanks and you're awesome : )