1>>> df2 = pd.DataFrame(np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]),
2... columns=['a', 'b', 'c'])
3>>> df2
4 a b c
50 1 2 3
61 4 5 6
72 7 8 9
8
1# Import pandas library
2import pandas as pd
3
4# initialize list of lists
5data = [['tom', 10], ['nick', 15], ['juli', 14]]
6
7# Create the pandas DataFrame
8df = pd.DataFrame(data, columns = ['Name', 'Age'])
9
10# print dataframe.
11df
12