Gap in top row when fixing header (Dash table)

When I fix the header with fixed_rows={'headers': True, 'data': 0}, a gap appears at the top of the table as shown in the image.

Without example code, this is hard to debug. There is nothing inherently wrong with the fixed_rows statement you referenced.

html.Div([
                    html.H5(["Mensual"], style={"font-family": "Charter"}),
                    html.Div([
                        dash_table.DataTable(
                            id="table",
                            columns=[{"name": i, "id": i, 'type': 'numeric',
                                      'format': Format(group=Group.yes, groups=3, group_delimiter=" ",
                                                       decimal_delimiter=",", )}
                                     for i in df_client_active_users_month_cohort.columns[:]],
                            data=df_client_active_users_month_cohort.to_dict('records'),
                            fixed_rows={'headers': True, 'data': 0},
                            fixed_columns={'headers': True, 'data': 1},
                            style_table={'overflow': 'scroll', 'minWidth': '100%'},
                            style_header={'background-color': '#ddd', 'textAlign': 'center'},
                            style_data_conditional=[{'if': {'column_id': 'Mes'}, 'background-color': '#ddd', 'textAlign': 'center'}],
                            style_cell={'minWidth': '100px', 'font_size': '12px'},
                        ),
                    ], className="img_conf"
                    ),
                ], className="six columns"
                ),

sorry, but this still is not sufficient. The sample code should be 100% complete…i.e. something that can be copied/pasted into a dev environment and run w/o modification.

what is df_client_active_users_month_cohort?
what is Group.yes?

Not trying to be difficult but you bet better help if your sample code is complete.

El problema no es mio pero se lo completé al amigo.
from dash import Dash, dcc, Input, Output, html
from dash.dash_table import DataTable
from dash.dash_table.Format import Format, Group, Prefix, Scheme, Symbol
import dash_bootstrap_components as dbc
import pandas as pd
import numpy as np
import plotly_express as px
df = [{‘Mes’: ‘2020-11’,
‘2020-11’: 5,
‘2020-12’: 0,
‘2021-01’: 0,
‘2021-02’: 0,
‘2021-03’: 0},
{‘Mes’: ‘2020-12’,
‘2020-11’: 4,
‘2020-12’: 16.0,
‘2021-01’: 0,
‘2021-02’: 0,
‘2021-03’: 0},
{‘Mes’: ‘2021-01’,
‘2020-11’: 4,
‘2020-12’: 14.0,
‘2021-01’: 8.0,
‘2021-02’: 0,
‘2021-03’: 0},
{‘Mes’: ‘2021-02’,
‘2020-11’: 3,
‘2020-12’: 13.0,
‘2021-01’: 8.0,
‘2021-02’: 13.0,
‘2021-03’: 0},
{‘Mes’: ‘2021-03’,
‘2020-11’: 3,
‘2020-12’: 11.0,
‘2021-01’: 8.0,
‘2021-02’: 10.0,
‘2021-03’: 15.0},
{‘Mes’: ‘2021-04’,
‘2020-11’: 3,
‘2020-12’: 10.0,
‘2021-01’: 7.0,
‘2021-02’: 8.0,
‘2021-03’: 13.0}]
df_client_active_users_month_cohort = pd.DataFrame(df)
external_stylesheets = [“https://codepen.io/chriddyp/pen/bWLwgP.css”]
app = Dash(name, external_stylesheets=external_stylesheets)

app.layout = html.Div([
html.H5([“Mensual”], style={“font-family”: “Charter”}),
html.Div([
DataTable(
id=“table”,
columns=[{“name”: i, “id”: i, ‘type’: ‘numeric’,
‘format’: Format(group=Group.yes, groups=3, group_delimiter=" “,
decimal_delimiter=”,", )}
for i in df_client_active_users_month_cohort.columns[:]],
data=df_client_active_users_month_cohort.to_dict(‘records’),
fixed_rows={‘headers’: True, ‘data’: 0},
fixed_columns={‘headers’: True, ‘data’: 1},
style_table={‘overflow’: ‘scroll’, ‘minWidth’: ‘100%’},
style_header={‘background-color’: ‘#ddd’, ‘textAlign’: ‘center’},
style_data_conditional=[{‘if’: {‘column_id’: ‘Mes’}, ‘background-color’: ‘#ddd’, ‘textAlign’: ‘center’}],
style_cell={‘minWidth’: ‘100px’, ‘font_size’: ‘12px’},
),
], className=“img_conf”
),
], className=“six columns”)
if name == ‘main’:
app.run_server(port=5043)

No me pone esa fila que el indica.
image

Thank you for your answers. I manage to solve it by changing the CSS of the dash-fixed-row class, it was set to 55.5 px by default, thus I changed to the default size.

.dash-fixed-row{
  height: 30px;
}