# creating a dataframe df = pd.DataFrame(data, index=['row1', 'row2', 'row3'], columns=['col1', 'col2']) # showing the dataframe df