python – NameError: name & # 39; dates & # 39; It is not defined

I'm doing this introduction in Pandas:
https://pandas.pydata.org/pandas-docs/stable/10min.html

#! / usr / bin / env python3

import pandas like pd
import numpy as np
import matplotlib.pyplot as plt

s = pd.Serie ([1,3,5,np.nan,6,8])
fingerprints)

df = pd.DataFrame (np.random.randn (6,4), index = dates, columns = list (& # 39; ABCD & # 39;))
print (df)

df.head ()

This code works in Jupiter but when I'm running it in Komodo it does not work and it gives me the following error:

Tracking (recent calls latest):
File "/Users/Barry/Documents/Python/testpanda.py", line 11, in 
    df = pd.DataFrame (np.random.randn (6,4), index = dates, columns = list (& # 39; ABCD & # 39;))

Y

[![NameError: name 'dates' is not defined][1]][1]