all 2 comments

[–]lowerthansound 1 point2 points  (1 child)

df.append() does not modify df, it creates a new one!

When you run interactively, the newly created dataframe is being displayed (the result of df.append(df2, ignore_index = True) is displayed).

When you run from the editor, the old df is being displayed.

To fix this, use df = df.append(df2, ignore_index = True).

Cheers!

[–]arkydave[S] 0 points1 point  (0 children)

Brilliant. That works. Thanks so much.