Frequencies and a contingency table in pandas
code25 pts
The file data.csv contains the answers of 20 students: odbor (field of study), rocnik (year of study) and spokojnost (satisfaction with their studies on a scale from 1 to 5).
The values of odbor are kept in Slovak: Informatika = Computer Science, Matematika = Mathematics, Fyzika = Physics.
Two students did not fill in their satisfaction. The column separator is a semicolon.
- Load the file into
df. - Store the proportion of students in each field of study (numbers from 0 to 1) in
podiely. - Store the cumulative percentage frequency of satisfaction, sorted from the value 1 upwards, in
kumulativne. - Store the contingency table odbor × rocnik with proportions by rows in
po_riadkoch.
The check compares the computed values. The first run downloads pandas, after which it stays in the browser's memory.
Python loads when you first use the editorPackages:pandas
The output appears after you run the code.
Run the code and fix the errors until all checks pass.