plotly / plotly/plotly.py

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

Open
#3,394 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names px.scatter and a wide-form dataframe but no files or tests; start by reproducing the ValueError with mixed-type columns and tracing the wide-form validation. Done means determining whether scatter can accept independently typed columns while preserving appropriate validation for other chart types, with regression coverage for the requested case.

Written by the indexing model from the issue text.

Assessment

Tech stack
plotly, python
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.