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
Pandas looks like it will be changing the semantics of the get_group() method in a future version, specifically for groupings created using a length-1 list-like. The current behavior of it accepting a single value in get_group() is deprecated, and will require using a tuple in the future. (This only applies to groupings created with a length-1 list (groupby(["a"]),) groupings created with a single value (groupby("a")) are unaffected.)
import plotly.express as px
px.scatter(x=[1, 2, 3], y=[10, 20, 30], color=["a", "b", "a"])
/opt/conda/lib/python3.11/site-packages/plotly/express/_core.py:2065: FutureWarning: When grouping with a length-1 list-like, you will need to pass a length-1 tuple to get_group in a future version of pandas. Pass `(name,)` instead of `name` to silence this warning.
The text was updated successfully, but these errors were encountered:
The behavior that causes the warning is fixed in v5.19.0, but if you're using an older version, then I believe this should silence the warning:
importwarningswarnings.filterwarnings(
action="ignore",
message=r"When grouping with a length-1 list-like, you will need to pass a length-1 tuple to get_group in a future version of pandas\. Pass `\(name,\)` instead of `name` to silence this warning\.",
category=FutureWarning,
module=r"plotly\.express\._core",
)
Pandas looks like it will be changing the semantics of the
get_group()
method in a future version, specifically for groupings created using a length-1 list-like. The current behavior of it accepting a single value inget_group()
is deprecated, and will require using a tuple in the future. (This only applies to groupings created with a length-1 list (groupby(["a"])
,) groupings created with a single value (groupby("a")
) are unaffected.)The text was updated successfully, but these errors were encountered: