title: How to set values based on a list in Pandas (python)
body: <p>I have a maybe a hopefully easy question that I wasn't able to find an answer on stack.  </p>
  
  <p>I have a a dataframe (df) and I want to set a value (some_value) if a value from the column 'month' is in a list (some_list).  </p>
  
  <p>e.g.</p>
  
  <blockquote>
  <pre><code>df[df['month'].isin(some_list)] = some_value
  </code></pre>
  </blockquote>
  
  <p>It's barfing up an AttributeError: 'int' object has no attribute 'view'.</p>
  
  <p>Any helpful direction would be awesome.  </p>
  
  <p>[edit]:</p>
  
  <pre><code>some_list = [4,5,6,7]
  some_value = 100
  </code></pre>
  
  <p>df.month is a value from 1 - 12 </p>
  
  <blockquote>
    <p>df.columns = ['datetime','weekday','hour','month','value']</p>
  </blockquote>
  
  <p>I realize I also want to find out the index of the rows which isin some_list then use those indices to set the value of another column ('value') to some_value.  Apologies for not writing that originally.</p>