1import pandas as pd
2
3#initialize a dataframe
4df = pd.DataFrame(
5 [[21, 72, 67],
6 [23, 78, 69],
7 [32, 74, 56],
8 [52, 54, 76]],
9 columns=['a', 'b', 'c'])
10
11#convert dataframe to numpy array
12arr = df.to_numpy()
13
14print('\nNumpy Array\n----------\n', arr)