Reputation: 15691
How can I put this code into one line?
game = data[(data.date==test_day)]
game = game.loc[game.index[0]]
Upvotes: 1
Views: 2911
Reputation: 2979
I was just writing the same thing
game = data[(data.date==test_day)].iloc[game.index[0]]
Upvotes: 0