按照老师的代码执行报错AttributeError: 'DataFrame' object has no attribute 'sort'
执行到
print(df.sort(columns="C"))
报错
AttributeError Traceback (most recent call last)
<ipython-input-12-8629de499749> in <module>
----> 1 print(df.sort(columns="C"))
C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\generic.py in __getattr__(self, name)
5065 if self._info_axis._can_hold_identifiers_and_holds_name(name):
5066 return self[name]
-> 5067 return object.__getattribute__(self, name)
5068
5069 def __setattr__(self, name, value):
AttributeError: 'DataFrame' object has no attribute 'sort'