write a program to create a dataframe from a 2d list. specify own index labels
Answers
Answered by
1
Answer:
SORRY I DON'T KNOW ANSWER
Answered by
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
History,
4 hours ago
Social Sciences,
7 hours ago
Math,
7 hours ago
History,
8 months ago
Math,
8 months ago