DataLeaguebeta

Salaries by department in pandas

code25 pts

The file data.csv contains monthly salaries of employees in three departments (columns oddelenie = department and plat = salary; the department names are kept in Slovak: Vývoj = Development, Podpora = Support, Obchod = Sales).

  1. Load it into a DataFrame df.
  2. Calculate the median and mean salary for each department into the variables mediany (medians) and priemery (means).
  3. Draw a bar chart in which each department has two bars: the median and the mean.

The check compares the values in mediany and priemery and verifies that at least one chart exists. The first run downloads pandas and matplotlib (about 15 MB), after which they stay in the browser's memory.

Python loads when you first use the editorPackages:pandasmatplotlib

The output appears after you run the code.

Run the code and fix the errors until all checks pass.