title: Select weekends and weekdays by weekday() in python
body: <p>I have the following data:</p>
  <pre><code>2010-01-01 00:00:00 327
  2010-01-01 01:00:00 237
  2010-01-01 02:00:00 254
  ...
  </code></pre>
  <p>I can select different data by month but I would like to select data from weekdays and data from weekends. How could it be possible to do it by using weekday function?  I have performed something like this but it does not work.</p>
  <pre><code>data['Month'] = data['Timestamp'].dt.month
  summer = (data.Month &gt;=6) &amp; (data.Month &lt;=8) 
  data['WEEKDAY'] = ((pd.DatetimeIndex(data.index).dayofweek) // 5 == 1).astype(float)
  </code></pre>