Weijie1996
commited on
Commit
•
60a05fe
1
Parent(s):
a72f22a
Update README.md
Browse files
README.md
CHANGED
@@ -32,7 +32,7 @@ The dataset used in this example is `Weijie1996/load_timeseries`, which contains
|
|
32 |
You can install the required libraries using pip:
|
33 |
|
34 |
```sh
|
35 |
-
pip install
|
36 |
```
|
37 |
|
38 |
## Usage
|
@@ -40,19 +40,13 @@ pip install datasets pandas
|
|
40 |
The following example demonstrates how to load the dataset and convert it to a pandas DataFrame.
|
41 |
|
42 |
```python
|
43 |
-
|
44 |
|
45 |
-
|
46 |
-
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
# Filter the dataset that category is 15m and id is GE_1
|
52 |
-
ds = ds.filter(lambda x: x['category'] == '30m' and x['id'] == 'GE_1')
|
53 |
-
|
54 |
-
# Transform the dataset to a pandas dataframe
|
55 |
-
df = ds.to_pandas()
|
56 |
|
57 |
```
|
58 |
|
|
|
32 |
You can install the required libraries using pip:
|
33 |
|
34 |
```sh
|
35 |
+
python -m pip install "dask[complete]" # Install everything
|
36 |
```
|
37 |
|
38 |
## Usage
|
|
|
40 |
The following example demonstrates how to load the dataset and convert it to a pandas DataFrame.
|
41 |
|
42 |
```python
|
43 |
+
import dask.dataframe as dd
|
44 |
|
45 |
+
# read parquet file
|
46 |
+
df = dd.read_parquet("hf://datasets/Weijie1996/load_timeseries/30m_resolution_ge/ge_30m.parquet")
|
47 |
|
48 |
+
# change to pandas dataframe
|
49 |
+
df = df.compute()
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
```
|
52 |
|