This is a vague version of my assignment:
DATE: YEAR-MONTH-DAY (the time stamp contains the first day of each month, but values in other columns are average values for the whole month!)
USAF: Station number
TEMP_F: Monthly mean temperature in Fahrenheit
TEMP_C: Monthly mean temperature in Celsius
REF_TEMP_C: Long term average in Celsius (for the period 1988-2018)
DIFF_C: Difference between monthly mean and long term average in Celsius
Load the Helsinki temperature data from the file helsinki-vantaa.txt.
Read the data into a variable called data using pandas
Parse the dates from the column 'DATE' and set the dates as the index in the DataFrame
Enter your code here:
Import pandas as pd
data = pd.read_text (helsinki-vantaa.text)
selected = data [[ ‘dates’ ]]
selected = selected.reset_index (drop = TRUE)
The above code is what I have so far.
#Enter the output for a test print of the first five rows: print(data.head())
# Check the number of rows in the data frame
print(len(data))
Select data for the 30-year period (January 1988 to December 2018).
Store the selection in a new variable selection
Enter your code here:
#Enter the output for a test print of the following selection.head()
# Check the number of rows, enter output below
print(f'Number of rows: {len(selection)}')
Create a line plot for the next set of instructions that display the temperatures (Temp_C) for each month within a 30 year period
Set the figure size
Create a figure object and use the figsize parameter.
Adjust the line style
solid line
black color
round markers
Add a title and axis labels
Title: 'Helsinki-Vantaa Airport'
X-label: 'Time'
Y-label: 'Temperature (Celsius)
This is the file for the assignment:
Data for the assignment.docx
Trying to figure out this problem. My code is not working properly.