title: Understanding Python syntax in lists vs series
body: <p>I am new to Python (no computer science background) for data science. I keep hearing that Python is easy, but I am making incremental progress. As an example, I understand:</p>
  
  <pre><code>len(titles[(titles.year &gt;= 1950) &amp; (titles.year &lt;=1959)])
  </code></pre>
  
  <p>"In the titles dataframe, create a series and take from the year column of the titles dataframe anything greater than or equal to 1950 AND anything less than or equal to 1959. The take the length of it."</p>
  
  <p>But when I encounter the following, I don't understand the logic of:</p>
  
  <pre><code>t = titles
  (t.year // 10 * 10).value_counts().sort_index().plot(kind='bar')
  </code></pre>
  
  <p>or </p>
  
  <pre><code>titles.title.value_counts().head(10)
  </code></pre>
  
  <p>In both these cases, I can piece it together obviously. 
  But it is not clear. In the second, why does 
  Python not allow me to use square brackets and regular brackets like in the first example?</p>