Basic Functionality of the Pandas Series  

  • Attribute or Method in a Pandas DataFrame object:

    • T = return the transpose

    • axes = the list of the row and column axis labels

    • dtypes = the data types of the object stored in each column of the dataframe.

    • empty = True if the series is empty.

    • ndim = the # axes (= # columns)

    • shape = a tuple representing the dimensionality of the DataFrame.

    • values = returns the data in a Numpy (2 dim) ndarray.

    • head(n) = returns the first n rows (default n = 5).

    • tail(n) = returns the last n rows (default n = 5).

DEMO: progs/df06.py