Skip to content

Pandas 2.0 - px.line_polar AttributeError #4236

Closed

Description

@ronjupyter

Error log from Streamlit:

AttributeError: 'DataFrame' object has no attribute 'append'

<Timestamp> Uncaught app exception

Traceback (most recent call last):

  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/scriptrunner/script_runner.py", line 557, in _run_script

    exec(code, module.__dict__)

  File "/app/<app_name>/streamlit_app.py", line 59, in <module>

    fig = px.line_polar(df, r="r", theta="theta", line_close=True, ...

  File "/home/appuser/venv/lib/python3.9/site-packages/plotly/express/_chart_types.py", line 998, in line_polar

    return make_figure(args=locals(), constructor=go.Scatterpolar)

  File "/home/appuser/venv/lib/python3.9/site-packages/plotly/express/_core.py", line 2173, in make_figure

    patch, fit_results = make_trace_kwargs(

  File "/home/appuser/venv/lib/python3.9/site-packages/plotly/express/_core.py", line 271, in make_trace_kwargs

    trace_data = trace_data.append(trace_data.iloc[0])

  File "/home/appuser/venv/lib/python3.9/site-packages/pandas/core/generic.py", line 5989, in __getattr__

    return object.__getattribute__(self, name)

AttributeError: 'DataFrame' object has no attribute 'append'

Activity

  1. alexcjohnson commented on Jun 8, 2023

    @alexcjohnson
    Collaborator

    Fixed already by #4190, we expect to release today. Thanks!

  2. curiouscod3 commented on Jul 1, 2023

    @curiouscod3

    Python 3.11.3
    plotly 5.15.0
    pandas 2.0.2

    This error is still happening in my code when using plotly.express line_polar.

  3. David-hu01 commented on May 14, 2024

    @David-hu01

    so, there is still a problem. pls fix it,tks!

  4. Coding-with-Adam commented on May 16, 2024

    @Coding-with-Adam
    Contributor

    @David-hu01
    can you please share the Plotly & Python versions you're using?

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions