O'Reilly logo

NumPy Cookbook - Second Edition by Ivan Idris

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exploring the day-to-day pressure range

The daily pressure range is the difference of the daily highs and lows. With real-world data, we sometimes have missing values. Here, we can potentially lack values for the high and/or low pressures of a given day. It's possible to fill those gaps with a smart algorithm. However, let's keep it simple and just ignore them. After calculating the ranges, we will do a similar analysis as in the previous recipe, but we will use functions that can deal with NaN values. Also, we will look at the relation between months and ranges.

The corresponding code is in the day_range.py file in this book's code bundle:

from __future__ import print_function import numpy as np import matplotlib.pyplot as plt import calendar as ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required