x1 = df[(df['id'] == 1) & np.isfinite(df['my_variable'])]['date']
x2 = x1.tolist()
y = df[(df['id'] == 1) & np.isfinite(df['my_variable'])]['my_variable']
plt.bar(x2, y)
гистограмма matplotlib с датами