@@ -1939,7 +1939,7 @@ def get_groups_and_orders(args, grouper):
1939
1939
groups = {tuple (single_group_name ): df }
1940
1940
else :
1941
1941
grouped = df .groupby (grouper , sort = False )
1942
- group_indices = grouped .groups
1942
+ group_indices = grouped .indices
1943
1943
sorted_group_names = [g if len (grouper ) != 1 else (g ,) for g in group_indices ]
1944
1944
1945
1945
for i , col in reversed (list (enumerate (grouper ))):
@@ -1951,7 +1951,9 @@ def get_groups_and_orders(args, grouper):
1951
1951
else - 1 ,
1952
1952
)
1953
1953
1954
- groups = {s : grouped .get_group (s ) for s in sorted_group_names }
1954
+ groups = {
1955
+ s : grouped .get_group (s if len (s ) > 1 else s [0 ]) for s in sorted_group_names
1956
+ }
1955
1957
return groups , orders
1956
1958
1957
1959
@@ -2218,6 +2220,8 @@ def make_figure(args, constructor, trace_patch=None, layout_patch=None):
2218
2220
fig .update_layout (layout_patch )
2219
2221
if "template" in args and args ["template" ] is not None :
2220
2222
fig .update_layout (template = args ["template" ], overwrite = True )
2223
+ for f in frame_list :
2224
+ f ["name" ] = str (f ["name" ])
2221
2225
fig .frames = frame_list if len (frames ) > 1 else []
2222
2226
2223
2227
if args .get ("trendline" ) and args .get ("trendline_scope" , "trace" ) == "overall" :
0 commit comments