We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d4a7c32 commit 05c715fCopy full SHA for 05c715f
packages/python/plotly/plotly/express/_core.py
@@ -2042,7 +2042,9 @@ def get_groups_and_orders(args, grouper):
2042
groups = {tuple(single_group_name): df}
2043
else:
2044
required_grouper = [g for g in grouper if g != one_group]
2045
- grouped = df.groupby(required_grouper, sort=False) # skip one_group groupers
+ grouped = df.groupby(
2046
+ required_grouper, sort=False, observed=True
2047
+ ) # skip one_group groupers
2048
group_indices = grouped.indices
2049
sorted_group_names = [
2050
g if len(required_grouper) != 1 else (g,) for g in group_indices
0 commit comments