Question
I have sent you a question, but no solution yet. The codes on this question could not run. In the field of Data Science, data
I have sent you a question, but no solution yet. The codes on this question could not run.
In the field of Data Science, data is often formatted as a comma-delimited (CSV) file, where each line in a file corresponds to a field's value. Refer to Chapter 9 (p. 106) for more information on comma-delimited files. To answer this question, you will need to download the file Assignment1_denton_housing.csv included with this assignment. The file Assignment1_denton_housing.csv contains statistics about housing in the city of Denton from 2008 to 2014. Write a program to implement the following questions.
(1) (10 pts) Calculate the difference in the number of Occupied Housing Units from year to year and print it. The difference must be calculated for the consecutive years such as 2008-2009, 2009-2010 etc. Finally, print the values in the ascending order.
(2) (10 pts) For all the years, calculate the percentage of housing units which are vacant an occupied. Print the results in the following format:
Year Vacant Housing Units Occupied Housing Units. This is what I received:
/usr/local/lib/python3.6/dist-packages/pandas/io/parsers.py in __init__(self, src, **kwds) 2008 kwds["usecols"] = self.usecols 2009 -> 2010 self._reader = parsers.TextReader(src, **kwds) 2011 self.unnamed_cols = self._reader.unnamed_cols 2012
pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader.__cinit__()
pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader._setup_parser_source()
FileNotFoundError: [Errno 2] No such file or directory: 'denton_housing.csv'
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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