Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,7 +30,27 @@ if all_region == False:
|
|
| 30 |
region = st.selectbox(
|
| 31 |
'Which region do you want to predict temparature ?',
|
| 32 |
(df["Region"].unique()), index=0)
|
| 33 |
-
df.drop(df.loc[df['
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
def mergeStateToCountry():
|
| 36 |
df.loc[df['State'].notna(), 'Country'] = df['State']
|
|
|
|
| 30 |
region = st.selectbox(
|
| 31 |
'Which region do you want to predict temparature ?',
|
| 32 |
(df["Region"].unique()), index=0)
|
| 33 |
+
df.drop(df.loc[df['Region'] != region].index, inplace=True)
|
| 34 |
+
|
| 35 |
+
if all_country == False:
|
| 36 |
+
region = st.selectbox(
|
| 37 |
+
'Which country do you want to predict temparature ?',
|
| 38 |
+
(df["Country"].unique()), index=0)
|
| 39 |
+
df.drop(df.loc[df['Country'] != region].index, inplace=True)
|
| 40 |
+
|
| 41 |
+
if merge == False and all_state == False:
|
| 42 |
+
state = st.selectbox(
|
| 43 |
+
'Which state do you want to predict temparature ?',
|
| 44 |
+
(df["State"].unique()), index=0)
|
| 45 |
+
df.drop(df.loc[df['State'] != region].index, inplace=True)
|
| 46 |
+
|
| 47 |
+
if all_city == False:
|
| 48 |
+
region = st.selectbox(
|
| 49 |
+
'Which city do you want to predict temparature ?',
|
| 50 |
+
(df["City"].unique()), index=0)
|
| 51 |
+
df.drop(df.loc[df['City'] != region].index, inplace=True)
|
| 52 |
+
|
| 53 |
+
|
| 54 |
|
| 55 |
def mergeStateToCountry():
|
| 56 |
df.loc[df['State'].notna(), 'Country'] = df['State']
|