Stephen Sekula (steve@chirp.cooleysekula.net)'s status on Thursday, 21-Mar-2019 21:00:51 UTC
-
Stephen Sekula (steve@chirp.cooleysekula.net)'s status on Thursday, 21-Mar-2019 21:00:51 UTC 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')