zl程序教程

您现在的位置是:首页 >  其它

当前栏目

成功解决TypeError: ‘method‘ object is not subscriptable

解决 not is 成功 object method TypeError
2023-09-14 09:04:34 时间

成功解决TypeError: ‘method‘ object is not subscriptable

目录

解决问题

解决思路

解决方法


解决问题

TypeError: 'method' object is not subscriptable

解决思路

类型错误:“方法”对象不可subscriptable,意思是你不该有下标的地方用了下标

解决方法

data_frame.replace['女','男']

改为

data_frame.replace('女','男')

哈哈,大功告成!