Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -95,6 +95,10 @@ color_values = ['None'] + list(df['color'].unique())
|
|
95 |
speed_values = ['None'] + list(df['speed'].unique())
|
96 |
source_values = ['None'] + list(df['source'].unique())
|
97 |
|
|
|
|
|
|
|
|
|
98 |
#########################################
|
99 |
## Select options
|
100 |
## TODO: family, costume
|
@@ -107,6 +111,11 @@ with st.sidebar:
|
|
107 |
speed_option = st.selectbox(label='Speed:', options=speed_values, index=0)
|
108 |
class_option = st.selectbox(label='Class:', options=class_values, index=0)
|
109 |
source_option = st.selectbox(label='Origin:', options=source_values, index=0)
|
|
|
|
|
|
|
|
|
|
|
110 |
special_type_option = st.text_input(label="SpecialSkill Category", value="Hit 3")
|
111 |
special_text_option = st.text_input(label="SpecialSkill Text", value="Dispel")
|
112 |
|
@@ -133,6 +142,15 @@ if class_option != 'None':
|
|
133 |
if source_option != 'None':
|
134 |
idx_all.append(filter_by_1col(df, 'source', source_option, exact_flag=False))
|
135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
|
137 |
if special_type_option != '':
|
138 |
idx_all.append(filter_by_1col(df, 'types', special_type_option, exact_flag=False))
|
@@ -141,6 +159,7 @@ if special_text_option != '':
|
|
141 |
idx_all.append(filter_by_1col(df, 'effects', special_text_option, exact_flag=False))
|
142 |
|
143 |
#########################################
|
|
|
144 |
|
145 |
df2 = df[np.all(idx_all,axis=0)]
|
146 |
|
|
|
95 |
speed_values = ['None'] + list(df['speed'].unique())
|
96 |
source_values = ['None'] + list(df['source'].unique())
|
97 |
|
98 |
+
defense_values = ['None'] + list(df['defense'].unique())
|
99 |
+
attack_values = ['None'] + list(df['attack'].unique())
|
100 |
+
health_values = ['None'] + list(df['health'].unique())
|
101 |
+
|
102 |
#########################################
|
103 |
## Select options
|
104 |
## TODO: family, costume
|
|
|
111 |
speed_option = st.selectbox(label='Speed:', options=speed_values, index=0)
|
112 |
class_option = st.selectbox(label='Class:', options=class_values, index=0)
|
113 |
source_option = st.selectbox(label='Origin:', options=source_values, index=0)
|
114 |
+
|
115 |
+
defense_option = st.selectbox(label='Defense:', options=defense_values, index=0)
|
116 |
+
attack_option = st.selectbox(label='Attack:', options=attack_values, index=0)
|
117 |
+
health_option = st.selectbox(label='Health:', options=health_values, index=0)
|
118 |
+
|
119 |
special_type_option = st.text_input(label="SpecialSkill Category", value="Hit 3")
|
120 |
special_text_option = st.text_input(label="SpecialSkill Text", value="Dispel")
|
121 |
|
|
|
142 |
if source_option != 'None':
|
143 |
idx_all.append(filter_by_1col(df, 'source', source_option, exact_flag=False))
|
144 |
|
145 |
+
if defense_option != 'None':
|
146 |
+
idx_all.append(filter_by_1col_num(df, 'defense', defense_option, oper_flag="ge"))
|
147 |
+
|
148 |
+
if attack_option != 'None':
|
149 |
+
idx_all.append(filter_by_1col_num(df, 'attack', attack_option, oper_flag="ge"))
|
150 |
+
|
151 |
+
if health_option != 'None':
|
152 |
+
idx_all.append(filter_by_1col_num(df, 'health', health_option, oper_flag="ge"))
|
153 |
+
|
154 |
|
155 |
if special_type_option != '':
|
156 |
idx_all.append(filter_by_1col(df, 'types', special_type_option, exact_flag=False))
|
|
|
159 |
idx_all.append(filter_by_1col(df, 'effects', special_text_option, exact_flag=False))
|
160 |
|
161 |
#########################################
|
162 |
+
st.title(f'Updated: Oct 23, 2023 -- Total heroes = {len(df)}')
|
163 |
|
164 |
df2 = df[np.all(idx_all,axis=0)]
|
165 |
|