get index value as a string pandas code example Example: index of a string index dataframe df[df.index.str.startswith('U')]