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
var shirt = "blue"; 2. var pants = "gray"; 3. var clothes = wearIt(shirt, pants); 4. function wearIt( x, y) 5. { 6. var myOutfit
pogonyaev

Answer:

Arguments: "blue" and "gray"

Parameters: x and y

Explanation:

In programming, a function can take zero or one or more than one input values. These input value will be held by the variables which are called parameters. In this code snippet, x and y are parameters of wearIt function.

On another hand, when calling a function, we provide the values to the function and the values provided are termed as arguments. In this case, we provide the string blue and gray which are held by shirt and pants variables respectively to the function wearIt. The string "blue" and "gray" will then be passed to parameter x and y which will be processed in the function.  

4 0
4 years ago
Pleaseeee Help.
Elenna [48]

Answer:B

Explanation:

3 0
3 years ago
Read 2 more answers
5. Suppose that we designed a new floating point unit that accelerates the floating point instructions by a factor of 5. We are
galina1969 [7]

Answer:

3

Explanation:

6 0
4 years ago
Consider an online shopping portal that allows a customer to browse and purchase different products. The products are arranged u
o-na [289]
Way too much to read bye
7 0
3 years ago
Read 2 more answers
Why can't I register for Brainly?? I've been trying for months, too! I've noticed this question has been asked so many times, bu
Alenkasestr [34]

Answer:

Just click view profile and go to preferences

Heres a screenshot :

4 0
3 years ago
Other questions:
  • Please I need all the help I can get Thank You So Much
    14·1 answer
  • Stock ____ firms trade financial securities between a buyer and a seller.
    11·1 answer
  • One of the earliest uses of an electronic digital computer involved ________.
    8·1 answer
  • Technologies that function within the established system are called
    12·1 answer
  • Convert to binary140
    5·1 answer
  • The use of _______________ can validate input responses from clients and prevent certain attack methodologies
    14·1 answer
  • When nat hides the source ip of an originating device, this is known as ________?
    15·2 answers
  • Use the drop-down menus to match each description to the correct term.
    13·2 answers
  • My pc suddenly freezes and i can't open any apps or task manager. Apps do not open at all and if i restart from the start it get
    9·1 answer
  • Four ways to improve the performance of a hard disk include.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!