code: def nullify(col: pd.Series, perc: float = 1) -> pd.Series:
      """
      Replace a percenteage of values in  the input Series by np.nan
  
      Parameters
      ----------
      col : pd.Series
          A Pandas' Series
  
      perc : float
          Percentage to be replaced by no.nan
  
      Returns
      ----------
      A transformed pd.Series
      """
      # default behavior to nullify whole column
      n = len(col)
      ix_to_nan = random.sample(range(n), int(n * perc))
      ret = col.copy(deep=True)
      ret.iloc[ix_to_nan] = np.nan
      return ret
  
file_path: fklearn/src/fklearn/validation/perturbators.py
imports: import random
  from typing import List
  import numpy
  from toolz import curry
  import pandas
  from fklearn.types import ColumnWisePerturbFnType
label_desc: Use image node_id 3 for calling a global function with example usage: nullify(col, perc) and returns: ret