Roronotalt
commited on
Commit
•
8e4c5cb
1
Parent(s):
1e46c37
Update README.md
Browse files
README.md
CHANGED
@@ -78,11 +78,29 @@ The dataset could be used for:
|
|
78 |
|
79 |
I have not been able to figure out how to parse the atproto image ref bytes into a image or blob url. I would appreciate a PR for that.
|
80 |
|
81 |
-
|
82 |
|
|
|
83 |
```bash
|
84 |
-
pip install pandas pyarrow
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
|
|
|
|
|
|
|
86 |
python -c "import pandas as pd;
|
87 |
df = http://pd.read_parquet('train-0000.parquet', engine='pyarrow');
|
88 |
http://df.to_csv('output_file.csv', index=False)
|
|
|
78 |
|
79 |
I have not been able to figure out how to parse the atproto image ref bytes into a image or blob url. I would appreciate a PR for that.
|
80 |
|
81 |
+
The dataset is meant to be downloaded with the huggingface load_dataset() function. From there you can either run the dataset as a iterable stream so you do not have to worry about memory or you can convert to a pandas dataframe.
|
82 |
|
83 |
+
Note that you will need the to install the following libraries:
|
84 |
```bash
|
85 |
+
pip install pandas pyarrow datasets huggingface_hub
|
86 |
+
```
|
87 |
+
|
88 |
+
To download/load the huggingface dataset:
|
89 |
+
```python
|
90 |
+
from datasets import load_dataset
|
91 |
+
dataset = load_dataset("Roronotalt/bluesky")
|
92 |
+
```
|
93 |
+
|
94 |
+
To pandas:
|
95 |
+
```python
|
96 |
+
new_dataset = dataset.to_pandas()
|
97 |
+
```
|
98 |
+
|
99 |
+
You can then save the pandas dataframe as a csv.
|
100 |
|
101 |
+
Alternativley if you download the provided dataset parquet file in /data, you can convert the file to a csv using the following python code:
|
102 |
+
|
103 |
+
```bash
|
104 |
python -c "import pandas as pd;
|
105 |
df = http://pd.read_parquet('train-0000.parquet', engine='pyarrow');
|
106 |
http://df.to_csv('output_file.csv', index=False)
|