pandas df get row and column names code example Example: dataframe get row by name row_data = df.loc[ 'a' , : ]