title: get the index of counted dataframe
body: <p>I am trying to return the index of DataFrame statement, first I am loading a csv (CSV example below)</p>
  <p><a href="https://i.stack.imgur.com/XL3uM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XL3uM.png" alt="" /></a></p>
  <p>I created a code to count the number of each hour and return the max number as below</p>
  <pre><code>import pandas as pd
  
  filename = 'mylist.csv'
  
  df = pd.read_csv(filename)
  
  df['Start Time'] = df['Start Time'].astype('datetime64[ns]')
  
  df['hour'] = df['Start Time'].dt.hour
  
  # find the most common hour (from 0 to 23)
  popular_hour = df.groupby(['hour'])['hour'].count().max()
  
  print('Most Frequent Start Hour:', popular_hour)
  </code></pre>
  <p>what I am trying to do is to return the hour not the counted value, I've tried <code>index</code> as below but doesn't work</p>
  <pre><code>popular_hour = df.groupby(['hour'])['hour'].count().max().index.values
  </code></pre>