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

Pandas interface doesn't handle kdims part of a Pandas MultiIndex #6298

Closed
maximlt opened this issue Jun 28, 2024 · 1 comment · Fixed by #6299
Closed

Pandas interface doesn't handle kdims part of a Pandas MultiIndex #6298

maximlt opened this issue Jun 28, 2024 · 1 comment · Fixed by #6299
Labels
type: bug Something isn't correct or isn't working

Comments

@maximlt
Copy link
Member

maximlt commented Jun 28, 2024

import numpy as np
import pandas as pd
import holoviews as hv

hv.extension('bokeh')

dti = pd.date_range(start='1/1/2018', end='1/08/2018')

other = list(range(len(dti)))

t = pd.DataFrame(
    dict(
        n=range(5, len(dti) + 5),
        m=range(10, len(dti) + 10),
    )
)
dfm = pd.MultiIndex.from_frame(t)
df = pd.DataFrame(np.random.randn(len(dfm)), index=dfm, columns=['test'])
p = hv.Curve(df, 'm', 'test')
p

The plot correctly has the m x-axis but the values are off.

image

And indeed they have been ignored in favor of a default "range-index" column that was created.

image

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant