1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
masha68 [24]
2 years ago
6

Write a program that computes the minimum, maximum, average and standard deviation of the population over time for a borough (en

tered by the user). Your program should assume that the NYC historical population data file, nycHistPop.csv is in the same directory.A sample run of your program:
Enter borough: Staten Island
Average population: 139814.23076923078
Maximum population: 474558
and another run:

Enter borough: Brooklyn
Average population: 1252437.5384615385
Maximum population: 2738175
Computers and Technology
1 answer:
IrinaK [193]2 years ago
4 0

Answer:

import pandas as pd #importing pandas library as pd

import matplotlib.pyplot as plt #importing matplotlib.pyplot as plt

pop=pd.read_csv('nycHistPop.csv') #reading the csv file

borough=input('Enter borough name:') #asking the user for borough namme

# image=input('Enter image name:')

# pop['Fraction']=pop[borough]/pop['Total']

# pop.plot(x='Year', y='Fraction')

print("Minimum population",pop[borough].min()) #printing the minimum population of borough

print("Maximum population",pop[borough].max()) #printing the maximum population of borough

print("Average population",pop[borough].mean()) #printing the average population of borough

print("Standard deviation",pop[borough].std()) #printing the standard deviation of borough

# fig=plt.gcf()

# fig.savefig(image)

Explanation:

You might be interested in
The term ________ refers to fluid flow back to the pan to empty or drain a circuit.
Strike441 [17]

The term is: transmission flush

8 0
3 years ago
Are mobile phones hazardous to your health?
Digiron [165]

Explanation:

they can be. they can strain your eyes if you look at them too long with no breaks, for one thing

6 0
3 years ago
Read 2 more answers
A media file refers to what kind of file? A. Clip art
prohojiy [21]

Waveform Audio (.wav) is a common file format. Created by Microsoft and IBM, WAV was one of the first audio file types developed for the PC. WAV files are defined as lossless, meaning that files are large and complete; nothing has been lost.

your answer will be

<h2><em><u>C; image</u></em></h2>
5 0
3 years ago
Read 2 more answers
When entering a function or formula in a cell, which of the first character you must type?
lions [1.4K]
When entering a function or formula in a cell, which of the first character you must type =
3 0
3 years ago
Read 2 more answers
In 1928 what film was the first all talking feature
goblinko [34]

Lights of New York was the 1928 what film was the first all talking feature.

8 0
3 years ago
Other questions:
  • This program will output a right triangle based on user specified height triangle_height and symbol triangle_char. (1) The given
    9·1 answer
  • Page orientation can be either landscape or _____.
    13·1 answer
  • ​_____ was the first commercially successful computer. ​z3 ​eniac ​univac ​colossus
    13·1 answer
  • When cleaning a firearm, what end of the firearm should you generally clean from?
    11·2 answers
  • A new employee has reported that print jobs are printing as garbled text. Which of the following is MOST likely the reason for t
    8·1 answer
  • A computer is a multipurpose device that accepts input, processes data, stores data, and produces output, all according to a ser
    9·1 answer
  • All of the following are helpful tips for protecting your digital privacy, except:
    10·2 answers
  • In C!!
    11·1 answer
  • Discuss TWO changes in ICMP that took place with the development of IPV6 and indicate why those changes were made.
    7·1 answer
  • An excerpt of a sample business cover letter. The text uses curly font and has a warm to cold color background. What change does
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!