Question: 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:

  • Tec) (TF) -32) / 1.8

  • 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

1 Expert Approved Answer
Step: 1 Unlock

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 ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!