title: RangeIndex object is not callable
body: <p>I am reading values from text file and and trying to find index of sub strings like below</p>
  
  <pre><code>df=pd.read_csv('break_sent.txt', index_col=False,encoding='utf-8',delimiter="\n",names=['sent'])
  #print(df[:50])
  #df.index = list(df.index)
  df1= df[40:50]
  print(len(df))
  print(df1.index)
  print("-------------------------------------------")
  for i,row in df1.iterrows():
      string = row['sent']
      #print("string",string)
      d = df1[df1.sent.str.match(string)] # if the result includes more than 1 value then we know that substring and its matching parent string are present, then I will eliminate the substring from the dataframe
      if len(d.index &gt; 2):
          index_val = df.index(string)
          df.drop(df.index(string),inpace=True)
          df.reset_index(level=None, drop=True, inplace=True)
  </code></pre>
  
  <p>when I run this code, I am getting the below error</p>
  
  <pre><code>Traceback (most recent call last):
    File "process.py", line 15, in &lt;module&gt;
      index_val = df.index(string)
      TypeError: 'RangeIndex' object is not callable
  </code></pre>
  
  <p>I tried to convert the range index to List </p>
  
  <pre><code>df.index = list(df.index)
  </code></pre>
  
  <p>but then I got Int64Index is not callable. How can I get the index of the string ?</p>