In this section, we are going to use another file. The file is found in the directory for Chapter 14, Modeling Weather Data Points with Python. The file is called GlobalLandTemperaturesByMajorCity.csv.
Let's import the file into our notebook:
#reading the file and collecting only the timestamp and the year dframe= pd.read_csv('GlobalLandTemperaturesByMajorCity.csv')df_ny = dframe[dframe['City']=='New York']df_ny= df_ny.iloc[:, :2]
It is always a good idea to examine the first few entries to see how our dataset looks. This can be done using a head function:
df_ny.head(10)
The output should look like the following:
Now, we can select only ...