2024-10-01 19:25:28 发布
网友
对于每个程序,有多少人的编程技能知识少于4?为每个现有程序报告一行
df1['ProgSkills'<4].groupby(by=df1['Program']).count()
错误消息:
TypeError: '<' not supported between instances of 'str' and 'int'
数据帧:
df1['ProgSkills'<4]
这实际上是将字符串ProgSkills与数字4进行比较
ProgSkills
你本想这么做的
df1[df1['ProgSkills']<4]
将ProgSkills列中的每个值与数字4进行比较
这实际上是将字符串
ProgSkills
与数字4进行比较你本想这么做的
将
ProgSkills
列中的每个值与数字4进行比较相关问题 更多 >
编程相关推荐