You may have heard another pandas user mention using eval and query to speed up evaluation of expressions in pandas. While use of these functions can speed up evaluation of expressions, it cannot do it without the help of a very important library: NumExpr. Use of these functions without installing NumExpr can actually cause a performance hit. In order to understand how NumExpr is able to speed up calculations however, we need to take a deep dive into the architecture of a computer.
8. Performance Improvements Beyond pandas
Get Thinking in Pandas: How to Use the Python Data Analysis Library the Right Way now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.