mirror of
https://github.com/apache/superset.git
synced 2026-04-12 12:47:53 +00:00
feat(advanced analysis): support MultiIndex column in post processing stage (#19116)
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
# under the License.
|
||||
import pytest
|
||||
|
||||
from superset.exceptions import QueryObjectValidationError
|
||||
from superset.exceptions import InvalidPostProcessingError
|
||||
from superset.utils.pandas_postprocessing import diff
|
||||
from tests.unit_tests.fixtures.dataframes import timeseries_df, timeseries_df2
|
||||
from tests.unit_tests.pandas_postprocessing.utils import series_to_list
|
||||
@@ -39,7 +39,7 @@ def test_diff():
|
||||
assert series_to_list(post_df["y1"]) == [-1.0, -1.0, -1.0, None]
|
||||
|
||||
# invalid column reference
|
||||
with pytest.raises(QueryObjectValidationError):
|
||||
with pytest.raises(InvalidPostProcessingError):
|
||||
diff(
|
||||
df=timeseries_df, columns={"abc": "abc"},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user