Skip to content

Commit 16b6792

Browse files
committed
Fixed issue where expected_total_height returns as a df instead of a series
1 parent 584a4a9 commit 16b6792

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pandas/tests/plotting/test_misc.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ def _df_bar_subplot_checker(df_bar_data, df_bar_df, subplot_data_df, subplot_col
729729
]
730730

731731
if len(subplot_columns) == 1:
732-
expected_total_height = df_bar_df.loc[:, subplot_columns]
732+
expected_total_height = df_bar_df.loc[:, subplot_columns[0]]
733733
else:
734734
expected_total_height = df_bar_df.loc[:, subplot_columns].sum(axis=1)
735735

@@ -747,7 +747,6 @@ def _df_bar_subplot_checker(df_bar_data, df_bar_df, subplot_data_df, subplot_col
747747
tm.assert_series_equal(
748748
height_iter, expected_total_height, check_names=False, check_dtype=False
749749
)
750-
751750
else:
752751
# Checks each preceding bar ends where the next one starts
753752
next_start_coord = subplot_sliced_by_source[i + 1]["y_coord"]

0 commit comments

Comments
 (0)