A DataFrame student consist 10 records of students that include
rollno,name,gender and age
i. How many elements in student()ii What is the shape of student
Answers
Answered by
0
(i) 40
(ii) (10, 4)
(i) A DataFrame is a two-dimensional data structure, similar to a spreadsheet, that consists of rows and columns. The total number of elements in a DataFrame is equal to the number of rows multiplied by the number of columns.
Since there are records of 10 students the data frame has 10 rows and 4 columns of attributes ( roll no,name,gender and age ).
If the DataFrame has 10 rows and 4 columns, it will have a total of:
10 x 4 = 40
40 elements.
(ii)The shape of a DataFrame is a tuple that indicates the number of rows and columns it has, in that order.
the DataFrame has 10 rows and 4 columns (rollno, name, gender, and age), its shape would be (10, 4).
#SPJ1
Similar questions
Math,
3 months ago
English,
3 months ago
Chemistry,
7 months ago
Science,
7 months ago
Environmental Sciences,
1 year ago
Computer Science,
1 year ago
Math,
1 year ago