Conversation:
Notices
-
Stephen Sekula (steve)'s status on Thursday, 21-Mar-2019 17:00:51 EDT Stephen Sekula From ben_j_lindsay https://twitter.com/ben_j_lindsay on Twitter: One of the most underrated #Pandas functions in #Python is `.query()`. I use it all the time. data = data.query('age==42') looks so much nicer than: data = data[data['age'] == 42] And it allows chaining like: data = data.query('age >18').query('age < 32')