title: 'DataFrame' object has no attribute
body: <p>I would like to build a classifier of tweets using Python 3. 
  I got the following error: </p>
  
  <blockquote>
    <p>AttributeError: 'DataFrame' object has no attribute 'id'</p>
  </blockquote>
  
  <p>when I ran the following code: </p>
  
  <pre><code>train_df['id'] = train_df.id.apply(lambda x: int(x))
  train_df['friends_count'] = train_df.friends_count.apply(lambda x: int(x))
  train_df['followers_count'] = train_df.followers_count.apply(lambda x: 0 if x=='None' else int(x))
  train_df['friends_count'] = train_df.friends_count.apply(lambda x: 0 if x=='None' else int(x))
  </code></pre>
  
  <p>The dataset looks like </p>
  
  <p><a href="https://i.stack.imgur.com/RteVW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RteVW.png" alt="enter image description here"></a></p>
  
  <p>and it is a csv file. I would like to have a list of all the columns in the dataset rather than scrolling manually. I checked the version of panda and it seems to be already updated. I am pretty new in using Python, so I hope you can help me to figure out what I am doing wrong.
  Thanks</p>
  
  <p>EDIT: </p>
  
  <pre><code>AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-32-13c1484f8b58&gt; in &lt;module&gt;
        2 train_df = df.copy()
        3 #train_df['id'] = train_df.id.apply(lambda x: int(x))
  ----&gt; 4 train_df['friends_count'] = train_df.friends_count.apply(lambda x: int(x))
        5 train_df['followers_count'] = train_df.followers_count.apply(lambda x: 0 if x=='None' else int(x))
        6 train_df['friends_count'] = train_df.friends_count.apply(lambda x: 0 if x=='None' else int(x))
  
  /anaconda3/lib/python3.7/site-packages/pandas/core/generic.py in __getattr__(self, name)
     4374         IE10                   404           0.08
     4375         Chrome                 200           0.02
  -&gt; 4376 
     4377         &gt;&gt;&gt; df.reindex(new_index, fill_value='missing')
     4378                       http_status response_time
  
  AttributeError: 'DataFrame' object has no attribute 'friends_count'
  </code></pre>