James McCool
commited on
Commit
·
7984d0e
1
Parent(s):
b36408f
Update duplication metrics in app.py to include average duplicates
Browse files- Modified the duplication frame to replace 'dupes' with 'EntryCount' for better clarity in metrics.
- Added a new column 'average_dupes' to calculate the mean of duplicates per BaseName, enhancing data analysis capabilities.
- Adjusted the background gradient color scheme for improved visual representation of the data.
app.py
CHANGED
@@ -424,5 +424,7 @@ with tab2:
|
|
424 |
st.dataframe(st.session_state['general_frame'].style.background_gradient(cmap='RdYlGn', axis=1).format(precision=2), hide_index=True)
|
425 |
|
426 |
with tab5:
|
427 |
-
st.session_state['duplication_frame'] = working_df[['BaseName', '
|
428 |
-
st.
|
|
|
|
|
|
424 |
st.dataframe(st.session_state['general_frame'].style.background_gradient(cmap='RdYlGn', axis=1).format(precision=2), hide_index=True)
|
425 |
|
426 |
with tab5:
|
427 |
+
st.session_state['duplication_frame'] = working_df[['BaseName', 'EntryCount', 'uniques', 'under_5', 'under_10']]
|
428 |
+
st.session_state['duplication_frame']['average_dupes'] = st.session_state['duplication_frame'].groupby('BaseName')['dupes'].mean()
|
429 |
+
st.session_state['duplication_frame'] = st.session_state['duplication_frame'].drop_duplicates(subset='BaseName', keep='first')
|
430 |
+
st.dataframe(st.session_state['duplication_frame'].style.background_gradient(cmap='RdYlGn_r', axis=1).format(precision=2), hide_index=True)
|