import pandas as pd df = pd.DataFrame( np.arange(24).reshape(4, -1), columns = ['c1', 'c2', 'c3', 'c4', 'c5', 'c6'], index=['r1', 'r2', 'r3', 'r4'] ) # 결과