Skip to content

PerformanceWarning: DataFrame is highly fragmented. for Plotly v5.15.0 #4287

Closed
@crossingchen

Description

@crossingchen

Plotly v5.15.0 on mac, error in Library/Python/3.9/lib/python/site-packages/plotly/express/_core.py, Line 1223.
PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling frame.insert many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use newframe = frame.copy()

This happens when trying to plot a line chart from a csv file with a large number of columns. And the chart never appears (...or takes too long to appear and I killed the process). This error does not occur when the number of columns in the csv is limited.

In the csv file, the first column serves as the x-axis and for the rest of the columns, each column is plotted as a line in the line chart.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions