Advertisement
Guest User

Untitled

a guest
Feb 9th, 2017
5,842
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.21 KB | None | 0 0
  1. Jupyter Notebook Logout Control Panelhw03 Last Checkpoint: 38 minutes ago (autosaved)
  2. Python 3
  3. File
  4. Edit
  5. View
  6. Insert
  7. Cell
  8. Kernel
  9. Widgets
  10. Help
  11. CellToolbarMem: 735 / 2048 (MB)Verify Drive
  12. Homework 3: Tables and Charts
  13. Reading: Textbook chapters 5 and 6.
  14. Please complete this notebook by filling in the cells provided. Before you begin, execute the following cell to load the provided tests. Each time you start your server, you will need to execute this cell again to load the tests.
  15. In [93]:
  16.  
  17. # Don't change this cell; just run it.
  18. import numpy as np
  19. from datascience import *
  20. %matplotlib inline
  21. import matplotlib.pyplot as plots
  22. plots.style.use('fivethirtyeight')
  23. from client.api.notebook import Notebook
  24. ok = Notebook('hw03.ok')
  25. _ = ok.auth(inline=True)
  26. =====================================================================
  27. Assignment: Homework 3: Tables and Charts
  28. OK, version v1.9.5
  29. =====================================================================
  30.  
  31. Successfully logged in as dkathuria@berkeley.edu
  32. Important: The ok tests don't usually tell you that your answer is correct. More often, they help catch careless mistakes. It's up to you to ensure that your answer is correct. If you're not sure, ask someone (not for the answer, but for some guidance about your approach).
  33. Once you're finished, select "Save and Checkpoint" in the File menu and then execute the submit cell below. The result will contain a link that you can use to check that your assignment has been submitted successfully. If you submit more than once before the deadline, we will only grade your final submission.
  34. In [94]:
  35.  
  36. _ = ok.submit()
  37. Saving notebook... Saved 'hw03.ipynb'.
  38. Submit... 100% complete
  39. Submission successful for user: dkathuria@berkeley.edu
  40. URL: https://okpy.org/cal/data8/sp17/hw03/submissions/rkZvEK
  41.  
  42. 1. Unemployment
  43. The Federal Reserve Bank of St. Louis publishes data about jobs in the US. Below we've loaded data on unemployment in the United States. There are many ways of defining unemployment, and our dataset includes two notions of the unemployment rate:
  44. Among people who are able to work and are looking for a full-time job, the percentage who can't find a job. This is called the Non-Employment Index, or NEI.
  45. Among people who are able to work and are looking for a full-time job, the percentage who can't find any job or are only working at a part-time job. The latter group is called "Part-Time for Economic Reasons", so the acronym for this index is NEI-PTER. (Economists are great at marketing.)
  46. The source of the data is here.
  47. Question 1. The data are in a CSV file called unemployment.csv. Load that file into a table called unemployment.
  48. In [95]:
  49.  
  50. unemployment = Table.read_table("unemployment.csv")
  51. unemployment
  52. Out[95]:
  53. Date NEI NEI-PTER
  54. 1994-01-01 10.0974 11.172
  55. 1994-04-01 9.6239 10.7883
  56. 1994-07-01 9.3276 10.4831
  57. 1994-10-01 9.1071 10.2361
  58. 1995-01-01 8.9693 10.1832
  59. 1995-04-01 9.0314 10.1071
  60. 1995-07-01 8.9802 10.1084
  61. 1995-10-01 8.9932 10.1046
  62. 1996-01-01 9.0002 10.0531
  63. 1996-04-01 8.9038 9.9782
  64. ... (80 rows omitted)
  65. In [5]:
  66.  
  67. _ = ok.grade('q1_1')
  68. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  69. Running tests
  70.  
  71. ---------------------------------------------------------------------
  72. Test summary
  73. Passed: 1
  74. Failed: 0
  75. [ooooooooook] 100.0% passed
  76.  
  77. Question 2. Sort the data in decreasing order by NEI, naming the sorted table by_nei. Create another table called by_nei_pter that's sorted in decreasing order by NEI-PTER instead.
  78. In [84]:
  79.  
  80. by_nei = unemployment.sort("NEI", descending = True)
  81. by_nei_pter = unemployment.sort("NEI-PTER", descending = True)
  82. by_nei = unemployment.sort("NEI", descending = True)
  83. by_nei_pter = unemployment.sort("NEI-PTER", descending = True)
  84. In [85]:
  85.  
  86. _ = ok.grade('q1_2')
  87. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  88. Running tests
  89.  
  90. ---------------------------------------------------------------------
  91. Test summary
  92. Passed: 1
  93. Failed: 0
  94. [ooooooooook] 100.0% passed
  95.  
  96. Question 3. Use take to make a table containing the data for the 10 quarters when NEI was greatest. Call that table greatest_nei.
  97. In [18]:
  98.  
  99. greatest_nei = by_nei.take(np.arange(10))
  100. greatest_nei
  101. Out[18]:
  102. Date NEI NEI-PTER
  103. 2009-10-01 10.9698 12.8557
  104. 2010-01-01 10.9054 12.7311
  105. 2009-07-01 10.8089 12.7404
  106. 2009-04-01 10.7082 12.5497
  107. 2010-04-01 10.6597 12.5664
  108. 2010-10-01 10.5856 12.4329
  109. 2010-07-01 10.5521 12.3897
  110. 2011-01-01 10.5024 12.3017
  111. 2011-07-01 10.4856 12.2507
  112. 2011-04-01 10.4409 12.247
  113. In [19]:
  114.  
  115. _ = ok.grade('q1_3')
  116. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  117. Running tests
  118.  
  119. ---------------------------------------------------------------------
  120. Test summary
  121. Passed: 1
  122. Failed: 0
  123. [ooooooooook] 100.0% passed
  124.  
  125. Question 4. It's believed that many people became PTER (recall: "Part-Time for Economic Reasons") in the "Great Recession" of 2008-2009. NEI-PTER is the percentage of people who are unemployed (and counted in the NEI) plus the percentage of people who are PTER. Compute an array containing the percentage of people who were PTER in each quarter. (The first element of the array should correspond to the first row of unemployment, and so on.)
  126. Note: Use the original unemployment table for this.
  127. In [31]:
  128.  
  129. pter = unemployment.column("NEI-PTER") - unemployment.column("NEI")
  130. pter
  131. Out[31]:
  132. array([ 1.0746, 1.1644, 1.1555, 1.129 , 1.2139, 1.0757, 1.1282,
  133. 1.1114, 1.0529, 1.0744, 1.1004, 1.0747, 1.0705, 1.0455,
  134. 1.008 , 0.9734, 0.9753, 0.8931, 0.9451, 0.8367, 0.8208,
  135. 0.8105, 0.8248, 0.7578, 0.7251, 0.7445, 0.7543, 0.7423,
  136. 0.7399, 0.7687, 0.8418, 0.9923, 0.9181, 0.9629, 0.9703,
  137. 0.9575, 1.0333, 1.0781, 1.0675, 1.0354, 1.0601, 1.01 ,
  138. 1.0042, 1.0368, 0.9704, 0.923 , 0.9759, 0.93 , 0.889 ,
  139. 0.821 , 0.9409, 0.955 , 0.898 , 0.8948, 0.9523, 0.9579,
  140. 1.0149, 1.0762, 1.2873, 1.4335, 1.7446, 1.8415, 1.9315,
  141. 1.8859, 1.8257, 1.9067, 1.8376, 1.8473, 1.7993, 1.8061,
  142. 1.7651, 1.7927, 1.7286, 1.6387, 1.6808, 1.6805, 1.6629,
  143. 1.6253, 1.6477, 1.6298, 1.4796, 1.5131, 1.4866, 1.4345,
  144. 1.3675, 1.3097, 1.2319, 1.1735, 1.1844, 1.1746])
  145. In [32]:
  146.  
  147. _ = ok.grade('q1_4')
  148. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149. Running tests
  150.  
  151. ---------------------------------------------------------------------
  152. Test summary
  153. Passed: 1
  154. Failed: 0
  155. [ooooooooook] 100.0% passed
  156.  
  157. Question 5. Add pter as a column to unemployment (named "PTER") and sort the resulting table by that column in decreasing order. Call the table by_pter.
  158. Try to do this with a single line of code, if you can.
  159. In [33]:
  160.  
  161. by_pter = unemployment.with_column("PTER", pter).sort("PTER", descending = True)
  162. by_pter
  163. Out[33]:
  164. Date NEI NEI-PTER PTER
  165. 2009-07-01 10.8089 12.7404 1.9315
  166. 2010-04-01 10.6597 12.5664 1.9067
  167. 2009-10-01 10.9698 12.8557 1.8859
  168. 2010-10-01 10.5856 12.4329 1.8473
  169. 2009-04-01 10.7082 12.5497 1.8415
  170. 2010-07-01 10.5521 12.3897 1.8376
  171. 2010-01-01 10.9054 12.7311 1.8257
  172. 2011-04-01 10.4409 12.247 1.8061
  173. 2011-01-01 10.5024 12.3017 1.7993
  174. 2011-10-01 10.3287 12.1214 1.7927
  175. ... (80 rows omitted)
  176. In [34]:
  177.  
  178. _ = ok.grade('q1_5')
  179. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  180. Running tests
  181.  
  182. ---------------------------------------------------------------------
  183. Test summary
  184. Passed: 1
  185. Failed: 0
  186. [ooooooooook] 100.0% passed
  187.  
  188. Question 6. Does it seem true that the PTER rate was very high during the Great Recession, compared to other periods in the dataset? Justify your answer by referring to specific values in the table or by generating a chart.
  189. In [102]:
  190.  
  191. Out[102]:
  192. numpy.str_
  193.  
  194. *Write your answer here, replacing this text.*
  195. 2. Birth Rates
  196. The following table gives census-based population estimates for each state on July 1, 2015 and July 1, 2016. The last four columns describe the components of the estimated change in population during this time interval. For all questions below, assume that the word "states" refers to all 52 rows including Puerto Rico & the District of Columbia.
  197. In [96]:
  198.  
  199. # Don't change this cell; just run it.
  200. # From http://www2.census.gov/programs-surveys/popest/datasets/2010-2016/national/totals/nst-est2016-alldata.csv
  201. # See http://www2.census.gov/programs-surveys/popest/datasets/2010-2015/national/totals/nst-est2015-alldata.pdf
  202. # for column descriptions. (As of Feb 2017, no descriptions were posted for 2010-2016.)
  203. pop = Table.read_table('nst-est2016-alldata.csv').where('SUMLEV', 40).select([1, 4, 12, 13, 27, 34, 62, 69])
  204. pop = pop.relabeled(2, '2015').relabeled(3, '2016')
  205. pop = pop.relabeled(4, 'BIRTHS').relabeled(5, 'DEATHS')
  206. pop = pop.relabeled(6, 'MIGRATION').relabeled(7, 'OTHER')
  207. pop.set_format([2, 3, 4, 5, 6, 7], NumberFormatter(decimals=0)).show(5)
  208. REGION NAME 2015 2016 BIRTHS DEATHS MIGRATION OTHER
  209. 3 Alabama 4,853,875 4,863,300 58,556 52,405 3,874 -600
  210. 4 Alaska 737,709 741,894 11,255 4,511 -2,557 -2
  211. 4 Arizona 6,817,565 6,931,071 87,204 56,564 76,405 6,461
  212. 3 Arkansas 2,977,853 2,988,248 37,936 30,581 3,530 -490
  213. 4 California 38,993,940 39,250,017 502,848 273,850 33,530 -6,451
  214. ... (47 rows omitted)
  215. Question 1. Assign us_birth_rate to the total US annual birth rate during this time interval. The annual birth rate for a year-long period is the number of births in that period as a proportion of the population at the start of the period.
  216. In [41]:
  217.  
  218. us_birth_rate = sum(pop.column("BIRTHS") / pop.column("2015"))
  219. us_birth_rate
  220. Out[41]:
  221. 0.64106727268407149
  222. In [42]:
  223.  
  224. _ = ok.grade('q2_1')
  225. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  226. Running tests
  227.  
  228. ---------------------------------------------------------------------
  229. Test summary
  230. Passed: 1
  231. Failed: 0
  232. [ooooooooook] 100.0% passed
  233.  
  234. Question 2. Assign fastest_growth to an array of the names of the five states with the fastest population growth rates in descending order of growth rate.
  235. In [51]:
  236.  
  237. fastest_growth = pop.with_column("test", (pop.column("2016") - pop.column("2015"))/pop.column("2015")).sort("test", descending = True).column("NAME") [0:5]
  238. fastest_growth
  239. Out[51]:
  240. array(['Utah', 'Nevada', 'Idaho', 'Florida', 'Washington'],
  241. dtype='<U20')
  242. In [52]:
  243.  
  244. _ = ok.grade('q2_2')
  245. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  246. Running tests
  247.  
  248. ---------------------------------------------------------------------
  249. Test summary
  250. Passed: 1
  251. Failed: 0
  252. [ooooooooook] 100.0% passed
  253.  
  254. Question 3. Assign movers to the number of states for which the absolute annual rate of migration was higher than 1%. The annual rate of migration for a year-long period is the net number of migrations (in and out) as a proportion of the population at the start of the period. The MIGRATION column contains estimated annual net migration counts by state.
  255. In [66]:
  256.  
  257. movers = pop.with_column("test", pop.column("MIGRATION")/ pop.column("2015")).where("test", lambda x: abs(x)>.01).num_rows
  258. movers
  259. Out[66]:
  260. 9
  261. In [67]:
  262.  
  263. _ = ok.grade('q2_3')
  264. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  265. Running tests
  266.  
  267. ---------------------------------------------------------------------
  268. Test summary
  269. Passed: 1
  270. Failed: 0
  271. [ooooooooook] 100.0% passed
  272.  
  273. Question 4. Assign west_births to the total number of births that occurred in region 4 (the Western US).
  274. In [78]:
  275.  
  276. west_births = sum(pop.where("REGION", lambda x: x == "4").column("BIRTHS"))
  277. west_births
  278. Out[78]:
  279. 979657
  280. In [79]:
  281.  
  282. _ = ok.grade('q2_4')
  283. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  284. Running tests
  285.  
  286. ---------------------------------------------------------------------
  287. Test summary
  288. Passed: 1
  289. Failed: 0
  290. [ooooooooook] 100.0% passed
  291.  
  292. Question 5. Assign less_than_west_births to the number of states that had a total population in 2016 that was smaller than the number of babies born in region 4 (the Western US) during this time interval.
  293. In [81]:
  294.  
  295. less_than_west_births = pop.where("2016", lambda x: x < west_births).num_rows
  296. less_than_west_births
  297. Out[81]:
  298. 7
  299. In [82]:
  300.  
  301. _ = ok.grade('q2_5')
  302. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  303. Running tests
  304.  
  305. ---------------------------------------------------------------------
  306. Test summary
  307. Passed: 1
  308. Failed: 0
  309. [ooooooooook] 100.0% passed
  310.  
  311. Question 6. Was there an association between birth rate and death rate during this time interval? Use the code cell below to support your conclusion with a chart. If an association exists, what might explain it?
  312. There is some association between the birth rate and death rate in a slight inverted correlation. As the scatter plot shows, there is a decrease in the death rate as the birth rate increases. This could possibly be attributed to a younger population overall in the state; younger people imply more babies being born with less overall deaths.
  313. In [99]:
  314.  
  315. Death
  316. # Generate a chart here to support your conclusion
  317. pop.with_columns("Birth Rate", pop.column("BIRTHS") / pop.column("2015"), "Death Rate", pop.column("DEATHS") / pop.column("2015")).scatter("Birth Rate", "Death Rate")
  318.  
  319. 3. Consumer Financial Protection Bureau Complaints
  320. The Consumer Financial Protection Bureau has collected and published consumer complaints against financial companies since 2011. The data are available here (or at this direct link. For this exercise, to make your code run faster, we've selected only the data from May 2016.
  321. Run the next cell to load the data. Each row represents one consumer's complaint.
  322. In [83]:
  323.  
  324. # Just run this cell.
  325. complaints = Table.read_table("complaints.csv")
  326. complaints
  327. Out[83]:
  328. company company_public_response company_response complaint_id complaint_what_happened consumer_consent_provided consumer_disputed date_received date_sent_to_company issue product state sub_issue sub_product submitted_via tags timely zip_code
  329. TransUnion Intermediate Holdings, Inc. Company has responded to the consumer and the CFPB and c ... Closed with explanation 1920073 (None) (None) Yes 2016-05-11T15:39:07.000 2016-05-11T15:39:07.000 Credit reporting company's investigation Credit reporting VT Inadequate help over the phone (None) Phone (None) Yes 05035
  330. TransUnion Intermediate Holdings, Inc. Company has responded to the consumer and the CFPB and c ... Closed with explanation 1914777 (None) Consent not provided No 2016-05-08T00:53:47.000 2016-05-12T18:40:34.000 Incorrect information on credit report Credit reporting MO Information is not mine (None) Web (None) Yes 63020
  331. Bank of America Company has responded to the consumer and the CFPB and c ... Closed with explanation 1907306 I became aware of several charges on a Bank of America c ... Consent provided No 2016-05-03T16:49:33.000 2016-05-03T16:49:34.000 Other Credit card VA (None) (None) Web (None) Yes 239XX
  332. Finance of America Reverse LLC Company believes it acted appropriately as authorized by ... Closed with explanation 1919055 I applied for a reverse mortgage and everthing was going ... Consent provided No 2016-05-10T20:13:22.000 2016-05-10T20:13:23.000 Application, originator, mortgage broker Mortgage TX (None) Reverse mortgage Web Older American Yes 774XX
  333. Acceptance Solutions Group, INC Company believes it acted appropriately as authorized by ... Closed with explanation 1908628 Keeps calling numbers that are not mine. And talking to ... Consent provided No 2016-05-03T21:05:42.000 2016-05-06T13:42:45.000 Improper contact or sharing of info Debt collection OH Talked to a third party about my debt Payday loan Web (None) Yes 430XX
  334. Equifax (None) Closed with explanation 1909176 (None) (None) No 2016-05-04T20:08:06.000 2016-05-09T15:11:00.000 Incorrect information on credit report Credit reporting NC Information is not mine (None) Postal mail (None) Yes 28052
  335. TransUnion Intermediate Holdings, Inc. Company has responded to the consumer and the CFPB and c ... Closed with explanation 1914477 When I enter my personal information to receive my credi ... Consent provided No 2016-05-06T23:09:50.000 2016-05-08T22:40:19.000 Unable to get credit report/credit score Credit reporting OH Problem getting my free annual report (None) Web (None) Yes 450XX
  336. Encore Capital Group (None) Closed with non-monetary relief 1919937 (None) Consent not provided (None) 2016-05-11T18:58:25.000 2016-05-11T21:53:54.000 Cont'd attempts collect debt not owed Debt collection CT Debt is not mine Credit card Web Older American Yes 06801
  337. Nationstar Mortgage (None) Closed with explanation 1920517 I am livid with Nation Star for refusing to work with me ... Consent provided (None) 2016-05-11T20:38:09.000 2016-05-11T20:38:09.000 Application, originator, mortgage broker Mortgage IL (None) Conventional adjustable mortgage (ARM) Web (None) Yes 606XX
  338. Convergent Resources, Inc. (None) Closed with explanation 1920464 (None) Consent not provided No 2016-05-11T12:16:31.000 2016-05-11T12:16:32.000 Cont'd attempts collect debt not owed Debt collection TX Debt is not mine Other (i.e. phone, health club, etc.) Web (None) Yes 78109
  339. ... (15021 rows omitted)
  340. Question 1. Financial companies offer a variety of products. How many complaints were made against each kind of product? Make a table called complaints_per_product with one row per product category and 2 columns: "product" (the name of the product) and "number of complaints" (the number of complaints made against that kind of product).
  341. In [88]:
  342.  
  343. complaints_per_product = complaints.group("product").relabel("count", "number of complaints")
  344. complaints_per_product
  345. Out[88]:
  346. product number of complaints
  347. Bank account or service 1687
  348. Consumer Loan 775
  349. Credit card 1566
  350. Credit reporting 3820
  351. Debt collection 3022
  352. Money transfers 142
  353. Mortgage 3468
  354. Other financial service 16
  355. Payday loan 119
  356. Prepaid card 110
  357. ... (1 rows omitted)
  358. In [89]:
  359.  
  360. _ = ok.grade('q3_1')
  361. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  362. Running tests
  363.  
  364. ---------------------------------------------------------------------
  365. Test summary
  366. Passed: 1
  367. Failed: 0
  368. [ooooooooook] 100.0% passed
  369.  
  370. Question 2. Make a bar chart showing how many complaints were made about each product category. Sort the bars from shortest to longest.
  371. In [ ]:
  372.  
  373. ...
  374. Question 3. Make a table of the number of complaints made against each company. Call it complaints_per_company. It should have one row per company and 2 columns: "company" (the name of the company) and "number of complaints" (the number of complaints made against that company).
  375. In [91]:
  376.  
  377. number of complaints
  378. complaints_per_company = complaints.group("company").relabel("count", "number of complaints")
  379. complaints_per_company
  380. Out[91]:
  381. company number of complaints
  382. 1st Preference Mortgage 2
  383. 21st Mortgage Corporation 7
  384. 2288984 Ontario Inc. 3
  385. 360 Mortgage 1
  386. 3rd Generation, Inc. 1
  387. 4M Collections, LLC 1
  388. A.R.M. Solutions, Inc. 2
  389. AC Autopay, LLC 1
  390. ACE Cash Express Inc. 21
  391. ACS Education Services 8
  392. ... (1131 rows omitted)
  393. In [92]:
  394.  
  395. _ = ok.grade('q3_3')
  396. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  397. Running tests
  398.  
  399. ---------------------------------------------------------------------
  400. Test summary
  401. Passed: 1
  402. Failed: 0
  403. [ooooooooook] 100.0% passed
  404.  
  405. Question 4. It wouldn't be a good idea to make a bar chart of that data. (Don't try it!) Why not?
  406. Write your answer here, replacing this text.
  407. Question 5. Make a bar chart of just the 10 companies with the most complaints.
  408. In [ ]:
  409.  
  410. ...
  411. Question 6. Make a bar chart like the one above, with one difference: The size of each company's bar should be the proportion (among all complaints made against any company in complaints) that were made against that company.
  412. Note: Graphs aren't very useful without accurate labels. Make sure that the text on the horizontal axis of the graph makes sense.
  413. 4. Marginal Histograms
  414. Consider the following scatter plot:
  415. The axes of the plot represent values of two variables: xx and yy.
  416. Suppose we have a table called t that has two columns in it:
  417. x: a column containing the x-values of the points in the scatter plot
  418. y: a column containing the y-values of the points in the scatter plot
  419. Question 1: Match each of the following lines of code to the histograms they produce. Explain your reasoning.
  420. Line 1: t.hist('x')
  421. Line 2: t.hist('y')
  422. Histogram A: Histogram B:
  423. Histogram for Line 1:
  424. Explanation:
  425. Histogram for Line 2:
  426. Explanation:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement