Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -75,13 +75,13 @@ with tab1:
|
|
| 75 |
|
| 76 |
building_mag_prediction_data = building_new[['time', 'x', 'y', 'z', 'temperature', 'et0_fao_evapotranspiration']]
|
| 77 |
|
| 78 |
-
def
|
| 79 |
-
if value
|
| 80 |
return 0
|
| 81 |
else:
|
| 82 |
return value
|
| 83 |
|
| 84 |
-
building_mag_prediction_data['et0_fao_evapotranspiration'] = building_mag_prediction_data['et0_fao_evapotranspiration'].apply(
|
| 85 |
|
| 86 |
st.dataframe(building_mag_prediction_data)
|
| 87 |
|
|
|
|
| 75 |
|
| 76 |
building_mag_prediction_data = building_new[['time', 'x', 'y', 'z', 'temperature', 'et0_fao_evapotranspiration']]
|
| 77 |
|
| 78 |
+
def fill_nan_with_zero(value):
|
| 79 |
+
if pd.isna(value):
|
| 80 |
return 0
|
| 81 |
else:
|
| 82 |
return value
|
| 83 |
|
| 84 |
+
building_mag_prediction_data['et0_fao_evapotranspiration'] = building_mag_prediction_data['et0_fao_evapotranspiration'].apply(fill_nan_with_zero)
|
| 85 |
|
| 86 |
st.dataframe(building_mag_prediction_data)
|
| 87 |
|