Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Filter by Categories
About Article
Analyze Data
Archive
Best Practices
Better Outputs
Blog
Code Optimization
Code Quality
Command Line
Course
Daily tips
Dashboard
Data Analysis & Manipulation
Data Engineer
Data Visualization
DataFrame
Delta Lake
DevOps
DuckDB
Environment Management
Feature Engineer
Git
Jupyter Notebook
LLM
LLM Tools
Machine Learning
Machine Learning & AI
Machine Learning Tools
Manage Data
MLOps
Natural Language Processing
Newsletter Archive
NumPy
Pandas
Polars
PySpark
Python Helpers
Python Tips
Python Utilities
Scrape Data
SQL
Testing
Time Series
Tools
Visualization
Visualization & Reporting
Workflow & Automation
Workflow Automation

Pandas

Leverage PyArrow for Efficient Parquet Data Filtering

When dealing with Parquet files in pandas, it is common to first load the data into a pandas DataFrame and then apply filters.

To improve query execution speed, push down the filers to the PyArrow engine to leverage PyArrow’s processing optimizations.

In the code above, filtering a dataset of 100 million rows using PyArrow is approximately 113 times faster than filtering using pandas.

Leverage PyArrow for Efficient Parquet Data Filtering Read More »

Efficiently Generate Falsified Examples for Unit Tests with Pandera and Hypothesis

Generating readable edge cases for unit tests can often be a challenging task. However, with the combined power of Pandera and Hypothesis, you can efficiently detect falsified examples and write cleaner tests.

Pandera allows you to define constraints for inputs and outputs, while Hypothesis automatically identifies edge cases that match the specified schema.

Hypothesis further simplifies complex examples until it finds a smaller example that still reproduces the issue.

Efficiently Generate Falsified Examples for Unit Tests with Pandera and Hypothesis Read More »

Version Your Pandas DataFrame with Delta Lake

To undo errors, avoid losing data, and reproduce results, it is crucial to implement a version control system for your data.

Delta Lake simplifies pandas DataFrame versioning and allows access to prior versions for auditing and debugging.

In the example above, Delta Lake creates two versions of a DataFrame. Version 0 contains the original data, while Version 1 includes the data that was appended.

Version Your Pandas DataFrame with Delta Lake Read More »

0
    0
    Your Cart
    Your cart is empty
    Scroll to Top

    Work with Khuyen Tran

    Work with Khuyen Tran