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
Llana [10]
3 years ago
13

Write a program that computes the minimum, maximum, average, median and standard deviation of the population over time for a bor

ough (entered by the user). Your program should assume that the NYC historical population data file, nycHistPop.csv is in the same directory.
Computers and Technology
1 answer:
rodikova [14]3 years ago
4 0

Answer:

import pandas as pd

df = pd.read_csv('nycHistPop_csv', skiprows=5)

NY_region = list(df.columns[1: -1])

select_region = input("Enter region: ")_capitalize()

if select_region in NY_region:

   pass

else:

   raise("Region must be in New york")

def pop(location):

   # or used describe() to replace all like: print(df[location]_describe())

   print(df[location]_min())

   print(df[location]_max())

   print(df[location]_mean())

   print(df[location]_median())

   print(df[location]_td())

pop(select_region)

Explanation:

Pandas is a python packet that combines the power of numpy and matplotlib used for data manipulation. It is good for working with tables that are converted to dataframes.

The nycHistPop_csv file is read to the code to a dataframe called "df", then the user input and the function "pop" is used to automatically generate the statistics of a given region.

You might be interested in
PLEASE HELP ASAP
Alex73 [517]
I dont know if you need more people to answer so.. my mom, dad, brother, best friend 1, best friend 2, grandma, grandpa, cousin, aunt, uncle
7 0
3 years ago
Read 2 more answers
A keyboard would be considered _____. Select 2 options.
Digiron [165]

Answer:

What are the 2 options?

Explanation:

7 0
3 years ago
Read 2 more answers
The process where the programmer steps through each of the program's statements one by one is called
viva [34]

The process where the programmer steps through each of the program's statements one by one is called \sf\purple{hand \:tracing}.

\bold{ \green{ \star{ \orange{Mystique35}}}}⋆

5 0
3 years ago
Most languages allow a specialized selection structure called the ____ structure when there are several distinct possible values
aleksandr82 [10.1K]

Answer:

CASE

Explanation:

Case Structure is a mechanism that allows different executions when there are several distinct possible values for a single variable, and each value requires a different subsequent action depending on the value of the label.

Case structure is also a conditional control structure that appears in most modern programming languages and allows a selection to be made between several sets of program statements.

8 0
3 years ago
Carlos owns a hardware store. He currently is not using any software to track what he has in the store. In 1–2 sentences, descri
Tresset [83]

Carlos Should use a Security Camera to keep track of his physical hardware. Carlos can then use a computer to monitor the security cameras.

7 0
3 years ago
Read 2 more answers
Other questions:
  • The purpose of a capacitor unit in a vacuum cleaner is to
    12·1 answer
  • What is cyberbullying?
    14·2 answers
  • You have dinner with your family and tell them that you have taken bcis. your mother tells you that she is proud of you and that
    9·1 answer
  • 50 points!!!!!
    9·2 answers
  • _____ is a subset of a data warehouse in which only a focused portion of the data warehouse information is kept. A. Data diction
    6·1 answer
  • The _____ is a blinking vertical line that indicates where the next typed character will appear. scroll box sheet tab insertion
    7·1 answer
  • Write a C# program named DoubleDecimalTest thatdeclares and displays two variables - a double and a decimal.Experiment by assign
    9·1 answer
  • Ivan wants to have code in a game that will make it possible to change the speed of a swimmer in the game. Which of these does I
    8·1 answer
  • How does social network use message to entertain?
    14·1 answer
  • Question #2: How would you demonstrate professionalism in a video call with a teacher? Edmentum Digital world Please Help!!
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!