title: using pandas to find length of a column with given range
body: <p>so im trying to use pandas instead of a for loop to count the number of movies in a given range of year. Assume by data frame has 2 columns and 'year' is the column name at column 2</p>
  
  <p>I solved it using a for loop but how would i do it by using pandas only?</p>
  
  <pre><code>def movie_made(beginning, end):
     movie =  pd.read_scv('title.csv')
     count = 0
     for i in move['year']:
        if beginning &lt;= i and end &lt;=i:
           count = count + 1
     return count
  </code></pre>
  
  <p>This allows me to count all the movies within a given year, but im wondering if there is a better way using the pandas infrastructure for reading from a data base. </p>