how to get the length of a pandas series code example Example 1: length of pandas dataframe df.shape[0] Example 2: length of series pandas pandas.Series.size