title: How to use " iloc " and " loc " method in place of .ix method for index slicing let's just say to get the data between a particular time frame?
body: <pre><code>sns.distplot(returns.ix['2015-01-01':'2015-12-31']['MS Return'],color='green',bins=100)
  </code></pre>
  
  <p>while running this code I am getting an error so how to replace it with '<code>iloc</code>' and '<code>loc</code>' method.</p>
  
  <p>The data head is as below:</p>
  
  <pre><code>BAC Return  C Return    GS Return   JPM Return  MS Return   WFC Return
  </code></pre>
  
  <p>Date                        </p>
  
  <pre><code>2017-12-29  NaN NaN NaN NaN NaN NaN
  2017-12-28  0.009485    0.009004    0.006830    0.007948    0.003431    0.010384
  2017-12-27  -0.002349   -0.002531   -0.002144   -0.005288   -0.001519   -0.005710
  </code></pre>