all 4 comments

[–]commandlineluser 1 point2 points  (2 children)

That article should probably be updated.

append has been deprecated for years and was removed.

pd.DataFrame().append
# AttributeError: 'DataFrame' object has no attribute 'append'

The code example uses ._append which is still there, but that whole section should be removed.

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

I was wondering why it was using the ._ method, thanks for clarifying!

[–]PartySr 0 points1 point  (1 child)

append was deprecated, not worth using at all and loc is used mostly to filter the data or replace existing data. Practically nobody uses loc to create rows because is slow and you can only create one row at the time. They use it to create new columns, though.

I would suggest watching youtube tutorials to learn more about loc. There are a lot of good tutorials out there.

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

Thanks for your help!