Create A DataFrame with randomly generated data

In [1]:
import pandas as pd
import numpy as np

In [2]:
df = pd.DataFrame(np.random.randint(0,10,size=(10, 4)), columns=list('ABCD'))

In [3]:
df


Out[3]:
A B C D
0 2 3 0 6
1 8 0 6 6
2 6 5 4 6
3 4 2 1 3
4 4 0 2 6
5 5 6 1 2
6 1 7 2 8
7 4 4 3 6
8 4 2 6 2
9 3 1 6 6

In [ ]: