head() and tail() (Pandas)

df.head(n) returns the first n rows of a DataFrame or Series and df.tail(n) returns the last n; both default to 5. They are the quickest way to peek at data…