Answered step by step
Verified Expert Solution
Question
1 Approved Answer
6. Run the ninth cell. In the submission file, summarize what these commands did. Add another column for the month. Paste a screen shot
6. Run the ninth cell. In the submission file, summarize what these commands did. Add another column for the month. Paste a screen shot of the result. Your summary here: We imported 'datetime' package and 'dateutil' package. from datetime import date from dateutil.relativedelta import relativedelta days_back = 1 days_total = 2 startDt = date.today() + relativedelta(days=+(-1* days_back)) for dateOff in range(days_total): dimDate = startDt + relativedelta(days=+dateOff) dateYear dimDate.year fiscalPer = str (dimDate.year) + 'm' + str(dimDate.month) calQuarter = int((dimDate.month + 2) / 3) for hr in range (24): primaryKey = 'k' + str(dateOff * 24 + hr) print (primaryKey, dimDate, dateYear, fiscalPer, calQuarter, hr) print ((dateOff + 1) * 24) k0 2022-03-16 2022 2022m3 1 0 k1 2022-03-16 2022 2022m3 1 1 k2 2022-03-16 2022 2022m3 1 2 k3 2022-03-16 2022 2022m3 1 3 k4 2022-03-16 2022 2022m3 1 4 k5 2022-03-16 2022 2022m3 1 5
Step by Step Solution
★★★★★
3.36 Rating (159 Votes )
There are 3 Steps involved in it
Step: 1
The ninth cell in the submission file appears to import the datetime and dateutil packages and use them to calculate various daterelated values The da...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