You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A future warning about pandas DataFrame.append method being deprecated in future pandas releases, and to replace with pandas.concat methods. I found this warning in plotly/plotly.py/packages/python/plotly/plotly/express/_core.py:271 but there may be other places in plotly when DataFrame.append method is used.
I just stumbled across those annoying warnings as well. Seems like a good first issue to me, so I will start to work on this now. Dev environment is already set up and right now I am identifying the spots where those changes need to be applied.
I will keep you updated as soon as there is a first commit.
Hi,
@BjoernLudwigPTB @nicolaskruchten
I saw you fixed this in a commit, but I'm still getting an error when I try to use plotly.express polar charts using streamlit.
And for some reason, it makes the app crash when it's deployed, but not when it runs on localhost.
python3.10/site-packages/plotly/express/_core.py:271: FutureWarning:
The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead
This is the piece of code where it happens:
def make_trace_kwargs(args, trace_spec, trace_data, mapping_labels, sizeref):
"""Populates a dict with arguments to update trace
Parameters
----------
args : dict
args to be used for the trace
trace_spec : NamedTuple
which kind of trace to be used (has constructor, marginal etc.
attributes)
trace_data : pandas DataFrame
data
mapping_labels : dict
to be used for hovertemplate
sizeref : float
marker sizeref
Returns
-------
trace_patch : dict
dict to be used to update trace
fit_results : dict
fit information to be used for trendlines
"""
if "line_close" in args and args["line_close"]:
trace_data = trace_data.append(trace_data.iloc[0])
I upgraded plotly to version 5.14.1, and still get this error
Hi, when will the fix for this be released. I am still getting the warning when using plotly.express.line_polar:
Python311\Lib\site-packages\plotly\express\_core.py:271: FutureWarning:
The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.
Pandas gives another warning on groupby on categorical columns now, regarding the default values:
.../venv/lib/python3.10/site-packages/plotly/express/_core.py:2044: FutureWarning:
The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=Fals
e to retain current behavior or observed=True to adopt the future default and silence this warning.
The easy solution would be to pass observed=False to that groupby call. Not sure if that is the desired behavior, though.
Activity
BjoernLudwig commentedon Apr 18, 2022
I just stumbled across those annoying warnings as well. Seems like a good first issue to me, so I will start to work on this now. Dev environment is already set up and right now I am identifying the spots where those changes need to be applied.
I will keep you updated as soon as there is a first commit.
Bass2015 commentedon May 18, 2023
Hi,
@BjoernLudwigPTB @nicolaskruchten
I saw you fixed this in a commit, but I'm still getting an error when I try to use plotly.express polar charts using streamlit.
And for some reason, it makes the app crash when it's deployed, but not when it runs on localhost.
This is the piece of code where it happens:
I upgraded plotly to version 5.14.1, and still get this error
BjoernLudwig commentedon May 18, 2023
Oh no, I must have missed that. 😞 But it seems to be already addressed by a8af752 two weeks ago.
Bass2015 commentedon May 20, 2023
Yeah, I just saw it's fixed, but still unreleased. Thanx for this tools, btw!
JT-NHS-UHMBT commentedon Aug 16, 2023
Hi, when will the fix for this be released. I am still getting the warning when using plotly.express.line_polar:
alexcjohnson commentedon Aug 16, 2023
@JT-NHS-UHMBT - #4190 fixed this and was released in v5.15.0, what version do you have?
JT-NHS-UHMBT commentedon Aug 17, 2023
Thanks @alexcjohnson all working now, I was using v5.11.0 - should have checked that first, silly mistake!
MKimiSH commentedon Nov 30, 2023
Pandas gives another warning on
groupbyon categorical columns now, regarding the default values:The easy solution would be to pass
observed=Falseto thatgroupbycall. Not sure if that is the desired behavior, though.alexcjohnson commentedon Nov 30, 2023
@MKimiSH this was fixed in #4437 (🙇 @arcanaxion) and will be included in the next release.