pandera.Index.validate

Index.validate(check_obj, head=None, tail=None, sample=None, random_state=None, lazy=False)[source]

Validate DataFrameSchema or SeriesSchema Index.

Check_obj

pandas DataFrame of Series containing index to validate.

Parameters
  • head (Optional[int]) – validate the first n rows. Rows overlapping with tail or sample are de-duplicated.

  • tail (Optional[int]) – validate the last n rows. Rows overlapping with head or sample are de-duplicated.

  • sample (Optional[int]) – validate a random sample of n rows. Rows overlapping with head or tail are de-duplicated.

  • random_state (Optional[int]) – random seed for the sample argument.

Return type

Union[DataFrame, Series]

Returns

validated DataFrame or Series.