Update test_dataset.py
Browse files- test_dataset.py +1 -9
test_dataset.py
CHANGED
|
@@ -82,17 +82,9 @@ class HealthStatisticsDataset(datasets.GeneratorBasedBuilder):
|
|
| 82 |
def preprocess_data(data):
|
| 83 |
data = data[['YearStart', 'LocationAbbr', 'LocationDesc', 'Geolocation', 'Topic', 'Question', 'Data_Value_Type', 'Data_Value', 'Data_Value_Alt',
|
| 84 |
'Low_Confidence_Limit', 'High_Confidence_Limit', 'Break_Out_Category', 'Break_Out']]
|
| 85 |
-
|
| 86 |
-
if isinstance(geo_str, str):
|
| 87 |
-
geo_str = geo_str.replace('POINT (', '').replace(')', '')
|
| 88 |
-
latitude, longitude = map(float, geo_str.split())
|
| 89 |
-
return (latitude, longitude)
|
| 90 |
-
else:
|
| 91 |
-
return geo_str
|
| 92 |
-
|
| 93 |
pd.options.mode.chained_assignment = None
|
| 94 |
|
| 95 |
-
data['Geolocation'] = data['Geolocation'].apply(convert_to_tuple)
|
| 96 |
disease_columns = [
|
| 97 |
'Major cardiovascular disease mortality rate among US adults (18+); NVSS',
|
| 98 |
'Diseases of the heart (heart disease) mortality rate among US adults (18+); NVSS',
|
|
|
|
| 82 |
def preprocess_data(data):
|
| 83 |
data = data[['YearStart', 'LocationAbbr', 'LocationDesc', 'Geolocation', 'Topic', 'Question', 'Data_Value_Type', 'Data_Value', 'Data_Value_Alt',
|
| 84 |
'Low_Confidence_Limit', 'High_Confidence_Limit', 'Break_Out_Category', 'Break_Out']]
|
| 85 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
pd.options.mode.chained_assignment = None
|
| 87 |
|
|
|
|
| 88 |
disease_columns = [
|
| 89 |
'Major cardiovascular disease mortality rate among US adults (18+); NVSS',
|
| 90 |
'Diseases of the heart (heart disease) mortality rate among US adults (18+); NVSS',
|