title: From hours to String
body: <p>I have this df:</p>
  <pre><code>Index          Dates
    0     2017-01-01 23:30:00
    1     2017-01-12 22:30:00
    2     2017-01-20 13:35:00
    3     2017-01-21 14:25:00
    4     2017-01-28 22:30:00
    5     2017-08-01 13:00:00
    6     2017-09-26 09:39:00
    7     2017-10-08 06:40:00 
    8     2017-10-04 07:30:00
    9     2017-12-13 07:40:00
    10    2017-12-31 14:55:00
  </code></pre>
  <p>The purpose was that between the time ranges <code>5:00</code> to <code>11:59</code> a new df would be created with data that would say: <code>morning</code>. To achieve this I converted those hours to booleans:</p>
  <pre><code>hour_morning=(pd.to_datetime(df['Dates']).dt.strftime('%H:%M:%S').between('05:00:00','11:59:00'))
  </code></pre>
  <p>and then passed them to a <code>list</code> with &quot;morning&quot; <code>str</code></p>
  <pre><code>text_morning=[str('morning') for x in hour_morning if x==True]
  </code></pre>
  <p>I have the error in the last line because it only returns ´morning´ string values, it is as if the 'X' ignored the 'if' condition. Why is this happening and how do i fix it?</p>