def METHOD_NAME():
    import pandas as pd
    df = pd.DataFrame(data={'col1': [1, 2], 'col2': [3, 4]})
    ui.table(
        columns=[{'name': col, 'label': col, 'field': col} for col in df.columns],
        rows=df.to_dict('records'),
    )