Spaces:
Sleeping
Sleeping
Commit
·
60081fb
1
Parent(s):
3eadd7c
Update app.py
Browse files
app.py
CHANGED
@@ -100,10 +100,9 @@ df_hail_cut['Miles to Hail'] = [
|
|
100 |
df_hail_cut['MAXSIZE'] = df_hail_cut['MAXSIZE'].round(1)
|
101 |
|
102 |
df_hail_cut = df_hail_cut.query("`Miles to Hail`<10")
|
103 |
-
df_hail_cut['Category'] =
|
104 |
-
np.where(df_hail_cut['Miles to Hail'] < 1, "Within 1 Mile",
|
105 |
np.where(df_hail_cut['Miles to Hail'] < 3, "Within 3 Miles",
|
106 |
-
np.where(df_hail_cut['Miles to Hail'] < 10, "Within 10 Miles", 'Other')))
|
107 |
|
108 |
df_hail_cut_group = pd.pivot_table(df_hail_cut, index='Date_utc',
|
109 |
columns='Category',
|
@@ -111,7 +110,7 @@ df_hail_cut_group = pd.pivot_table(df_hail_cut, index='Date_utc',
|
|
111 |
aggfunc='max')
|
112 |
|
113 |
cols = df_hail_cut_group.columns
|
114 |
-
cols_focus = [
|
115 |
"Within 3 Miles", "Within 10 Miles"]
|
116 |
|
117 |
missing_cols = set(cols_focus)-set(cols)
|
|
|
100 |
df_hail_cut['MAXSIZE'] = df_hail_cut['MAXSIZE'].round(1)
|
101 |
|
102 |
df_hail_cut = df_hail_cut.query("`Miles to Hail`<10")
|
103 |
+
df_hail_cut['Category'] = np.where(df_hail_cut['Miles to Hail'] < 1, "Within 1 Mile",
|
|
|
104 |
np.where(df_hail_cut['Miles to Hail'] < 3, "Within 3 Miles",
|
105 |
+
np.where(df_hail_cut['Miles to Hail'] < 10, "Within 10 Miles", 'Other')))
|
106 |
|
107 |
df_hail_cut_group = pd.pivot_table(df_hail_cut, index='Date_utc',
|
108 |
columns='Category',
|
|
|
110 |
aggfunc='max')
|
111 |
|
112 |
cols = df_hail_cut_group.columns
|
113 |
+
cols_focus = [ "Within 1 Mile",
|
114 |
"Within 3 Miles", "Within 10 Miles"]
|
115 |
|
116 |
missing_cols = set(cols_focus)-set(cols)
|