snorkel.slicing.slice_dataframe¶
-
snorkel.slicing.
slice_dataframe
(df, slicing_function)[source]¶ Return a dataframe with examples corresponding to specified
SlicingFunction
.- Parameters
df (
DataFrame
) – A pandas DataFrame that will be slicedslicing_function (
SlicingFunction
) – SlicingFunction which will operate over df to return a subset of examples; function returns a subset of data for whichslicing_function
output is True
- Returns
A DataFrame including only examples belonging to slice_name
- Return type
pd.DataFrame