wrap parsing function
This commit is contained in:
parent
a9c74db4d1
commit
d5c14300ae
@ -3,7 +3,7 @@ from __future__ import annotations
|
|||||||
from collections.abc import Mapping, Set
|
from collections.abc import Mapping, Set
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
from delta_barth.errors import FeaturesMissingError
|
from delta_barth.errors import FeaturesMissingError, wrap_result
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
@ -51,3 +51,12 @@ def preprocess_features(
|
|||||||
_check_needed_features(data, target_features)
|
_check_needed_features(data, target_features)
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
||||||
|
@wrap_result()
|
||||||
|
def preprocess_features_wrapped(
|
||||||
|
data: pd.DataFrame,
|
||||||
|
feature_map: Mapping[str, str],
|
||||||
|
target_features: Set[str],
|
||||||
|
) -> pd.DataFrame: # pragma: no cover
|
||||||
|
return preprocess_features(data, feature_map, target_features)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user