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:
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 726Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started