get rows in pandas dataframe code example Example 1: pandas dataframe show one row df.iloc[0,:] Example 2: how to use loc and iloc in pandas >>> df.iloc[0, 1] 2