anhchanghoangsg/reddit_pushshift_dataset_cleaned
๐ Cleaned Reddit Pushshift Dataset (Parquet) ๐ Dataset Description This dataset is a highly optimized, meticulously cleaned, and structured version of the raw Reddit Pushshift dump. It has been transformed from massive .zst compressed JSON files into highly efficient, columnar Parquet files, making it immediately ready for Big Data analytics, SQL querying (via DuckDB), and Large Language Model (LLM) training. The dataset includes both Reddit Submissions (Posts)โฆ See the full description on the dataset page: https://huggingface.co/datasets/anhchanghoangsg/reddit_pushshift_dataset_cleaned.
๐ Cleaned Reddit Pushshift Dataset (Parquet)
๐ Dataset Description
This dataset is a highly optimized, meticulously cleaned, and structured version of the raw Reddit Pushshift dump. It has been transformed from massive .zst compressed JSON files into highly efficient, columnar Parquet files, making it immediately ready for Big Data analytics, SQL querying (via DuckDB), and Large Language Model (LLM) training.
The dataset includes both Reddit Submissions (Posts) and Comments.
๐งน Data Cleaning & Preprocessing Pipeline
Unlike the raw Pushshift dump which contains heavy noise, this dataset has been processed through a strict ETL pipeline:
- Dead Data Removal: - Completely dropped rows where the
author,selftext, orbodyis[deleted],[removed], orNone. - Dropped comments missing essential relation links (
link_id,parent_id). - Noise & Encoding Fixes:
- Filtered out submissions containing severe Unicode/font errors (e.g.,
\ufffdcharacters). - Data Type Normalization:
- Converted raw Unix timestamps (
created_utc) into readableYYYY-MM-DDstring format. - Safely cast numerical fields (
score,num_comments,upvote_ratio, etc.) to strict Integer/Float types to prevent schema crashing. - Handled missing text fields by filling them with
"None"to ensure consistent string types. - NSFW & Sensitive Content Filtering:
- Applied a smart Regex and CamelCase keyword filter to automatically identify and exclude highly sensitive or purely NSFW subreddits from the repository.
- Storage Optimization (The "Small File" Fix):
- Micro-files (under 1MB) representing inactive subreddits were skipped. This prevents the "Small File Problem" in Parquet storage, ensuring the Hugging Face Data Viewer and distributed computing frameworks (like Apache Spark) run at lightning speed.
๐๏ธ Dataset Structure (Schema)
๐ Submissions (Posts)
๐ฌ Comments
๐ป How to Use
You can easily load this dataset using the Hugging Face datasets library. Since it's stored in Parquet, it will stream efficiently.
from datasets import load_dataset
# Load the dataset (Streaming mode is recommended due to massive size)
dataset = load_dataset("anhchanghoangsg/reddit_pushshift_dataset_cleaned", streaming=True)
# Print the first row of the train split
print(next(iter(dataset['train'])))