Kolpitor commited on
Commit
4e0afd5
·
1 Parent(s): 0039660

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -27,6 +27,11 @@ df = pd.read_csv("city_temperature.csv")
27
 
28
  country = "all"
29
 
 
 
 
 
 
30
  if all_region == False:
31
  region = st.selectbox(
32
  'Which region do you want to predict temparature ?',
@@ -56,10 +61,6 @@ if all_city == False:
56
 
57
 
58
 
59
- def mergeStateToCountry():
60
- df.loc[df['State'].notna(), 'Country'] = df['State']
61
- df = df.loc[:, ~df.columns.str.contains('State')]
62
-
63
  i = 0
64
 
65
  for region in df["Region"].unique():
 
27
 
28
  country = "all"
29
 
30
+ if merge == True:
31
+ df.loc[df['State'].notna(), 'Country'] = df['State']
32
+ df = df.loc[:, ~df.columns.str.contains('State')]
33
+
34
+
35
  if all_region == False:
36
  region = st.selectbox(
37
  'Which region do you want to predict temparature ?',
 
61
 
62
 
63
 
 
 
 
 
64
  i = 0
65
 
66
  for region in df["Region"].unique():