Create app, where table will shows in rows employees, in columns will be information about employees - job, manager, organisation unit. 2 fields will be editable for evaluation of their performance what and how.
Drop files here
or click to upload
import streamlit as st
import pandas as pd
from st_aggrid import AgGrid, GridOptionsBuilder
# Create sample employee data
data = {
'Employee': ['John Smith', 'Sarah Johnson', 'Michael Brown', 'Emily Davis', 'Robert Wilson'],
'Job Title': ['Software Engineer', 'Project Manager', 'Data Analyst', 'UX Designer', 'Product Owner'],
'Manager': ['Alice Thompson', 'Bob Richards', 'Alice Thompson', 'Sarah Johnson', 'Bob Richards'],
'Organization Unit': ['Engineering', 'Product', 'Engineering', 'Design', 'Product'],
'What': ['', '', '', '', ''], # Performance evaluation - what was achieved
'How': ['', '', '', '', ''] # Performance evaluation - how it was achieved
}
df = pd.DataFrame(data)
st.title('Employee Performance Evaluation')
# Configure grid options
gb = GridOptionsBuilder.from_dataframe(df)
# Make all columns non-editable by default
gb.configure_default_column(editable=False)
# Make only 'What' and 'How' columns editable
gb.configure_column('What',
editable=True,
cellEditor='agLargeTextCellEditor',
cellEditorPopup=True)
gb.configure_column('How',
editable=True,
cellEditor='agLargeTextCellEditor',
cellEditorPopup=True)
gridOptions = gb.build()
st.info('You can edit the "What" and "How" columns to provide performance evaluation feedback.')
# Display the grid
grid_response = AgGrid(
df,
gridOptions=gridOptions,
height=400,
fit_columns_on_grid_load=True,
allow_unsafe_jscode=True
)
# Show modified data
if st.button('Show Updated Data'):
st.write('Updated Performance Evaluations:')
modified_df = grid_response['data']
st.dataframe(modified_df[['Employee', 'What', 'How']])
Hi! I can help you with any questions about Streamlit and Python. What would you like to know?