title: what is wrong with this Pandas and txt file code
body: <p>I'm using pandas to open a CSV file that contains data from spotify, meanwhile, I have a txt file that contains various artists names from that CSV file. What I'm trying to do is get the value from each row of the txt and automatically search them in the function I've done.</p>
  <pre><code>import pandas as pd
  import time
  
  df = pd.read_csv(&quot;data.csv&quot;)
  df = df[['artists', 'name', 'year']]
  
  def buscarA():
    start = time.time()
    newdf = (df.loc[df['artists'].str.contains(art)])
    stop = time.time()
    tempo = (stop - start)
    print (newdf)
    e = ('{:.2f}'.format(tempo))
    print (e)
  
  with open(&quot;teste3.txt&quot;, &quot;r&quot;) as f:
  for row in f:
      art = row
      buscarA()
  </code></pre>
  <p>but the output is always the same:</p>
  <pre><code>Empty DataFrame
  Columns: [artists, name, year]
  Index: []
  </code></pre>