|

楼主 |
发表于 2025-2-4 08:18:10
|
显示全部楼层
Index(['交易时间', '交易类型', '交易对方', '商品', '收/支', '金额(元)', '支付方式', '当前状态'], dtype='object')
Traceback (most recent call last):
File "D:/bcpyqt/game/excelfish02.py", line 15, in <module>
df_sorted = df.sort_values(by='交易对方')
File "F:\python3.8x64\lib\site-packages\pandas\core\frame.py", line 6779, in sort_values
indexer = nargsort(
File "F:\python3.8x64\lib\site-packages\pandas\core\sorting.py", line 429, in nargsort
indexer = non_nan_idx[non_nans.argsort(kind=kind)]
TypeError: '<' not supported between instances of 'int' and 'str' |
|