df_train = df[df.date < "2022-12-01"]
df_valid = df[df.date >= "2021-12-01"]
import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(go.Scatter(x=df_train.date, y=df_train.close, name='Training'))
fig.add_trace(go.Scatter(x=df_valid.date, y=df_valid.close, name='Validation'))
fig.show()