mirror of
https://github.com/apache/superset.git
synced 2026-05-08 01:15:46 +00:00
feat(advanced analysis): support MultiIndex column in post processing stage (#19116)
This commit is contained in:
committed by
Ville Brofeldt
parent
f8a92de75c
commit
9bc76337cf
@@ -22,7 +22,7 @@ from numpy import nan
|
||||
from numpy.testing import assert_array_equal
|
||||
from pandas import DataFrame
|
||||
|
||||
from superset.exceptions import QueryObjectValidationError
|
||||
from superset.exceptions import InvalidPostProcessingError
|
||||
from superset.utils.core import DTTM_ALIAS, PostProcessingContributionOrientation
|
||||
from superset.utils.pandas_postprocessing import contribution
|
||||
|
||||
@@ -40,10 +40,10 @@ def test_contribution():
|
||||
"c": [nan, nan, nan],
|
||||
}
|
||||
)
|
||||
with pytest.raises(QueryObjectValidationError, match="not numeric"):
|
||||
with pytest.raises(InvalidPostProcessingError, match="not numeric"):
|
||||
contribution(df, columns=[DTTM_ALIAS])
|
||||
|
||||
with pytest.raises(QueryObjectValidationError, match="same length"):
|
||||
with pytest.raises(InvalidPostProcessingError, match="same length"):
|
||||
contribution(df, columns=["a"], rename_columns=["aa", "bb"])
|
||||
|
||||
# cell contribution across row
|
||||
|
||||
Reference in New Issue
Block a user