Update test_dataset.py
Browse files- test_dataset.py +5 -6
test_dataset.py
CHANGED
@@ -28,7 +28,8 @@ class HealthStatisticsDataset(datasets.GeneratorBasedBuilder):
|
|
28 |
"Year": datasets.Value("int32"),
|
29 |
"LocationAbbr": datasets.Value("string"),
|
30 |
"LocationDesc": datasets.Value("string"),
|
31 |
-
"
|
|
|
32 |
"Disease_Type": datasets.Value("int32"),
|
33 |
"Data_Value_Type": datasets.Value("int32"),
|
34 |
"Data_Value": datasets.Value("float32"),
|
@@ -65,10 +66,8 @@ class HealthStatisticsDataset(datasets.GeneratorBasedBuilder):
|
|
65 |
"Year": year,
|
66 |
"LocationAbbr": row.get('LocationAbbr', None),
|
67 |
"LocationDesc": row.get('LocationDesc', None),
|
68 |
-
"
|
69 |
-
|
70 |
-
"longitude": longitude
|
71 |
-
},
|
72 |
"Disease_Type": int(row["Disease_Type"]) if "Disease_Type" in row else None,
|
73 |
"Data_Value_Type": int(row["Data_Value_Type"]) if "Data_Value_Type" in row else None,
|
74 |
"Data_Value": float(row["Data_Value"]) if "Data_Value" in row else None,
|
@@ -155,4 +154,4 @@ class HealthStatisticsDataset(datasets.GeneratorBasedBuilder):
|
|
155 |
data2.rename(columns={'Question':'Disease_Type'}, inplace=True)
|
156 |
data2['Life_Expectancy'] = np.where(data2['Break_Out_Type'] == 0, data2['Life_Expectancy'], np.nan)
|
157 |
data2 = data2.reset_index(drop=True)
|
158 |
-
return data2
|
|
|
28 |
"Year": datasets.Value("int32"),
|
29 |
"LocationAbbr": datasets.Value("string"),
|
30 |
"LocationDesc": datasets.Value("string"),
|
31 |
+
"Latitude": datasets.Value("float32"),
|
32 |
+
"Longitude": datasets.Value("float32"),
|
33 |
"Disease_Type": datasets.Value("int32"),
|
34 |
"Data_Value_Type": datasets.Value("int32"),
|
35 |
"Data_Value": datasets.Value("float32"),
|
|
|
66 |
"Year": year,
|
67 |
"LocationAbbr": row.get('LocationAbbr', None),
|
68 |
"LocationDesc": row.get('LocationDesc', None),
|
69 |
+
"Latitude": latitude,
|
70 |
+
"Longitude": longitude,
|
|
|
|
|
71 |
"Disease_Type": int(row["Disease_Type"]) if "Disease_Type" in row else None,
|
72 |
"Data_Value_Type": int(row["Data_Value_Type"]) if "Data_Value_Type" in row else None,
|
73 |
"Data_Value": float(row["Data_Value"]) if "Data_Value" in row else None,
|
|
|
154 |
data2.rename(columns={'Question':'Disease_Type'}, inplace=True)
|
155 |
data2['Life_Expectancy'] = np.where(data2['Break_Out_Type'] == 0, data2['Life_Expectancy'], np.nan)
|
156 |
data2 = data2.reset_index(drop=True)
|
157 |
+
return data2
|