We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import pandas as pd df = pd.DataFrame({ 'time': pd.to_datetime(['2020-01-01 00:00:00'] * 50 + ['2020-01-01 00:30:00'] * 50), 'value': range(100), 'group': ['A', 'B'] * 50 }) # Aggregate values for duplicate time entries by taking the mean df_agg = df.groupby(['time', 'group']).first().reset_index() pivot_df = df_agg.pivot(index="time", columns="group", values=["value"]) import panel as pn pn.extension() display(pivot_df) pn.widgets.Tabulator(pivot_df)
The work around is to set pivot_df.columns = pivot_df.columns.as_flat_index()
pivot_df.columns = pivot_df.columns.as_flat_index()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The work around is to set
pivot_df.columns = pivot_df.columns.as_flat_index()
The text was updated successfully, but these errors were encountered: