Question: IN PYTHON get_series: This function takes a sun DataFrame as created by the previous function and returns two Series, one for sunrise data, one for

IN PYTHON

get_series: This function takes a sun DataFrame as created by the previous function and returns two Series, one for sunrise data, one for sunset data. The both have the same format. Here is a screenshot of the sunrise Series:

IN PYTHON get_series: This function takes a sun DataFrame as created by

This index is now datetime objects, the NaN values are gone, and the data are therefore all strings. I suggest concatenating the appropriate columns from the sun frame into a sunrise Series, the same for a sunset Series, deleting the NaN's, and replacing the Index objects for both Series with the appropriate sequence of timestamps. Functions that might be helpful: pd.concat, pd.dropna, pd.date_range. Return the two Series with the syntax return rise, set. Here is some pseudocode:

Windows PowerShell >>> rise 2018-01-01 2018-01-02 2018-01-03 2018-01-04 2018-01-05 2018-01-06 2018-01-07 725 725 725 725 725 726 726 Windows PowerShell >>> rise 2018-01-01 2018-01-02 2018-01-03 2018-01-04 2018-01-05 2018-01-06 2018-01-07 725 725 725 725 725 726 726

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!