def scatter_date(df, x, y, datetimeformat):
    if not isinstance(y, list):
        y = [y]
for yi in y:
    plt.plot_date(df[x].apply(lambda z: matplotlib.dates.date2num(datetime.
        datetime.strptime(z, datetimeformat))), df[yi], label=yi)
plt.legend()
plt.xlabel(x)
scatter_date(data, x='date', y=['col1', 'col2'], datetimeformat='%Y-%m-%d')
pandas точечное построение даты и времени