Mountains (2 points) ==================== Data concerning the world highest mountains are stored in file :download:`peaks.csv`. Download it and examine its content. We have already read this file obtaining the corresponding :py:ref:`DataFrame `, ``dfp``. The following example shows the names of all the columns of it and a subdataframe example: .. literalinclude:: test-example.txt :language: python :lines: 4-14 Save the following functions into file ``mountains.py`` 1. (**1 point**) Write function :py:func:`failed` that takes a :py:ref:`DataFrame `, ``dfp``, as that described, the name of a mountain range (:py:class:`str`) and two mountain heights (two :py:class:`int`), ``h1`` and ``h2`` ( ``h1`` < ``h2``). This function considers only the subdataframe with those mountains that belong to the given range and such that its height is between ``h1`` and ``h2`` (both included), and returns a :class:`tuple` with the maximum and the minimum number (two :py:class:`int`) of failed attempts of this subdataframe of mountains. Examples: .. literalinclude:: test-failed.txt :language: python :lines: 5-8 .. note:: You have more tests in file :download:`test-failed.txt` .. hint:: Use selection and methods ``max`` and ``min``. 2. (**1 point**) Write function :py:func:`parent` that takes a :py:ref:`DataFrame `, ``dfp``, as that described, and returns a :py:ref:`Series ` with the total number of ascents for each parent mountain, sorted in descending order. Examples: .. literalinclude:: test-parent.txt :language: python :lines: 5-20 .. note:: You have more tests in file :download:`test-parent.txt` .. hint:: Use methods ``groupby``, ``sum`` and ``sort_values``. .. note:: To run these functions you don't actually need to read the given data file. But you need to download and save it into your working folder because the given testfiles read from it to create the :py:ref:`DataFrame `.