mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix: warning emits an error (#28524)
This commit is contained in:
committed by
GitHub
parent
3ec3f0a610
commit
d466383df2
@@ -81,5 +81,10 @@ def compare( # pylint: disable=too-many-arguments
|
||||
df = pd.concat([df, diff_df], axis=1)
|
||||
|
||||
if drop_original_columns:
|
||||
df = df.drop(source_columns + compare_columns, axis=1)
|
||||
level = (
|
||||
0
|
||||
if isinstance(df.columns, pd.MultiIndex) and df.columns.nlevels > 1
|
||||
else None
|
||||
)
|
||||
df = df.drop(source_columns + compare_columns, axis=1, level=level)
|
||||
return df
|
||||
|
||||
Reference in New Issue
Block a user