DataLeaguebeta

Agreement of directions in pandas

code30 pts

The file data.csv contains monthly data from a university library for 13 months: mesiac (month), the number of navstevy (visits) and the number of vypozicky (loans). We want to know whether the two variables move together.

  1. Store in zmeny the monthly changes of both variables compared with the previous month, without the first month.
  2. Store in podiel_zhody the proportion of months in which visits and loans moved in the same direction (both rose or both fell).
  3. Draw both variables over time in one chart.

There is no month in the data in which either variable stayed the same.

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.

Agreement of directions in pandas · From a chart to a research question · DataLeague