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...
-
John's Sporting Goods is preparing its annual cash budget, showing quarterly data, for 2008. A $20,000 cash balance is desired at the end of each quarter. Borrowings and repayments are in $1,000...
-
Use a computer or calculator to find the area (a) to the left, and (b) to the right of x2 = 20.2 with df = 15
-
7. Klinicki and Lundgren started an air taxi service in Berlin, Germany, under the name Berlinair, Inc. Lundgren was approached by a group of travel agents who were interested in hiring an air...
-
Suppan Company manufactures a variety of tools and industrial equipment. The company operates through three divisions. Each division is an investment center. Operating data for the Home Division for...
-
Question 13 (a) What does income of a person mean? (b) What does ordinary income mean? (c) What factors need to be considered in determining whether a receipt is of an income or of a capital nature?...
-
A vaccine to prevent severe rotavirus gastroenteritis (diarrhea) was given to African children within the first year of life as part of a drug study. The study reported that of the 3298 children...
-
write the steps to enable Remote Direct Memory Access (RDMA) with Switch Embedded Teaming (SET).
-
Assume that Smiths Auto Sales paid \($50,000\) for equipment with a 10-year life and zero expected residual value. After using the equipment for 4 years, the company determines that the asset will...
-
Define the term nexus. Does nexus require a physical presence? Does nexus mean the same thing for different types of taxes?
-
Which of the following are characteristics of fees? A. They are usually smaller in amount than taxes B. They are a voluntary payment C. They are made to a segregated fund D. They are for a specific...
-
Micron Precision purchased a computer for \($3,100\), debiting Computer equipment. During 2010 and 2011, Micron Precision recorded total depreciation of \($2,200\) on the computer. On January 1,...
-
Assume your client receives a nexus questionnaire from a state. What should you advise them to do? A. Do nothingthe state will eventually give up B. Ask the state how much they think your client owes...
-
Dr. Phil wishes to know how many shares are necessary to elect 3 directors out of 11 directors up for election for the board of the Winfrey Publishing Company. There are 430,000 shares...
-
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...
-
Pennant Corporation acquired 80 percent of Saylor Company's common stock for \($12,000,000\) in cash. At the date of acquisition, Saylor's \($3,000,000\) of reported net assets were fairly stated,...
-
Palm Resorts acquired its 70 percent interest in Sun City on January 1, 2014, for \($35,200,000.\) The fair value of the 30 percent non-controlling interest at the date of acquisition was...
-
Peregrine Company acquired 80 percent of Sparrow Company's common stock for \($22,000,000\) in cash; fees paid to an outside firm to estimate the earning power of Sparrow and the fair values of its...
Study smarter with the SolutionInn App