Use neutral data split and filename for subreddit directory
Browse files- README.md +5 -5
- conversion-manifest.json +1 -1
- convert.py +1 -1
- data/{train-00000-of-00001.parquet → data.parquet} +0 -0
README.md
CHANGED
|
@@ -14,7 +14,7 @@ tags:
|
|
| 14 |
configs:
|
| 15 |
- config_name: default
|
| 16 |
data_files:
|
| 17 |
-
- split:
|
| 18 |
path: data/*.parquet
|
| 19 |
---
|
| 20 |
|
|
@@ -28,7 +28,7 @@ The dataset contains **395,018 rows and 12 columns** of subreddit names, descrip
|
|
| 28 |
|
| 29 |
## Data and preservation
|
| 30 |
|
| 31 |
-
The single file `data/
|
| 32 |
|
| 33 |
All original column names, parsed cell values, row order, and column order are preserved. No rows were filtered, deduplicated, added, or reordered. No descriptions were rewritten, combined, trimmed, or filled in. Existing rules and other auxiliary columns are retained.
|
| 34 |
|
|
@@ -58,7 +58,7 @@ The conversion was verified by comparing **every cell of every row** with the or
|
|
| 58 |
```python
|
| 59 |
from datasets import load_dataset
|
| 60 |
|
| 61 |
-
dataset = load_dataset("semvec/subreddits-directory", split="
|
| 62 |
print(dataset.column_names)
|
| 63 |
print(dataset[0])
|
| 64 |
```
|
|
@@ -67,7 +67,7 @@ For incremental reading:
|
|
| 67 |
|
| 68 |
```python
|
| 69 |
dataset = load_dataset(
|
| 70 |
-
"semvec/subreddits-directory", split="
|
| 71 |
)
|
| 72 |
row = next(iter(dataset))
|
| 73 |
```
|
|
@@ -79,7 +79,7 @@ Consumers can explicitly parse numeric or date columns for their own analysis. N
|
|
| 79 |
Download directly from this repository with the Hugging Face CLI:
|
| 80 |
|
| 81 |
```bash
|
| 82 |
-
hf download semvec/subreddits-directory data/
|
| 83 |
```
|
| 84 |
|
| 85 |
The repository also includes `convert.py`, the CSV-to-Parquet conversion and validation script used to prepare this edition. It is not needed to load or download the dataset.
|
|
|
|
| 14 |
configs:
|
| 15 |
- config_name: default
|
| 16 |
data_files:
|
| 17 |
+
- split: data
|
| 18 |
path: data/*.parquet
|
| 19 |
---
|
| 20 |
|
|
|
|
| 28 |
|
| 29 |
## Data and preservation
|
| 30 |
|
| 31 |
+
The single file `data/data.parquet` uses Zstandard compression and is 183,178,103 bytes (approximately 183 MB). The `data` split contains the entire table. It is a general-purpose directory of subreddit metadata, with no predefined task or evaluation partition.
|
| 32 |
|
| 33 |
All original column names, parsed cell values, row order, and column order are preserved. No rows were filtered, deduplicated, added, or reordered. No descriptions were rewritten, combined, trimmed, or filled in. Existing rules and other auxiliary columns are retained.
|
| 34 |
|
|
|
|
| 58 |
```python
|
| 59 |
from datasets import load_dataset
|
| 60 |
|
| 61 |
+
dataset = load_dataset("semvec/subreddits-directory", split="data")
|
| 62 |
print(dataset.column_names)
|
| 63 |
print(dataset[0])
|
| 64 |
```
|
|
|
|
| 67 |
|
| 68 |
```python
|
| 69 |
dataset = load_dataset(
|
| 70 |
+
"semvec/subreddits-directory", split="data", streaming=True
|
| 71 |
)
|
| 72 |
row = next(iter(dataset))
|
| 73 |
```
|
|
|
|
| 79 |
Download directly from this repository with the Hugging Face CLI:
|
| 80 |
|
| 81 |
```bash
|
| 82 |
+
hf download semvec/subreddits-directory data/data.parquet --repo-type dataset --local-dir subreddits-directory
|
| 83 |
```
|
| 84 |
|
| 85 |
The repository also includes `convert.py`, the CSV-to-Parquet conversion and validation script used to prepare this edition. It is not needed to load or download the dataset.
|
conversion-manifest.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
"source_bytes": 397566769,
|
| 5 |
"source_sha256": "a449ece09a2115e8eba670a0d00cc0cca734b4b3d85d289dcd5f6f2becd833b1",
|
| 6 |
"source_license_identifier": "reddit-api",
|
| 7 |
-
"parquet_file": "data/
|
| 8 |
"parquet_bytes": 183178103,
|
| 9 |
"parquet_sha256": "20cd09b4fed1c12bd316574c43a0ebaae0beb27b75c74d58c1057eb2104a0746",
|
| 10 |
"row_count": 395018,
|
|
|
|
| 4 |
"source_bytes": 397566769,
|
| 5 |
"source_sha256": "a449ece09a2115e8eba670a0d00cc0cca734b4b3d85d289dcd5f6f2becd833b1",
|
| 6 |
"source_license_identifier": "reddit-api",
|
| 7 |
+
"parquet_file": "data/data.parquet",
|
| 8 |
"parquet_bytes": 183178103,
|
| 9 |
"parquet_sha256": "20cd09b4fed1c12bd316574c43a0ebaae0beb27b75c74d58c1057eb2104a0746",
|
| 10 |
"row_count": 395018,
|
convert.py
CHANGED
|
@@ -23,7 +23,7 @@ def sha256(path):
|
|
| 23 |
def convert(source, output):
|
| 24 |
csv.field_size_limit(sys.maxsize)
|
| 25 |
output.mkdir(parents=True, exist_ok=True)
|
| 26 |
-
target = output / "data" / "
|
| 27 |
target.parent.mkdir(parents=True, exist_ok=True)
|
| 28 |
row_count = 0
|
| 29 |
with source.open(encoding="utf-8", newline="") as stream:
|
|
|
|
| 23 |
def convert(source, output):
|
| 24 |
csv.field_size_limit(sys.maxsize)
|
| 25 |
output.mkdir(parents=True, exist_ok=True)
|
| 26 |
+
target = output / "data" / "data.parquet"
|
| 27 |
target.parent.mkdir(parents=True, exist_ok=True)
|
| 28 |
row_count = 0
|
| 29 |
with source.open(encoding="utf-8", newline="") as stream:
|
data/{train-00000-of-00001.parquet → data.parquet}
RENAMED
|
File without changes
|