'DataFrame' object has no attribute 'sort'

后端 未结 2 1434
慢半拍i
慢半拍i 2020-11-28 05:19

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\'

Anyo

2条回答
  •  抹茶落季
    2020-11-28 05:46

    sort() was deprecated for DataFrames in favor of either:

    • sort_values() to sort by column(s)
    • sort_index() to sort by the index

    sort() was deprecated (but still available) in Pandas with release 0.17 (2015-10-09) with the introduction of sort_values() and sort_index(). It was removed from Pandas with release 0.20 (2017-05-05).

提交回复
热议问题