nesticot commited on
Commit
76e5a16
·
verified ·
1 Parent(s): 6c7f482

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -669,7 +669,7 @@ def server(input, output, session):
669
  # Now your DataFrame has hierarchical columns and guaranteed 'LHP' and 'RHP' columns.
670
 
671
  df_pivot_style = df_pandas.style
672
- thick_border_cols = [3, 4, 13,22] # 0-based index
673
 
674
 
675
 
@@ -694,16 +694,16 @@ def server(input, output, session):
694
  .set_table_styles(
695
  [
696
 
697
- {"selector": "td:nth-child(4)", "props": [("border-right", "3px solid black")]}, # Thick right border for the 3rd column
698
- {"selector": "td:nth-child(13)", "props": [("border-right", "3px solid black")]}, # Thick right border for the 3rd column
699
- {"selector": "td:nth-child(22)", "props": [("border-right", "3px solid black")]}, # Thick right border for the 3rd column
700
- {"selector": "td:nth-child(24)", "props": [("border-right", "3px solid black")]}, # Thick right border for the 3rd column
701
 
702
 
703
- {'selector': 'thead th:nth-child(4)', 'props': [('border-right', '3px solid black')]}, # Thick right border for the 3rd header
704
- {'selector': 'thead th:nth-child(13)', 'props': [('border-right', '3px solid black')]},
705
- {'selector': 'thead th:nth-child(22)', 'props': [('border-right', '3px solid black')]}, # Thick right border for the 3rd header
706
- {'selector': 'thead th:nth-child(24)', 'props': [('border-right', '3px solid black')]}, # Thick right border for the 3rd header
707
 
708
 
709
  {'selector': 'th.col_heading.level0', 'props': [('border-right', '3px solid black')]},
@@ -742,8 +742,8 @@ def server(input, output, session):
742
  .set_properties(**{'Height': '8px'}, **{'text-align': 'center'}, overwrite=False)
743
  .hide_index()
744
  .set_properties(**{'border': '1px black solid'})
745
- .set_table_styles([{'selector': 'thead th:nth-child(1)', 'props': [('min-width', '100px')]}], overwrite=False)
746
- .set_table_styles([{'selector': 'thead th:nth-child(2)', 'props': [('min-width', '225px')]}], overwrite=False)
747
  # .set_table_styles([{'selector': 'thead th:nth-child(2)', 'props': [('min-width', '250px')]}], overwrite=False)
748
  .set_table_styles([{'selector': 'thead th', 'props': [('height', '30px')]}], overwrite=False)
749
  .apply(highlight_alternate_rows, axis=0, subset=df_pandas.columns[:])
 
669
  # Now your DataFrame has hierarchical columns and guaranteed 'LHP' and 'RHP' columns.
670
 
671
  df_pivot_style = df_pandas.style
672
+ thick_border_cols = [2, 3, 12,21] # 0-based index
673
 
674
 
675
 
 
694
  .set_table_styles(
695
  [
696
 
697
+ {"selector": "td:nth-child(3)", "props": [("border-right", "3px solid black")]}, # Thick right border for the 3rd column
698
+ {"selector": "td:nth-child(12)", "props": [("border-right", "3px solid black")]}, # Thick right border for the 3rd column
699
+ {"selector": "td:nth-child(21)", "props": [("border-right", "3px solid black")]}, # Thick right border for the 3rd column
700
+ {"selector": "td:nth-child(23)", "props": [("border-right", "3px solid black")]}, # Thick right border for the 3rd column
701
 
702
 
703
+ {'selector': 'thead th:nth-child(3)', 'props': [('border-right', '3px solid black')]}, # Thick right border for the 3rd header
704
+ {'selector': 'thead th:nth-child(12)', 'props': [('border-right', '3px solid black')]},
705
+ {'selector': 'thead th:nth-child(21)', 'props': [('border-right', '3px solid black')]}, # Thick right border for the 3rd header
706
+ {'selector': 'thead th:nth-child(23)', 'props': [('border-right', '3px solid black')]}, # Thick right border for the 3rd header
707
 
708
 
709
  {'selector': 'th.col_heading.level0', 'props': [('border-right', '3px solid black')]},
 
742
  .set_properties(**{'Height': '8px'}, **{'text-align': 'center'}, overwrite=False)
743
  .hide_index()
744
  .set_properties(**{'border': '1px black solid'})
745
+ # .set_table_styles([{'selector': 'thead th:nth-child(1)', 'props': [('min-width', '100px')]}], overwrite=False)
746
+ .set_table_styles([{'selector': 'thead th:nth-child(1)', 'props': [('min-width', '225px')]}], overwrite=False)
747
  # .set_table_styles([{'selector': 'thead th:nth-child(2)', 'props': [('min-width', '250px')]}], overwrite=False)
748
  .set_table_styles([{'selector': 'thead th', 'props': [('height', '30px')]}], overwrite=False)
749
  .apply(highlight_alternate_rows, axis=0, subset=df_pandas.columns[:])