title: Python: How to access a subordinate Column?
body: <p>i'm Sven and  right before to say i am an absolute beginner with Python. I rode the books &quot;Beginning with Python&quot; and &quot;Python for Data Analysis&quot; to get at least a basic understanding for what i'm doing. My goal with the code below is, that i would like to show the Volume of S&amp;P500 with a rolling Mean of the last 250 days. Means combine a barchart(seaborn) with a line chart(matplotlib.pyplot).</p>
  <p>The problem arise in plotting the &quot;S&amp;P500 data by Volume with seaborn as a barchart because i can not access on the subordinate column &quot; Date&quot; . I have an idea but im not quite sure how to start. Has anybody an idea? Thanks a lot.</p>
  <p>My approach is anywher between Index, Hierachical and Grouping.</p>
  <pre><code>           Open   High    Low  Close  Adj Close     Volume
  Date                                                        
  1993-02-01 438.78 442.52 438.78 442.52     442.52  238570000
  1993-02-02 442.52 442.87 440.76 442.55     442.55  271560000
  1993-02-03 442.56 447.35 442.56 447.20     447.20  345410000
  1993-02-04 447.20 449.86 447.20 449.56     449.56  351140000
  1993-02-05 449.56 449.56 446.95 448.93     448.93  324710000
  
  import pandas as pd
  import numpy as np
  import yfinance as yf
  from datetime import datetime, timedelta
  import matplotlib.pyplot as plt
  import seaborn as sns
  
  yesterday = datetime.now()-timedelta(1)
  datetime.strftime(yesterday, &quot;%Y-%m-%d&quot;)
  
  SP500 = yf.download('^GSPC', start='1993-02-01', end=yesterday)
  pd.set_option('display.float_format', lambda x: '%.2f' % x)
  
  SP500f = SP500.head()
  SP500f.groupby
  
  #Stats_Vol = SP500[&quot;Volume&quot;]
  #Date = SP500[&quot;Date&quot;]
  #print(Stats_Vol)
  #print(Stats_Vol.describe())
  
  #sns.barplot(data=SP500, y=&quot;Volume&quot;)
  #print(Stats_Vol.rolling(250).mean().plot())
  plt.show()
  
   
  </code></pre>