Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
このコードを 1 行にまとめるにはどうすればよいですか?
game = data[(data.date==test_day)] game = game.loc[game.index[0]]
iloc代わりに使用
iloc
data[data.date == test_day].iloc[0]
ちょうど同じこと書いてた
game = data[(data.date==test_day)].iloc[game.index[0]]