text_html_output_1.png
import matplotlib.pyplot as plt

import numpy as np # linear algebra

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import warnings

import seaborn as sns
import matplotlib.pyplot as plt
import warnings
warnings.filterwarnings('ignore')
plt.style.use('fivethirtyeight')

df = pd.read_csv('../input/netflix-shows/netflix_titles.csv')

df.isnull().sum()

df = df.dropna()

df_shows = df[df['type'] == 'TV Show']
df_movies = df[df['type'] == 'Movie']
df_date = df_shows[['date_added']].dropna()
df_date['year'] = df_date['date_added'].apply(lambda x: x.split(', ')[-1])
df_date['month'] = df_date['date_added'].apply(lambda x: x.lstrip().split(' ')[0])
month_order = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'][::-1]
dfu = df_date.groupby('year')['month'].value_counts().unstack().fillna(0)[month_order].T
plt.figure(figsize=(10, 7), dpi=200)
plt.pcolor(dfu, cmap='afmhot_r', edgecolors='white', linewidths=2)
plt.xticks(np.arange(0.5, len(dfu.columns), 1), dfu.columns, fontsize=7, fontfamily='serif')
plt.yticks(np.arange(0.5, len(dfu.index), 1), dfu.index, fontsize=7, fontfamily='serif')
plt.title('Netflix Contents Update', fontsize=12, fontfamily='calibri', fontweight='bold', position=(0.2, 1.0 + 0.02))
cbar = plt.colorbar()
cbar.ax.tick_params(labelsize=8)
cbar.ax.minorticks_on()
plt.show()