Improving readability of boolean indexing with the query method

Boolean indexing is not necessarily the most pleasant syntax to read or write, especially when using a single line to write a complex filter. Pandas has an alternative string-based syntax through the DataFrame query method that can provide more clarity.

The query DataFrame method is experimental and not as capable as boolean indexing and should not be used for production code.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset