title: Can't store txt file data in Python Dataframe
body: <p>I am following an article about image caption transformer model in tensor flow python. When I try to run the following code it does not show the data when I use the head function.</p>
  <pre><code>file = open(dir_Flickr_text,'r')
  text = file.read()
  file.close()
  
  datatxt = []
    for line in text.split('\n'):
      col = line.split('\t')
      if len(col) == 1:
       continue
      w = col[0].split(&quot;#&quot;)
      datatxt.append(w + [col[1].lower()])
  
  
  
  data = pd.DataFrame(datatxt,columns[&quot;filename&quot;,&quot;index&quot;,&quot;caption&quot;])
  
  data = data.reindex(columns =. ['index','filename','caption'])  
  data = data[data.filename !='2258277193_586949ec62.jpg.1']
  uni_filenames = np.unique(data.filename.values)
  
  data.head()
  </code></pre>
  <p>After running this I see three columns (index, filename , caption) with no data at all. While the real file contains enough data and the in the article they display the data too.</p>