CBSE BOARD XII, asked by sudhanshurai4514456, 1 month ago

write a program to create a dataframe from a 2d list. specify own index labels​

Answers

Answered by XXITSARYANXX
1

Answer:

SORRY I DON'T KNOW ANSWER

Answered by shahegulafroz
1

Program to create data frame from 2D list using Python:

import pandas as pd

list1 = [[30,40,50,60],[45,78,58,74],[57,69,85,74],[59,65,48,52]]

df1 = pd.DataFrame(list1, index = ['R1', 'R2', 'R3', 'R4'])

print(df1)

Output:

      0    1     2    3

R1  30  40  50  60

R2  45  78  58  74

R3  57  69  85  74

R4  59  65  48  52

Similar questions