Bancie commited on
Commit
19cfbb0
ยท
1 Parent(s): 86cf58b

README.md updated

Browse files
Files changed (1) hide show
  1. README.md +34 -0
README.md CHANGED
@@ -70,11 +70,45 @@ This dataset is released under the **MIT License**, allowing free use, modificat
70
 
71
  ### ๐Ÿš€ Usage Example (Python)
72
 
 
 
73
  ```python
74
  from datasets import load_dataset
75
 
 
76
  dataset = load_dataset("Bancie/Reading-Dataset")
 
 
77
  print(dataset)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  ```
79
 
80
  ### ๐Ÿ“š Citation
 
70
 
71
  ### ๐Ÿš€ Usage Example (Python)
72
 
73
+ #### Basic
74
+
75
  ```python
76
  from datasets import load_dataset
77
 
78
+ # Load the dataset
79
  dataset = load_dataset("Bancie/Reading-Dataset")
80
+
81
+ # View dataset structure
82
  print(dataset)
83
+
84
+ # Access the default split (usually 'train')
85
+ data = dataset['train']
86
+ print(f"Number of examples: {len(data)}")
87
+ print(f"Features: {data.features}")
88
+
89
+ # Access a specific example
90
+ print(data[0])
91
+
92
+ # Convert to pandas DataFrame for analysis
93
+ df = data.to_pandas()
94
+ print(df.head())
95
+ ```
96
+
97
+ #### Streaming
98
+
99
+ For large datasets or when you want to process data without downloading it entirely:
100
+
101
+ ```python
102
+ from datasets import load_dataset
103
+
104
+ # Load dataset in streaming mode
105
+ dataset = load_dataset("Bancie/Reading-Dataset", streaming=True)
106
+
107
+ # Iterate through examples
108
+ for example in dataset['train']:
109
+ print(example)
110
+ # Process your data here
111
+ break # Remove break to process all examples
112
  ```
113
 
114
  ### ๐Ÿ“š Citation