Can't display tabulator widget in Pyscript

66 views Asked by At

There is a task to display Dataframe in browser using Pyscript. It uses Panel and Tabulator. the point is that Tabulator is not displayed. The code is attached. This code is not working


<html>

<head>
 
    
</head>

<body>
<div id="simple_app"></div>
    <py-script>

import panel as pn

    // Создаем DataFrame
    df = pd.DataFrame({
      'int': [1, 2, 3],
      'float': [3.14, 6.28, 9.42],
      'str': ['A', 'B', 'C'],
      'bool': [True, False, True]
    })

    table = pn.widgets.Tabulator(df)   
    pn.Row(table).servable(target='simple_app')

    </py-script>
</body>

</html>

The ideal solution is to add some fileinput fields (which are responsible for loading csv) and a button after clicking which the loaded csv will be displayed using Tabulator widget

0

There are 0 answers