Skip to content

Plotly Express cannot process wide-form data with columns of different type #3394

Description

@jorge243

Hi there! I’ve been trying to use px.scatter with a wide-format dataframe but, as “expected”, when i include columns in the dataframe that are not numeric i get the ValueError: Plotly Express cannot process wide-form data with columns of different type.

I can see the reason for this behavior when using something like a box plot. But i don’t get why this could be a problem for something like px.scatter when using something like x=df.columns, y=df.index, facet_col=‘variable’ where EACH wide dataframe column would be independent making its dtype irrelevant in comparison with the other columns. Could this condition be “skipped” in future versions when using a px.scatter like this?

Activity

  1. subsurfaceiodev commented on Sep 23, 2022

    @subsurfaceiodev

    Hey! Any updates on this?

  2. gvwilson commented on Jul 4, 2024

    @gvwilson
    Contributor

    Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for several years, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Thanks for your help - @gvwilson

  3. subsurfaceiodev commented on Jul 4, 2024

    @subsurfaceiodev

    Hi, its still very relevant as of latest plotly's version == 5.22.0.

  4. self-assigned this
    on Jul 5, 2024
  5. gvwilson commented on Jul 5, 2024

    @gvwilson
    Contributor

    thanks @jorge243 - I'll add it to our backlog, but unfortunately I can't promise we'll get to it any time soon :-(

  6. removed their assignment
    on Aug 2, 2024
  7. changed the title [-]Px.scatter ValueError: Plotly Express cannot process wide-form data with columns of different type[/-] [+]Plotly Express cannot process wide-form data with columns of different type[/+] on Aug 12, 2024
  8. emilykl commented on Aug 31, 2026

    @emilykl
    Contributor

    @jorge243 @subsurfaceiodev I'm curious whether this issue is still present as of plotly.py v7.0.0. There have been some significant changes since v5.22, most notably the refactor to make Plotly Express dataframe-agnostic via Narwhals (#4790). If either of you is able to provide a standalone code snippet of what you're trying to do, we're happy to look into it.

  9. subsurfaceiodev commented on Aug 31, 2026

    @subsurfaceiodev

    Hi @emilykl ! An MRE is located at #4266. The issue is still present on latest version of plotly (7.0.0).

  10. emilykl commented on Sep 1, 2026

    @emilykl
    Contributor

    Thanks for the quick follow-up @subsurfaceiodev, appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogbugsomething broken

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions