acidbase.headtail

acidbase.headtail(x: DataFrame | list | ndarray, n: int = 2) DataFrame | list | ndarray

Return (and print) the first and last n elements / rows.

Parameters:
  • x (DataFrame, list, or array) – Input to summarize.

  • n (int) – Number of elements/rows to take from each end.

Returns:

Combined head+tail of x, matching the input type.

Return type:

DataFrame, list, or numpy.ndarray