title: TypeError: cannot do slice indexing on <class 'pandas.indexes.numeric.Int64Index'> with these indexers [(2,)] of <class 'tuple'>
body: <p>I've a user defined function as follows:-</p>
  
  <pre><code>def genre(option,option_type,*limit):
      option_based = rank_data.loc[rank_data[option] == option_type]
      top_option_based  = option_based[:limit]
      print(top_option_based)
      top_option_based.to_csv('top_option_based.csv')
      return(top_option_based))  
  </code></pre>
  
  <p>please refer this<a href="https://i.stack.imgur.com/v85CP.png" rel="nofollow noreferrer">image</a></p>
  
  <p>when I use the function as</p>
  
  <pre><code>genre('genre','Crime',2)
  </code></pre>
  
  <p>I'm getting an error as</p>
  
  <pre><code>TypeError: cannot do slice indexing on &lt;class 'pandas.indexes.numeric.Int64Index'&gt; with these indexers [(2,)] of &lt;class 'tuple'&gt;".
  </code></pre>