1#import pandas as pd
2import pandas as pd
3#import numpy as np
4import numpy as np
5data = np.array([(3, 'a'), (2, 'b'), (1, 'c'), (0, 'd')],dtype=[('col_1', 'i4'), ('col_2', 'U1')])
6print("ndarray is:",data)
7df=pd.DataFrame.from_records(data)
8print("----------The DataFrame is----------")
9print(df)