Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Antipatterns Avoiding The Pitfalls Of Database Programming

Authors: Bill Karwin

1st Edition

1680508989, 978-1680508987

More Books

Students also viewed these Databases questions

Question

10-3 Describe a comprehensive approach to retaining employees.

Answered: 1 week ago

Question

2. Place a value on the outcomes.

Answered: 1 week ago