Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pandas 2.0 - px.line_polar AttributeError #4236

Closed
ronjupyter opened this issue Jun 8, 2023 · 4 comments
Closed

Pandas 2.0 - px.line_polar AttributeError #4236

ronjupyter opened this issue Jun 8, 2023 · 4 comments

Comments

@ronjupyter
Copy link

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'
@alexcjohnson
Copy link
Collaborator

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

@curiouscod3
Copy link

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.

@David-hu01
Copy link

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

@Coding-with-Adam
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants