import streamlit as st import pandas as pd # Load the CSV data file_path = 'category upwork jobs.csv' jobs_df = pd.read_csv(file_path) # Sidebar: Select Category st.sidebar.header("Filter Jobs by Category") categories = jobs_df['category'].unique() # Extract unique categories selected_category = st.sidebar.selectbox("Choose a category:", categories) # Filter jobs based on the selected category filtered_jobs = jobs_df[jobs_df['category'] == selected_category] # Main: Display filtered jobs st.title("Jobs Dashboard") st.write(f"Showing jobs in category: **{selected_category}**") st.dataframe(filtered_jobs[['title']]) # Adjust columns as needed # Optional: Show a count of jobs in the selected category st.write(f"Total jobs in this category: {len(filtered_jobs)}")