Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is using python problem sales.csv (sample provided with the lab) that contains sales of land in various parts of the UK for years of

This is using python problem

sales.csv

(sample provided with the lab) that contains

sales of land in various parts of the UK for years of 2012-2014. The file consists of 4 columns: the area and the 3

years of sales numbers. It will calculate the following stats (printing to screen optional): Areas with average sales

across the three years in the ranges 0-3000, 3001-5000, >=5001. It should generate a CSV file (columns separated by

commas, rows separated by newlines (

).

Note that the rows do not have to be in any particular order.

It should create a table similar to the following (table incomplete):

--------------------------------------------------------------------------

image text in transcribed

--------------------------------------

this is what inside the csv file

Area,Sales-2012,Sales-2013,Sales-2014

City of London,195,429,267

Barking and Dagenham,1316,1746,2028

Barnet,3973,4738,4794

Bexley,2815,3349,3827

Brent,2021,2442,2795

Bromley,4764,5454,5963

Camden,2365,2936,2665

Croydon,3559,4811,5748

Ealing,3189,3815,3291

Enfield,2752,3367,3647

Greenwich,2730,3468,4358

Hackney,2533,2701,2771

Hammersmith and Fulham,2558,2993,2745

Haringey,2398,2655,2798

Harrow,2221,2544,2661

Havering,2771,3547,4086

Hillingdon,3199,3332,3596

Hounslow,2317,2837,3142

Islington,2784,2999,2724

Kensington and Chelsea,2191,2648,2603

Kingston upon Thames,2301,2747,2949

Lambeth,3875,4908,4726

Lewisham,3283,4197,4345

Merton,2722,3220,3016

Newham,1683,2330,2822

Redbridge,2464,2946,3529

Richmond upon Thames,3212,3605,3342

Southwark,3310,4246,3797

Sutton,2528,2998,3325

Tower Hamlets,3507,4370,4899

Waltham Forest,2277,2874,3400

Wandsworth,5205,6250,5800

Westminster,3169,3631,3439

Inner London,39056,47293,46401

Outer London,53131,63840,69497

North East,25629,29970,34330

North West,68322,84256,99008

Yorkshire And The Humber,54827,66383,77019

East Midlands,53574,65171,76687

West Midlands,55547,66789,77939

East,79016,95353,110144

London,92187,111133,115898

South East,120269,144435,163224

South West,74559,89618,103042

England,623930,753108,857291

Wales,29685,36117,41383

England & Wales,653615,789225,898674

>=5001 Bromle Wandsworth 3001-5000 0-3000 City of LondonBarnet Barking and Dagenhanm Croyden

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

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions