Sorting Data with pandas.DataFrame.sort_values
Pandas sort_values performance guide. Compare quicksort, mergesort, heapsort. Stable vs unstable sort. O(n log n) complexity, data types, memory impact.
The post Sorting Data with pandas.DataFrame.sort_values appeared first on Python Lore.
Beginning Programming for Dummies
Serving JSON Data with Flask
Flask API error handling for JSON. Custom JSON error responses for 404 and 500 status codes using @app.errorhandler instead of Flask's default HTML pages.
The post Serving JSON Data with Flask appeared first on Python Lore.
Celebrating Kim Parsell: 2025 WordCamp US Scholarship Applications Open
SQL Programming QuickStudy Laminated Reference Guide
Customizing Scoring and Evaluation Metrics in scikit-learn
The simple scorer you forged was a solid piece of work. It took y_true and y_pred and produced a number that meant something to the business. A fine tool. But some jobs require more specialized instruments. A simple comparison of...
The post Customizing Scoring and Evaluation Metrics in scikit-learn appeared first on Python Lore.
Choosing Your First Programming Language: Everything You Need to Know Before You Start Coding
Understanding Blocking and Non-blocking Socket Operations
Python non-blocking sockets with setblocking(False). Handle BlockingIOError exceptions for responsive I/O. Avoid busy-wait loops and CPU polling with recv().
The post Understanding Blocking and Non-blocking Socket Operations appeared first on Python Lore.
Customizing Matplotlib with Style Sheets
Matplotlib plot customization with rcParams, style sheets, and the matplotlibrc file. Settings hierarchy from plt.style.use, context managers, to function arguments.
The post Customizing Matplotlib with Style Sheets appeared first on Python Lore.