PablocFonseca / streamlit-aggrid

Implementation of Ag-Grid component for Streamlit
https://pypi.org/project/streamlit-aggrid/
MIT License
991 stars 191 forks source link

multi column headers raise error #206

Open Fanstyone opened 1 year ago

Fanstyone commented 1 year ago

`import streamlit as st import pandas as pd from st_aggrid import AgGrid

dataframe = pd.read_excel('test.xlsx') data = dataframe.pivot_table(index=['type'], columns=['country','city'], values='payment', aggfunc='sum').reset_index()

AgGrid(data) `

When i use pandas pivot_table to create a new dataframe with multi column headers,
raise MarshallComponentException: ("Could not convert component args to JSON. If you're using custom JsCode objects on gridOptions, ensure that allow_unsafe_jscode is True.", TypeError('keys must be str, int, float, bool or None, not tuple'))