![](/img/trans.png)
[英]Python: TypeError: '<' not supported between instances of 'str' and 'int'
[英]TypeError: '>' not supported between instances of 'str' and 'int' in Python
df1['ProgSkills'<4]
这实际上将字符串ProgSkills
与数字 4 进行比较。
你本来打算做的
df1[df1['ProgSkills']<4]
它将ProgSkills
列中的每个值与数字 4 进行比较。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.