added pd as namespace
- [x ] closes https://github.com/pydata/pandas/pull/12268#discussion_r55924987

This is the msg:
more consistent with code in the rest of the document

added more namespace

Generally, also numpy's randn should used as
np.random.randn

isolated namespace changes

Note:
I hope I got the rebase & merge right.
