Update tidytuesday_for_python.py
Browse files- tidytuesday_for_python.py +3 -10
tidytuesday_for_python.py
CHANGED
|
@@ -54,13 +54,6 @@ class TidyTuesdayPython(datasets.GeneratorBasedBuilder):
|
|
| 54 |
_URLS = _URLS
|
| 55 |
VERSION = datasets.Version("1.1.0")
|
| 56 |
|
| 57 |
-
BUILDER_CONFIGS = [
|
| 58 |
-
datasets.BuilderConfig(name="train", version=VERSION, description="This part of my dataset covers the train set"),
|
| 59 |
-
datasets.BuilderConfig(name="validation", version=VERSION, description="This part of my dataset covers the validation set"),
|
| 60 |
-
]
|
| 61 |
-
|
| 62 |
-
DEFAULT_CONFIG_NAME = "train"
|
| 63 |
-
|
| 64 |
|
| 65 |
def _info(self):
|
| 66 |
|
|
@@ -124,6 +117,6 @@ class TidyTuesdayPython(datasets.GeneratorBasedBuilder):
|
|
| 124 |
def _generate_examples(self, filepath):
|
| 125 |
logging.info("generating examples from = %s", filepath)
|
| 126 |
with open(filepath, "r") as j:
|
| 127 |
-
tidytuesday_json = json.load()
|
| 128 |
-
|
| 129 |
-
|
|
|
|
| 54 |
_URLS = _URLS
|
| 55 |
VERSION = datasets.Version("1.1.0")
|
| 56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
def _info(self):
|
| 59 |
|
|
|
|
| 117 |
def _generate_examples(self, filepath):
|
| 118 |
logging.info("generating examples from = %s", filepath)
|
| 119 |
with open(filepath, "r") as j:
|
| 120 |
+
tidytuesday_json = json.load(j)
|
| 121 |
+
for record in tidytuesday_json:
|
| 122 |
+
yield record
|