piper.verbs.sample

piper.verbs.sample(df: pandas.core.frame.DataFrame, n: int = 2, shape: bool = True, *args, **kwargs)[source]

show sample data

This is a wrapper function rather than using e.g. df.sample() For details of args, kwargs - see help(pd.DataFrame.sample)

Examples

sample(df)
Parameters
  • df – dataframe

  • shape – show shape information as a logger.info() message

  • *args – arguments for wrapped function

  • **kwargs – keyword-parameters for wrapped function

Returns

Return type

A pandas dataframe