Q5 [5 points] Introduction to Python Flask
Flask is a lightweight web application framework written in Python that provides you with tools, libraries and technologies to quickly build a web application. It allows you to scale up your application as needed.
You will modify the given file:
• wrangling_scripts/wrangling.py
NOTE: You must only use a version of Python ≥ 3.7.0 and < 3.8 for this question. This question has been developed, tested for these versions. You must not use any other versions (e.g., Python 3.8).
NOTE: You must only use the modules and libraries provided at the top of wrangling.py and modules from the Python Standard Library (except Flask). Pandas and Numpy CANNOT be used — while we understand that they are useful libraries to learn, completing this question is not critically dependent on their functionality. In addition, to enable our TAs to provide better, more consistent support to our students, we have decided to focus on the subset of libraries.
Username()- Update the username() method inside wrangling.py by including your GTUsername
• Get started by installing Flask on your machine by running pip install Flask (Note that you can optionally create a virtual environment by following the steps here. Creating a virtual environment is purely optional and can be skipped.)
• To run the code, you must navigate to the Q5 folder in your terminal/command prompt and execute the following command: python run.py. After running the command go to http://127.0.0.1:3001/ on your browser. This will open up index.html showing a table in which the rows returned by data_wrangling() are displayed.
• You must solve the following 2 sub-questions:
a. Read the top 100 rows using the data_wrangling() method.
NOTE: The skeleton code by default reads all the rows from movies.csv. You must add the required code to ensure reading only the first 100 data rows. The skeleton code already handles reading the table header for you.
b. Sort the table in descending order of the values i.e., with larger values at the top and smaller values at the bottom of the table in the last (3rd) column.
Deliverables: Submit the following file to Gradescope:
● wrangling.py : the completed python file with your changes.
Students succeed in their courses by connecting and communicating with an expert until they receive help on their questions
Consult our trusted tutors.