Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -145,9 +145,9 @@ elif tabs == 'Reports':
|
|
| 145 |
# Filtering Interface
|
| 146 |
st.write("Filtering Options")
|
| 147 |
branch_names = df['Branch_Name'].unique().tolist()
|
| 148 |
-
product_names = df['Description'].unique().tolist()
|
| 149 |
selected_branches = st.multiselect('Select Branch(es) Name', branch_names, default=branch_names)
|
| 150 |
-
selected_products = st.multiselect('Select product(s) Name', product_names, default=product_names)
|
| 151 |
|
| 152 |
# Button to apply filters
|
| 153 |
if st.button('Apply Filters and Generate report'):
|
|
@@ -159,8 +159,8 @@ elif tabs == 'Reports':
|
|
| 159 |
filtered_df = filtered_df[filtered_df['Branch_Name'].isin(selected_branches)]
|
| 160 |
|
| 161 |
# Apply Description Filter
|
| 162 |
-
if selected_products:
|
| 163 |
-
|
| 164 |
|
| 165 |
# Display filtered DataFrame
|
| 166 |
st.write("Filtered DataFrame")
|
|
|
|
| 145 |
# Filtering Interface
|
| 146 |
st.write("Filtering Options")
|
| 147 |
branch_names = df['Branch_Name'].unique().tolist()
|
| 148 |
+
#product_names = df['Description'].unique().tolist()
|
| 149 |
selected_branches = st.multiselect('Select Branch(es) Name', branch_names, default=branch_names)
|
| 150 |
+
#selected_products = st.multiselect('Select product(s) Name', product_names, default=product_names)
|
| 151 |
|
| 152 |
# Button to apply filters
|
| 153 |
if st.button('Apply Filters and Generate report'):
|
|
|
|
| 159 |
filtered_df = filtered_df[filtered_df['Branch_Name'].isin(selected_branches)]
|
| 160 |
|
| 161 |
# Apply Description Filter
|
| 162 |
+
#if selected_products:
|
| 163 |
+
# filtered_df = filtered_df[filtered_df['Product_Name'].isin(selected_products)]
|
| 164 |
|
| 165 |
# Display filtered DataFrame
|
| 166 |
st.write("Filtered DataFrame")
|