Today we'll review the basics of Python control and extend simple loops, conditionals, and functions to working with simple data files.
Chapters 8-11 of Think Python (don't worry, the chapters are only like 8 pages long)
Run through the IPython notebook.
- Download the rents_full.csv file and save it to your working directory. Create a new, clean IPython notebook to contain your homework.
- Using the techniques we learned in class on 9/21:
- Calculate the mean, minimum, and maximum rent price
- Calculate the mean, minimum, and maximum number of bedrooms
- Calculate the mean, minimum, and maximum square footage
- Replace any spaces, commas, or forward slashes in neighborhood names with underscores, and convert the neighborhood name to uppercase letters. Create a list containing each cleaned name, then print the first 15 elements in this list.
Round all of your mean values to 2 decimal places. Use comments to document all of your logic throughout the notebook. Make sure your entire notebook runs properly and without any errors. Click Kernel > Restart > Clear all outputs and restart. This clears your memory and re-initializes your notebook. Then click Cell > Run all and make sure everything behaves properly.