6. Run the ninth cell. In the submission file, summarize what these commands did. Add another...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
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... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
For the determinant (13.112), add column 1 to column 3 and add column 2 to column 4. Show that the result is equal to In this determinant, subtract column 3 from column 1 and subtract column 4 from...
-
What lessons did we learn from the Hawthorne studies? Summarize Bernards contributions on cooperation and acceptance of authority.
-
Your friend balances a package with mass m = 10 kg on top of his head while standing. The mass of his upper body is M = 55 kg (about 65% of his total mass). Because the spine is vertical rather than...
-
Episode 1: A New War Begines Vanderbilt How did Vanderbilts upbringing affect his business attitudes? Which product Vanderbilt decided to sell, as he knew good entrepreneur find something that...
-
Caspari Companys chart of accounts includes the following selected accounts. 101 ..........Cash 112 ..........Accounts Receivable 120 ..........Inventory 311 ..........Common Stock 401...
-
1. What will it take to build FIFA as a brand? 2. Can soccer be transformed into a mainstream sport in the United States, on a par with baseball, football, and basketball? When John Brooks, a...
-
Williams & Associates, Inc., completed the following transactions during October 2010, its first month of operations: Requirement 1. Using the steps outlined in the five-step transaction analysis,...
-
Model 99 Hotels is considering the construction of a new hotel for $80 million. The expected life of the hotel is 20 years with no residual value. The hotel is expected to earn revenues of $15...
-
Identify and evaluate (positively or negatively) the brand elements from your own point of view in light of the criteria ( brand name , URLs , logos and symbols , characters , slogans , jingles ,...
-
Image transcription text Example time steps for a 6 x 6 matrix Starting Matrix (Time Step 0) Time Step 1 Time Step 2 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 O O O O O O O O O O O O O O O O O W N K O O O...
-
The below video addresses different cases of field experimentation that tested consumer psychology with marketing implications. https://www.poweredbysearch.com/blog/psychology-of-marketing/Links to...
-
Show the output for the following code fragment: int sum = 0; for (int i = 1; i < 9; i += 3) { sum += i; System.out.print (i + ", "); (sum) ; } System.out.println
-
How to Incorporate the discourse genres, have you ever prepared during the class sessions?
-
Marias basis in her partnership interest is $ 1 0 0 , 0 0 0 on 1 2 / 3 2 / 2 0 XX after the accounting for the calendar year LLCs operations. On the same date, the LLC distributes $ 1 2 0 , 0 0 0 of...
-
Review the Five Forces Analysis. Complete a Five Forces Analysis for the department that you work for (if you don't work for one, find a healthcare organization and respond) paying attention to how...
-
Father sold land to Son in 2 0 2 2 . Son gave Father an installment note with payments to start in 2 0 2 3 . In 2 0 2 3 , Father cancelled the note when it had a face amount of $ 7 5 , 0 0 0 fair...
-
Let s reflect on what we have done so far before moving to a new topic. You have been using the Excel spreadsheet to complete your lessons and your work, and you now also have experienced using a...
-
Write a paper about the Working relationship in the organization- collaboration within and outside the organization
-
If Charles, a 16-year-old child model, earns $50,000 a year and is completely self supporting even though he lives with his parents, can his parents claim him as a dependent? Why or why not?...
-
Ken (age 31) and Amy (age 28) Booth have brought you the following information regarding their income, expenses, and withholding for the year. They are unsure which of these items must be used to...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Following are several tests of controls introduced in the chapter: Examine periodic reports by non-Purchasing Department personnel regarding purchase prices and practices. Observe Receiving...
-
Harold Brodkey plans to apply sequential sampling to the receiving controls used by the Ozyck Corporation, a December 31, 1999 year end manufacturer and supplier of home lighting fixtures. Based on a...
-
Few departments within a corporation, not-for-profit institution, or governmental entity can have quite as significant an influence on cost containment as Purchasing, since the purchasing function...
Study smarter with the SolutionInn App