piper.verbs.head¶
-
piper.verbs.head(df: pandas.core.frame.DataFrame, n: int = 4, shape: bool = True, tablefmt: bool = False, precision: int = 0) → pandas.core.frame.DataFrame[source]¶ show first n records of a dataframe.
Like the corresponding R function, displays the first n records. Alternative to using df.head()
Examples
head(df)
- Parameters
df – pandas dataframe
n – Default n=4. number of rows to display
shape – Default True. Show shape information
tablefmt – Default False. If supplied, tablefmt keyword value can be any valid format supplied by the tabulate package
precision – Default 0. Number precision shown if tablefmt specified
- Returns
- Return type
A pandas dataframe