Weijie1996
commited on
Commit
•
6c806b5
1
Parent(s):
6467e7d
Update README.md
Browse files
README.md
CHANGED
@@ -5,7 +5,7 @@ task_categories:
|
|
5 |
language:
|
6 |
- en
|
7 |
size_categories:
|
8 |
-
-
|
9 |
tags:
|
10 |
- finance
|
11 |
---
|
@@ -40,21 +40,20 @@ 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 |
-
import
|
44 |
-
import pandas as pd
|
45 |
|
46 |
-
|
47 |
-
|
48 |
|
49 |
-
|
50 |
-
|
|
|
|
|
|
|
51 |
|
52 |
-
#
|
53 |
-
|
54 |
|
55 |
-
# Optional: Display basic info about the DataFrame
|
56 |
-
print(df.info())
|
57 |
-
print(df.describe())
|
58 |
```
|
59 |
|
60 |
## Output
|
|
|
5 |
language:
|
6 |
- en
|
7 |
size_categories:
|
8 |
+
- 1M<n<1B
|
9 |
tags:
|
10 |
- finance
|
11 |
---
|
|
|
40 |
The following example demonstrates how to load the dataset and convert it to a pandas DataFrame.
|
41 |
|
42 |
```python
|
43 |
+
from datasets import load_dataset
|
|
|
44 |
|
45 |
+
ds = load_dataset("Weijie1996/load_timeseries", split='train')
|
46 |
+
# Print the category of the dataset
|
47 |
|
48 |
+
print(set(ds['category']))
|
49 |
+
print(set(ds['id']))
|
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 |
|
59 |
## Output
|