`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'))
`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'))