From the course: Python Data Science Mistakes to Avoid
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Not testing - Python Tutorial
From the course: Python Data Science Mistakes to Avoid
Not testing
- [Instructor] Another common mistake when working with data is not writing tests. As you make changes to your code, it's important to consistently test to ensure that your code does not break. If you do not write tests, you may not notice errors in your code, and you may produce bad output, which can negatively affect decisions that are made from it. I'll be walking through an example to illustrate what happens when tests are not written and to share my approach for writing tests. Let's say I have a dataset containing students grades for five exams, and the students' instructor has the following two policies: one, each student's lowest exam grade gets dropped at the end of the term when determining final grades, and two, when a student misses an exam, the instructor marks the student's grade for that exam as missing in their records but treats missing exam grades as zeroes when calculating final grades. Now, say I wanted…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.