empty dataframes when appending series with for loop

I need to append many series to a dataframe (averages_per_trip) but am getting empty dataframes each time. It doesn't even work once. What gives? (reference Is it possible to append Series to rows of DataFrame without making a list first?)

1 answer

  • answered 2018-11-08 08:35 sdgaw erzswer

    The problem is with the append function. It does not update the initial dataframe, you must:

    df = df.append(stuff)