Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -677,10 +677,11 @@ def server(input, output, session):
|
|
| 677 |
.format('{:.0%}',subset=(brushed_df_final.columns[2]))
|
| 678 |
.format('{:.0f}',subset=(brushed_df_final.columns[6]))
|
| 679 |
.format('{:.0f}',subset=(brushed_df_final.columns[-1]))
|
|
|
|
| 680 |
.set_properties(subset=brushed_df_final.columns, **{'height': '30px'})
|
| 681 |
.set_table_styles([{'selector': 'thead th', 'props': [('height', '30px')]}], overwrite=False)
|
| 682 |
# .set_table_styles([{'selector': 'table', 'props': [('width', '100px')]}], overwrite=False)
|
| 683 |
-
.set_table_styles([{'selector': 'thead th:nth-child(1)', 'props': [('min-width', '
|
| 684 |
.set_table_styles([{'selector': 'thead th:nth-child(2)', 'props': [('min-width', '40px')]}], overwrite=False)
|
| 685 |
.set_table_styles([{'selector': 'thead th:nth-child(3)', 'props': [('min-width', '40px')]}], overwrite=False)
|
| 686 |
.set_table_styles([{'selector': 'thead th:nth-child(4)', 'props': [('min-width', '40px')]}], overwrite=False)
|
|
@@ -689,7 +690,8 @@ def server(input, output, session):
|
|
| 689 |
.set_table_styles([{'selector': 'thead th:nth-child(7)', 'props': [('min-width', '40px')]}], overwrite=False)
|
| 690 |
.set_table_styles([{'selector': 'thead th:nth-child(8)', 'props': [('min-width', '40px')]}], overwrite=False)
|
| 691 |
.set_table_styles([{'selector': 'thead th:nth-child(9)', 'props': [('min-width', '40px')]}], overwrite=False)
|
| 692 |
-
.background_gradient(cmap=cmap_sum,subset = (brushed_df_final.columns[-
|
|
|
|
| 693 |
.applymap(lambda x: f'background-color: {dict_pitch_name.get(x, "")}', subset=['Pitch Type'])
|
| 694 |
.applymap(lambda x: f'background-color: black' if x == 0 else '', subset=['Spin'])
|
| 695 |
|
|
|
|
| 677 |
.format('{:.0%}',subset=(brushed_df_final.columns[2]))
|
| 678 |
.format('{:.0f}',subset=(brushed_df_final.columns[6]))
|
| 679 |
.format('{:.0f}',subset=(brushed_df_final.columns[-1]))
|
| 680 |
+
.format('{:.0f}',subset=(brushed_df_final.columns[-2]))
|
| 681 |
.set_properties(subset=brushed_df_final.columns, **{'height': '30px'})
|
| 682 |
.set_table_styles([{'selector': 'thead th', 'props': [('height', '30px')]}], overwrite=False)
|
| 683 |
# .set_table_styles([{'selector': 'table', 'props': [('width', '100px')]}], overwrite=False)
|
| 684 |
+
.set_table_styles([{'selector': 'thead th:nth-child(1)', 'props': [('min-width', '160px')]}], overwrite=False)
|
| 685 |
.set_table_styles([{'selector': 'thead th:nth-child(2)', 'props': [('min-width', '40px')]}], overwrite=False)
|
| 686 |
.set_table_styles([{'selector': 'thead th:nth-child(3)', 'props': [('min-width', '40px')]}], overwrite=False)
|
| 687 |
.set_table_styles([{'selector': 'thead th:nth-child(4)', 'props': [('min-width', '40px')]}], overwrite=False)
|
|
|
|
| 690 |
.set_table_styles([{'selector': 'thead th:nth-child(7)', 'props': [('min-width', '40px')]}], overwrite=False)
|
| 691 |
.set_table_styles([{'selector': 'thead th:nth-child(8)', 'props': [('min-width', '40px')]}], overwrite=False)
|
| 692 |
.set_table_styles([{'selector': 'thead th:nth-child(9)', 'props': [('min-width', '40px')]}], overwrite=False)
|
| 693 |
+
.background_gradient(cmap=cmap_sum,subset = (brushed_df_final.columns[-2]),vmin=80,vmax=120)
|
| 694 |
+
.background_gradient(cmap=cmap_sum,subset = (brushed_df_final.columns[-1]),vmin=20,vmax=80)
|
| 695 |
.applymap(lambda x: f'background-color: {dict_pitch_name.get(x, "")}', subset=['Pitch Type'])
|
| 696 |
.applymap(lambda x: f'background-color: black' if x == 0 else '', subset=['Spin'])
|
| 697 |
|