Skip to content
New issue

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

Tabulator column grouping when column names are numeric #2972

Closed
thuydotm opened this issue Dec 3, 2021 · 0 comments · Fixed by #2987
Closed

Tabulator column grouping when column names are numeric #2972

thuydotm opened this issue Dec 3, 2021 · 0 comments · Fixed by #2987
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@thuydotm
Copy link
Contributor

thuydotm commented Dec 3, 2021

ALL software version info

panel 0.13.0a19
bokeh 2.4.2

Description of expected behavior and the observed behavior

When grouping columns with Tabulator, if the column names are of numeric dtype then they are not grouped properly.

Complete, minimal, self-contained example code that reproduces the issue

import panel as pn
import pandas as pd

df = pd.DataFrame({
    1.0   : [1, 2, 3],
    2.0   : [1, 2, 3],
    3     : [1, 2, 3],
    'str1': [1, 2, 3],
    'str2': [1, 2, 3],
})

table = pn.widgets.Tabulator(
    value=df,
    disabled=False,
    layout='fit_data_stretch',
    groups = {
        'numbers': df.columns[:3],
        'others': df.columns[3:],
    }
)

tmpl = pn.template.MaterialTemplate()
tmpl.main.append(table)
tmpl.servable()

image

@philippjfr philippjfr added the type: bug Something isn't correct or isn't working label Dec 3, 2021
@philippjfr philippjfr added this to the v0.12.6 milestone Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants