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
In order to install a device, the operating system needs the required __________ for that device.
JulsSmile [24]
Any answer choices to help out??
7 0
3 years ago
Read 2 more answers
11)When, if ever, will the geometric average return exceed the arithmetic average return for a given set of returns?A) When the
grigory [225]

Answer: E. Never

geometric average return can NEVER exceed the arithmetic average return for a given set of returns

Explanation:

The arithmetic average return is always higher than the other average return measure called the geometric average return. The arithmetic return ignores the compounding effect and order of returns and it is misleading when the investment returns are volatile.

Arithmetic returns are the everyday calculation of the average. You take the series of returns (in this case, annual figures), add them up, and then divide the total by the number of returns in the series. Geometric returns (also called compound returns) involve slightly more complicated maths.

6 0
2 years ago
A storage location in the computer's memory that can hold a piece of data is called:
Zigmanuir [339]

Answer:

b. a variable

Explanation:

A variable holds a specific type of data

3 0
2 years ago
Samuel was hired to create a program that asks the user questions and, based on the answers, recommend a book to read. What kind
quester [9]

Answer:

I think the answer is C

Explanation:

Selection

3 0
3 years ago
The value 8/10 in a cell refers to which of these?
AleksAgata [21]
D. all of these, since it depends on how the cell is formatted.
8 0
3 years ago
Read 2 more answers
Other questions:
  • Which computer device works like the human central nervous system by connecting all the computer’s parts together and allowing t
    9·1 answer
  • HELPPP ASAPP
    8·2 answers
  • Which of the file names below follows standard file naming convention
    13·1 answer
  • Which part of the cpu stores instructions for high speed access or processing
    14·1 answer
  • What are some useful properties of current electricity
    13·2 answers
  • Information management should supply information in the form of meaningful images rather than raw data, which requires that we h
    13·1 answer
  • The physical parts of the computer are known as?
    14·1 answer
  • Write an algorithm to show whether a given number is even or odd.
    14·1 answer
  • Who here has a crush on jk from bts but feels more mature than him
    10·2 answers
  • What's the difference between a robot and a machine?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!