class snorkel.slicing.PandasSFApplier(lfs)[source]

Bases: snorkel.labeling.apply.pandas.PandasLFApplier

SF applier for a Pandas DataFrame.

See snorkel.labeling.core.PandasLFApplier for details.


Initialize self. See help(type(self)) for accurate signature.

Return type




Initialize self.

apply(df[, progress_bar, fault_tolerant, …])

Label Pandas DataFrame of data points with LFs.

apply(df, progress_bar=True, fault_tolerant=False, return_meta=False)[source]

Label Pandas DataFrame of data points with LFs.

  • df (DataFrame) – Pandas DataFrame containing data points to be labeled by LFs

  • progress_bar (bool) – Display a progress bar?

  • fault_tolerant (bool) – Output -1 if LF execution fails?

  • return_meta (bool) – Return metadata from apply call?

Return type

Union[ndarray, Tuple[ndarray, ApplierMetadata]]


  • np.ndarray – Matrix of labels emitted by LFs

  • ApplierMetadata – Metadata, such as fault counts, for the apply call