TDM 10100: Project 4 — Fall 2026
-
Data Frames in Python and R (comparing and contrasting Data Frames with Pandas, Polars, Data Tables, Tibbles)
Motivation: We learn about the ways that data is stored in rows and columns, in a variety of data frames in Python and R
Context: Both languages provide several types of reading in data and storing data in data frames.
Scope: data frames
Dataset(s)
This project will use the following datasets:
-
/anvil/projects/tdm/data/icecream/combined/reviews.csv -
/anvil/projects/tdm/data/flights/subset/airports.csv -
/anvil/projects/tdm/data/zillow/cities_crosswalk.csv -
/anvil/projects/tdm/data/starwars/characters.csv -
/anvil/projects/tdm/data/grouping/googleplaystore.csv -
/anvil/projects/tdm/data/formula_1/circuits.csv -
/anvil/projects/tdm/data/bay_area_bike_share/baywheels/202507-baywheels-tripdata.csv
|
In this project, please only use 2 cores in your Jupyter Lab session: (do not use 4 cores or 16 cores for this project) |
Also, please note this planned outage:
|
There is a planned, upcoming Anvil Outage on September 19-21 2026 Saturday, September 19, at 12:00 a.m. through Monday, September 21, at 8:00 p.m. EDT. We encourage you to get your work finished before the outage, because sometimes the outage time is extended. Please go ahead and work on Project 4, and try your best to complete it by this Friday, September 18. |
Questions
Question 1 (2 pts)
In Python, we often use Pandas data frames. We have already seen examples of Pandas data frames in the earlier projects. We provide two succinct examples here:
Read the data from the Google Play Store into a Pandas data frame:
/anvil/projects/tdm/data/grouping/googleplaystore.csv
For the categories in this data set (in the Category column), what are the 5 most popular categories, and how many times do each of those 5 categories appear?
Also, read in the data from the July 2025 Bay Area Bike Share Bay Wheels data into a Pandas data frame:
/anvil/projects/tdm/data/bay_area_bike_share/baywheels/202507-baywheels-tripdata.csv
What are the most popular 5 start station names, and how many times do they each appear?
-
What are the 5 most popular categories in the Google Play Store, and how many times do each of those 5 categories appear?
-
What are the most popular 5 start station names in the July 2025 Bay Area Bike Share Bay Wheels data, and how many times do they each appear?
-
As always, be sure to document your work from Question 1 (and from all of the questions!), using some comments and insights about your work. We will stop adding this note to document your work, but please remember, we always assume that you will document every single question with your comments and your insights.
Question 2 (2 pts)
Revisit the same questions about the Google Play Store and also the July 2025 Bay Area Bike Share Bay Wheels, but this time use Polars instead of Pandas.
We provide two succinct examples here:
|
If the Google Play Store gives you an error with Pandas, you can try adding the option: |
-
Revisit the same questions about the Google Play Store and also the July 2025 Bay Area Bike Share Bay Wheels, but this time use Polars instead of Pandas.
Question 3 (2 pts)
Revisit the same questions about the Google Play Store and also the July 2025 Bay Area Bike Share Bay Wheels, but this time use the seminar-r kernel and the fread function, which reads data into a data.table.
We provide two succinct examples here:
|
If the Google Play Store gives you an error with |
-
Revisit the same questions about the Google Play Store and also the July 2025 Bay Area Bike Share Bay Wheels, but this time use the R
freadfunction.
Question 4 (2 pts)
Revisit the same questions about the Google Play Store and also the July 2025 Bay Area Bike Share Bay Wheels, but this time use the seminar-r kernel and the read_csv function, which reads data into a tibble.
We provide two succinct examples here:
-
Revisit the same questions about the Google Play Store and also the July 2025 Bay Area Bike Share Bay Wheels, but this time use the
seminar-rkernel and theread_csvfunction, which reads data into atibble.
Question 5 (2 pts)
Read in the data from:
/anvil/projects/tdm/data/zillow/cities_crosswalk.csv
using each of the four ways that you learned above.
Show the head of the data frame each time.
use myDF.shape in Python at the end of each of two Python ways,
and use dim(myDF) in R at the end of each of the two R ways,
to verify that the data frames have 25341 rows and 4 columsn.
-
Read the Zillow cities crosswalk data in 4 ways (two ways in Python and two ways in R). Show the head of each of these data frames, and verify the number of rows and columns with each method.
Submitting your Work
Please make sure that you added comments for each question, which explain your thinking about your method of solving each question. Please also make sure that your work is your own work, and that any outside sources (people, internet pages, generative AI, etc.) are cited properly in the project template.
Prior to submitting your work, you need to put your work into the project template, and re-run all of the code in Jupyter Lab and make sure that the results of running that code is visible in your template. Please check the detailed instructions on how to ensure that your submission is formatted correctly. To download your completed project, you can right-click on the file in the file explorer and click 'download'.
Once you upload your submission to Gradescope, make sure that everything appears as you would expect to ensure that you don’t lose any points. We hope your first project with us went well, and we look forward to continuing to learn with you on future projects!!
-
firstname_lastname_project4.ipynb
|
It is necessary to document your work, with comments about each solution. All of your work needs to be your own work, with citations to any source that you used. Please make sure that your work is your own work, and that any outside sources (people, internet pages, generative AI, etc.) are cited properly in the project template. You must double check your Please take the time to double check your work. See here for instructions on how to double check this. You will not receive full credit if your |