Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

code into adata_exploration.pyfile and print the answers for the questions above inside the script. Save the script to your computer so you can upload to

code into a data_exploration.py file and print the answers for the questions above inside the script.

  • Save the script to your computer so you can upload to the LEO assignments folder
  • Remember to comment your code! (add comments explaining what your code does)

Part 2 - Data manipulation

The temperatures in our data are represented in Fahrenheit, hence,  need to convert the temperatures into Celsius.

  • Select from the data columns USAF, YR--MODAHRMN, TEMP, MAX, MIN and assign them into a new variable called selected
  • Remove all rows from selected that has NoData in column TEMP using dropna() -function
  • Convert the Fahrenheit temperatures from TEMP into a new column Celsius using the conversion formula:

  • image

  • Round the values in Celsius to have 1 decimal place (don't create a new column --> update the current one)

add  codes into a data_exploration.py file.

  • Save the script to your computer so you can upload to the LEO assignments folder
  • Remember to comment your code! (add comments explaining what your code does)

Part 3 - Data selection 

 divide the data into separate subsets for different stations and save those DataFrames into disk.

  • Divide the selection into two separate datasets:
    • Select all rows from selected DataFrame into variable called kumpula where the USAF code is 29980
    • Select all rows from selected DataFrame into variable called rovaniemi where the USAF code is 28450
  • Save kumpula DataFrame into Kumpula_temps_May_Aug_2017.csv file (CSV format)
    • separate the columns with ,
    • use only 1 decimal in the floating point numbers
  • Save rovaniemi DataFrame into Rovaniemi_temps_May_Aug_2017.csv file (CSV format)
    • separate the columns with ,
    • use only 1 decimal in the floating point numbers
  • Save your csv files to your computer and upload to the LEO assignments folder

 add  codes into a data_exploration.py file.

  • Save the script to your computer so you can upload to the LEO assignments folder
  • Remember to comment your code! (add comments explaining what your code does)

Part 4 - Data analysis

In this part the aim is to understand how different the summer temperatures has been in Helsinki Kumpula and Rovaniemi. Using the data from Part 3 in kumpula and rovaniemi DataFrames answer the following questions (all temperature output in Part 4 should be in Celsius with one decimal place):

 

Part 4a

  • What was the median temperature in Celsius (one decimal place) in each of the following locations:
    • Helsinki Kumpula?

Tec) (TF) -32) / 1.8

Step by Step Solution

There are 3 Steps involved in it

Step: 1

To complete the task you can create a Python script called dataexplorationpy and include the code below Make sure you have the necessary data file in ... 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

Integrated Accounting

Authors: Dale A. Klooster, Warren Allen, Glenn Owen

8th edition

1285462726, 1285462721, 978-1285462721

More Books

Students also viewed these Programming questions