'DataFrame' object has no attribute 'sort'

I face some problem here, in my python package I have install numpy, but I still have this error 'DataFrame' object has no attribute 'sort'

Anyone can give me some idea..

This is my code :

    final.loc[-1] =['', 'P','Actual']
    final.index = final.index + 1  # shifting index
    final = final.sort()
    final = final.iloc[1:].reset_index(drop=True)
    final.columns.names = (None, None)

sort was deprecated for DataFrames in favor of needing to user either sort_values or sort_index. They're described here and here, respectively.

From: stackoverflow.com/q/44123874

Back to homepage or read more recommendations: