March 2020
Beginner to intermediate
352 pages
8h 40m
English
Let's answer the rest of the questions, taking a look at the average number of emails per day and per hour:
def plot_number_perday_per_year(df, ax, label=None, dt=0.3, **plot_kwargs): year = df[df['year'].notna()]['year'].values T = year.max() - year.min() bins = int(T / dt) weights = 1 / (np.ones_like(year) * dt * 365.25) ax.hist(year, bins=bins, weights=weights, label=label, **plot_kwargs); ax.grid(ls=':', color='k')
The preceding code creates a function that plots the average number of emails per day. Similarly, let's create a function that plots the average ...
Read now
Unlock full access