import numpy as np
import pandas as pd
x = 'hello'
print('hello')
x
print(x)
x
astr = 'yellow'
another_str = "yellow"
aint = 4
another2_str = str(aint)
multiple_line_str = """
asgashdsj
sdajfdfsjfdjjsfjdsjfsdj
fsjfdsjsdfj
"""
afloat = 10.2
a = 10.
b = '45'
c = 1337
atup = (1, 2)
alist = [5, 5, 6, 7]
adict = {'key1': [6, 3], 'key2': [5, 4]}
atup_of_lists = ()
alist_of_tups = []
adict_of_lists_and_tups = {}
type(atup)
atup_sub = atup[0]
alist_sub = alist[2:3]
adict_sub = adict['key1']
nparr = np.array(alist)
pddf = pd.DataFrame(adict)
alist_aint = alist * aint
nparr_aint = nparr * aint
afloat_fmt = '{0:0.2f}'.format(afloat)
aint_fmt = '{0:5d}'.format(aint)
astr_fmt = '{0}'.format(astr)
afloat_aint_astr_fmt = ''.format()
Write a python script to sort the annual-average global temperature anomaly values (contained in aravg.ann.land_ocean.90S.90N.v4.0.1.201612.asc
in into a new dictionary in descending order.
The script should print the top 10 warmest years to a file called 'top10warmest.txt', including all of the following information:
The output should look like this:
Ranking Year Temperature Anomaly (degrees C) Temperature Anomaly (degrees F)
1. 1745 10.0 28.0
2. (etc.)