Skip to content

Exception raised with empty dataframe in v6.0.0rc0 #4919

Closed
@KoolADE85

Description

@KoolADE85

Our App Studio test suite caught an issue with this code in the latest RC of plotly.py:

df = pd.DataFrame({
  'x': [],
  'y': [],
})
fig = px.bar(df, x="x", y="y")

In v5.24.1, this produces an empty graph as expected
In v6.0.0rc0, this raises an Exception: ValueError: zero-size array to reduction operation maximum which has no identity

This is a simple case, but a more realistic use case would be when a dataframe is filtered down to nothing due to user input.

Metadata

Metadata

Assignees

Labels

P1needed for current cyclebugsomething broken

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions