Weijie1996 commited on
Commit
6c806b5
1 Parent(s): 6467e7d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -12
README.md CHANGED
@@ -5,7 +5,7 @@ task_categories:
5
  language:
6
  - en
7
  size_categories:
8
- - 100K<n<1M
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 datasets
44
- import pandas as pd
45
 
46
- # Load the dataset
47
- ds = datasets.load_dataset("Weijie1996/load_timeseries", split="train")
48
 
49
- # Convert the dataset to a pandas DataFrame
50
- df = ds.to_pandas()
 
 
 
51
 
52
- # Display the first few rows of the DataFrame
53
- print(df.head())
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