Join Michele Vallisneri for an in-depth discussion in this video Solution, part of Introduction to Data Analysis with Python.
- To see my solution, let's go to the Python notebook…and select the 05_08 Challenge Begin notebook.…In this notebook, I've copied all the code…that we've developed so far in this chapter,…a level way to all sales.…Let's first collect all of the data that we need.…We'll use the getobs function that we developed together.…Let's not forget to integrate any missing temperatures…using the fillnans function that we also developed together.…
To find the year with the highest mean maximum temperature…in Minneapolis, we will again assemble an array of all years…and compute the mean across each row.…We'll consider years between 1940 and 2014.…It goes without saying that the second index in arange…is not included in the resulting list.…Use the function selectyear to return the data…for the individual years.…Take only the first 365 days for simplicity…and loop over the years that we are considering.…
I missed one argument for the function selected here.…Let's me insert it.…As for the mean, we can apply np.mean to this array…
- Writing and running Python in iPython
- Using Python lists and dictionaries
- Creating NumPy arrays
- Indexing and slicing in NumPy
- Downloading and parsing data files into NumPy and Pandas
- Using multilevel series in Pandas
- Aggregating data in Pandas
Skill Level Intermediate
1. Installation and Setup
2. Refresher: Data Containers in Python
3. Word Anagrams in Python
4. Introduction to NumPy
5. Weather Data with NumPy
6. Introduction to Pandas
7. Baby Names with Pandas
Next steps1m 36s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.