We can create keyword-data pairs to form a dictionary (shock horror) of values. In this case we have defined some strings and number to represent temperatures across europe
\n", "temps = {'Brussles': 9, 'London': 3, 'Barcelona': 13, 'Rome': 16}\n", "temps['Rome']\n", "16\n", "
We can also find out what keywords are associated with a given dictionary, In this case:
\n", "temps.keys()\n", "dict_keys(['London', 'Barcelona', 'Rome', 'Brussles'])\n", "
Dictionaries will crop up more and more often, typically as a part of differnt file structure such as ynl
and json
.
So the docs are here. Find the syntax to change to names to better to represent maximum length, lifetime and point in time which they occured.
\n", "\n", "So we covered dictionaries earlier. We can create keyword data pairs to form a dictionary (shock horror) of values. In this case
\n", "temps = {'Brussles': 9, 'London': 3, 'Barcelona': 13, 'Rome': 16}\n", "temps['Rome']\n", "16\n", "
We can also find out what keywords are associated with a given dictionary, In this case:
\n", "temps.keys()\n", "dict_keys(['London', 'Barcelona', 'Rome', 'Brussles'])\n", "
Now that we have the plot for the maximum length, now make a bar graph of the lifetimes of the features.
\n", "\n", "Now, to all the astronomers out there, let us process some real data. We have some txt files containing the timeseries data from a recent paper. Can you process the data and show us the planet?
\n", "HINT: You'll need to treat this data slightly differently. The date here is in Julian Day so you will need to use these docs to convert it to a sensible datetime object, before you make the DataFrame.
\n", "\n", "