Saturday, July 02, 2022

[Solved] frame.append method is deprecated and will be removed from pandas


Code:

all_results = all_results.append(current_result)


Error:

/var/folders/wh/tdg0ff9s1wl59234d5l27_gc0000gn/T/ipykernel_98654/2691205834.py:15: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.
  all_results = all_results.append(current_result)


Fix:

all_results = pd.concat([all_results, current_result])

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.