I’m trying to add a dictionary as a new row to a DataFrame, but I keep getting the error: AttributeError: ‘DataFrame’ object has no attribute ‘append’
I thought append() was valid for DataFrames, but it seems this no longer works. Here’s the line I’m using:
df = pd.DataFrame(df).append(new_row, ignore_index=True)
This used to work earlier, so why am I seeing ‘DataFrame’ object has no attribute ‘append’ now? Has the method been deprecated in recent versions of pandas? What’s the current recommended way to add a row to a DataFrame?