Question: ln python please write this function longest_day: This function takes sunrise and sunset Series and returns the timestamp of the longest day and an hour-minute
ln python please write this function
longest_day: This function takes sunrise and sunset Series and returns the timestamp of the longest day and an hour-minute string that represents the length of that day (just like the strings in the Series). If there is more than one longest day, return the first one (earliest date). Series methods that may be helpful: astype, idxmax. I suggest converting the hour-minute strings in the two Series into minutes (ints). Then you can subtract sunrise from sunset to get the length of the day in minutes. When you get your functions running, use them to determine the date of the longest day in 2018. Now google "summer solstice 2018". Do your results match? If not, can you explain?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
