title: How to convert results from sunset and sunrise data using astral package into a dataframe?
body: <p>I'm trying to find a way to convert my results I got from calculating the dawn and dusk times from a certain time interval using the <code>astral</code> package at a certain city into a dataframe. The problem is that once I got the results of the sunrise and sunset information, I have a hard time converting it into a dataframe for further analysis. My code is shown below right now</p>
  <pre><code>from astral import *
  
  def get_astral_summary():
    x=print((
      f'Dawn:    {s[&quot;dawn&quot;]}\n'
      f'Sunrise: {s[&quot;sunrise&quot;]}\n'
      f'Noon:    {s[&quot;noon&quot;]}\n'
      f'Sunset:  {s[&quot;sunset&quot;]}\n'
      f'Dusk:    {s[&quot;dusk&quot;]}\n'
    ))
    return x 
  
  city = LocationInfo(&quot;Surrey&quot;, &quot;Canada&quot;, 'US/Pacific',49.104599,-122.823509)
  x =pd.date_range(start=&quot;2020-12-09&quot;,end=&quot;2020-12-11&quot;)
  
  for y in x:
    s = sun(city.observer, date=y)
    get_astral_summary()
  
  </code></pre>
  <p>Right now, the way I can see my results is making the function that prints out the results, the output is shown below:</p>
  <pre><code>Dawn:    2020-12-09 15:16:48.899052+00:00
  Sunrise: 2020-12-09 15:54:44.342273+00:00
  Noon:    2020-12-09 20:03:37+00:00
  Sunset:  2020-12-10 00:13:05.243283+00:00
  Dusk:    2020-12-10 00:51:00.107776+00:00
  
  Dawn:    2020-12-10 15:17:44.663065+00:00
  Sunrise: 2020-12-10 15:55:43.641196+00:00
  Noon:    2020-12-10 20:04:04+00:00
  Sunset:  2020-12-11 00:13:01.662368+00:00
  Dusk:    2020-12-11 00:51:00.111312+00:00
  
  Dawn:    2020-12-11 15:18:38.380512+00:00
  Sunrise: 2020-12-11 15:56:40.604162+00:00
  Noon:    2020-12-11 20:04:32+00:00
  Sunset:  2020-12-12 00:13:01.168222+00:00
  Dusk:    2020-12-12 00:51:02.912291+00:00
  
  </code></pre>
  <p>The question arises: How do I put it into a dataframe where the time is formatted correctly? I noticed when I just called the variable <code>s</code>, the data type sort of looks like a dictionary like this shown below:</p>
  <pre><code>{'dawn': datetime.datetime(2020, 12, 11, 15, 18, 38, 380512, tzinfo=&lt;UTC&gt;),
   'dusk': datetime.datetime(2020, 12, 12, 0, 51, 2, 912291, tzinfo=&lt;UTC&gt;),
   'noon': datetime.datetime(2020, 12, 11, 20, 4, 32, tzinfo=&lt;UTC&gt;),
   'sunrise': datetime.datetime(2020, 12, 11, 15, 56, 40, 604162, tzinfo=&lt;UTC&gt;),
   'sunset': datetime.datetime(2020, 12, 12, 0, 13, 1, 168222, tzinfo=&lt;UTC&gt;)}
  
  </code></pre>
  <p>I noticed when I do</p>
  <pre><code>df = pd.DataFrame([s], columns=s.keys())
  </code></pre>
  <p>the dataframe doesnt give me the whole time interval, it only gives me this shown below</p>
  <pre><code>                              dawn  ...                             dusk
  0 2020-12-15 15:21:51.681536+00:00  ... 2020-12-16 00:51:41.956146+00:00
  
  [1 rows x 5 columns]
  </code></pre>
  <p>Can anyone provide me some suggestions to tackle this problem? Thanks!</p>