Join Michele Vallisneri for an in-depth discussion in this video Integrating missing data, part of Introduction to Data Analysis with Python.
- We have sucessfuly loaded temperature data…into NumPy Record Array.…We can begin to play with it…but we see that there is missing data…that needs to be integrated first.…We'll do that by first marking it as…not a number using NumPy Boolean masks.…And then, by replacing it with Interpolated values…using the numpy.interp function.…Let's go to the Python notebook.…Let's grab the minimum and maximum temperatures…here for "lihue"…and let's try to plot one of them.…
We notice immediately that there's something strange.…It must be the - 999.9 value associated…with missing observations.…Let's change that to something more representative…such as "nonpy.nan" for not a number.…We can do this by modifying the "getobs" function.…We save the data to a variable…and then use a NonPy Boolean Mask…to select only the values equal to - 999.9…and then change only those to "nan."…Reassign the "lihue_tmax" and "tmin"…and plot again.…
That's better.…The plotting ignores the "nan" values.…So let's plot "tmax" and "tmin" together.…Again, this makes sense.…
- 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?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.