Now, we are only interested in finding the temperature across Nepal. So, let's filter all the countries and extract entries related to Nepal only:
#take a look at Nepal
nepal=bycountry.loc[bycountry['Country'] == "Nepal"]
type(nepal)
nepal.infer_objects()
This should output only entries related to Nepal, as shown in the following screenshot:
Screenshot 14.2: Entries related to Nepal
Now let's save the temperature into a separate variable to normalize it:
temp=nepal['AverageTemperature']
temp=temp.dropna(how='any')
Here, the dropna function removes the missing value, and how = 'any' tells us that if any NA values are present, we should drop that row or column.
Now, let's preprocess the temperature to normalize it. And then plot the chart:
#pre-processing
scale=preprocessing.scale(temp)
plt.plot(scale...