Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -89,7 +89,8 @@ def get_unique_values(df):
|
|
89 |
return {
|
90 |
'companies': df['company'].unique(),
|
91 |
'locations': df['location'].unique(),
|
92 |
-
'job_types': df['job_type'].unique()
|
|
|
93 |
}
|
94 |
|
95 |
def create_chart(data, _x, y, title, color_sequence):
|
@@ -170,15 +171,17 @@ def display_data_explorer(df):
|
|
170 |
|
171 |
if show_all == "Filtered Data":
|
172 |
unique_values = get_unique_values(df)
|
173 |
-
col1, col2, col3 = st.columns(
|
174 |
with col1:
|
175 |
companies = st.multiselect("Select Companies", options=unique_values['companies'])
|
176 |
with col2:
|
177 |
locations = st.multiselect("Select Locations", options=unique_values['locations'])
|
178 |
with col3:
|
179 |
job_types = st.multiselect("Select Job Types", options=unique_values['job_types'])
|
|
|
|
|
180 |
|
181 |
-
filtered_df = filter_dataframe(df, companies, locations, job_types)
|
182 |
else:
|
183 |
filtered_df = df
|
184 |
|
|
|
89 |
return {
|
90 |
'companies': df['company'].unique(),
|
91 |
'locations': df['location'].unique(),
|
92 |
+
'job_types': df['job_type'].unique(),
|
93 |
+
'Role Name': df['title'].unique()
|
94 |
}
|
95 |
|
96 |
def create_chart(data, _x, y, title, color_sequence):
|
|
|
171 |
|
172 |
if show_all == "Filtered Data":
|
173 |
unique_values = get_unique_values(df)
|
174 |
+
col1, col2, col3,col4 = st.columns(4)
|
175 |
with col1:
|
176 |
companies = st.multiselect("Select Companies", options=unique_values['companies'])
|
177 |
with col2:
|
178 |
locations = st.multiselect("Select Locations", options=unique_values['locations'])
|
179 |
with col3:
|
180 |
job_types = st.multiselect("Select Job Types", options=unique_values['job_types'])
|
181 |
+
with col4:
|
182 |
+
Role_type = st.multiselect("Select Role Types", options=unique_values['title'])
|
183 |
|
184 |
+
filtered_df = filter_dataframe(df, companies, locations, job_types,Role_type)
|
185 |
else:
|
186 |
filtered_df = df
|
187 |
|