title: How to convert a float number between 0 and 1 to hour time?
body: <p>I read a dataset that contains hours (i.e. 9:30 am) from a csv file. After exploring dataset, I saved it as a <code>.xlsx</code> format. Now, I want to add some fields to this dataset, however, hours data are in float numbers between 0 to 1.</p>
  
  <p>In other example, I converted those numbers to <code>string</code> and it returned the hour. But with this format, this method just return float number in string format.</p>
  
  <p>Consider this dataframe with an example of this data:</p>
  
  <pre><code>hours = [0.375, 0.41666666, 0.79166666, 0.79166666, 0.833333333, 0.375]
  cities = ['AB', 'AC', 'AD', 'AF', 'AG', 'AT']
  df = pd.DataFrame({'hour': hours, 'city': cities})
  </code></pre>
  
  <p>I have tried to convert to datetime the hours field</p>
  
  <pre><code>df['hours'] = [pd.to_datetime(i) for i in df['hour']]
  </code></pre>
  
  <p>However I got as a result:</p>
  
  <pre><code>1970-01-01 00:00:00
  </code></pre>
  
  <p>I was following this answer <a href="https://stackoverflow.com/questions/27496889/converting-a-float-to-hhmm-format">Converting a float to hh:mm format</a> but time format is different from what I have in dataset.</p>
  
  <p>Is there an specific method I can use in <code>datetime</code> or in <code>pandas</code> to convert those numbers to hours?</p>