DataFrame: Difference between revisions

288 bytes added ,  21 February 2023
no edit summary
No edit summary
No edit summary
Line 25: Line 25:
==Example==
==Example==
An example of a DataFrame would be a table showing students' grades in class. Each row represents the student, while each column corresponds to either subject or grade. To make reference and retrieval easier, the table can be labeled with unique column and row names.
An example of a DataFrame would be a table showing students' grades in class. Each row represents the student, while each column corresponds to either subject or grade. To make reference and retrieval easier, the table can be labeled with unique column and row names.
{| class="wikitable"
|+ 3 labeled examples
|-
! colspan="1" rowspan="2" | Name
! colspan="3"| Classes
|-
! Math
! Science
! English
! History
|-
| Alice || 78 || 80 || 99 || 65
|-
| Bob || 95 || 91 || 75 || 90
|-
| Charlie || 68 || 77 || 75 || 84
|-
| Emma || 94 || 79 || 88 || 96
|-
|}


| Math | Science | English | History |
| Math | Science | English | History |