我正在学习bokeh
并从真正的python学习a tutorial
在教程中,它将一个排名数据集子集为两个团队,并生成以下结果。我得到了完全相同的结果,只是我的game won列被转换为NaN
。你知道为什么会这样吗
west_top_2 = standings[(standings['teamAbbr'] == 'HOU') | (standings['teamAbbr'] == 'GS')]\
.loc[:,['stDate','teamAbbr','gamewon']].sort_values(['teamAbbr','stDate'])
stDate teamAbbr gameWon
9 2017-10-17 GS 0
39 2017-10-18 GS 0
69 2017-10-19 GS 0
99 2017-10-20 GS 1
129 2017-10-21 GS 1
我的输出
stDate teamAbbr gamewon
9 2017-10-17 GS NaN
39 2017-10-18 GS NaN
69 2017-10-19 GS NaN
99 2017-10-20 GS NaN
129 2017-10-21 GS NaN
你的陈述中有一个拼写错误,这是正确的:
你少了一个括号和一个大写的“W”
相关问题 更多 >
编程相关推荐