Update README.md
Browse files
README.md
CHANGED
@@ -39,6 +39,22 @@ from datasets import load_dataset
|
|
39 |
# Load the raw dataset
|
40 |
dataset = load_dataset("ASSERT-KTH/DISL", "raw")
|
41 |
|
|
|
|
|
42 |
# Load the decomposed dataset
|
43 |
dataset = load_dataset("ASSERT-KTH/DISL", "decomposed")
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
# Load the raw dataset
|
40 |
dataset = load_dataset("ASSERT-KTH/DISL", "raw")
|
41 |
|
42 |
+
# OR
|
43 |
+
|
44 |
# Load the decomposed dataset
|
45 |
dataset = load_dataset("ASSERT-KTH/DISL", "decomposed")
|
46 |
+
|
47 |
+
# number of rows and columns
|
48 |
+
num_rows = len(dataset["train"])
|
49 |
+
num_columns = len(dataset["train"].column_names)
|
50 |
+
|
51 |
+
# random row
|
52 |
+
import random
|
53 |
+
random_row = random.choice(dataset["train"])
|
54 |
+
|
55 |
+
# random source code
|
56 |
+
random_sc = random.choice(dataset["train"])['source_code']
|
57 |
+
print(random_sc)
|
58 |
+
```
|
59 |
+
|
60 |
+
|