Datasets:
Update balloons.py
Browse files- balloons.py +1 -1
balloons.py
CHANGED
|
@@ -102,7 +102,7 @@ class Balloons(datasets.GeneratorBasedBuilder):
|
|
| 102 |
def _generate_examples(self, filepath: str):
|
| 103 |
data = pandas.read_csv(filepath, header=None)
|
| 104 |
data.columns = _BASE_FEATURE_NAMES
|
| 105 |
-
data.loc[:, "is_inflated"] = data.
|
| 106 |
|
| 107 |
for row_id, row in data.iterrows():
|
| 108 |
data_row = dict(row)
|
|
|
|
| 102 |
def _generate_examples(self, filepath: str):
|
| 103 |
data = pandas.read_csv(filepath, header=None)
|
| 104 |
data.columns = _BASE_FEATURE_NAMES
|
| 105 |
+
data.loc[:, "is_inflated"] = data.is_inflated.apply(lambda x: 1 if x == "T" else 0)
|
| 106 |
|
| 107 |
for row_id, row in data.iterrows():
|
| 108 |
data_row = dict(row)
|