Kaggle Courses - Day One Recap - Python Course

I am reviewing the Kaggle Python Course as I complete it. I am completing it as a quick review of the fundamentals of Python; I've done Jose Portilla's Complete Python Bootcamp From Zero to Hero in Python on Udemy. I also completed two-thirds of Jose's intro to data science and machine learning course, in which I learned NumPy, Pandas, Matplotlib, and Seaborn, as well as the lectures on the different scikit-learn algorithms. I've used some Pandas/Matplotlib for data manipulation and visualization in my previous job, though I have not used any of the scikit-learn algos in practice and it has been about a year since I worked on those lectures.

Thoughts on the Lessons:

"Hello, Python"

This is a concise intro to Python and basic expressions, but it is probably slightly too technical for someone who has never coded before. I enjoy the notebook aspect and the automatic question/answer checking, which is not in the Udemy course I took. When I first came across "notebooks" I saw huge potential in the education world, and am currently wondering if it possible to set up notebook environments in Kolibri.

"Functions and Getting Help"

This is a very basic intro to functions in Python, along with using the help() function and docstrings. I like the use of the "common pitfall" callouts. Things I learned in this tutorial, which I've never learned elsewhere:

  • Docstrings: I have never been taught or taken the time to learn how to program the docstring for a function, and I appreciate the tutorial for this.
  • print() has default arguments.

  • round() can take an ndigits argument with a negative value, and round down to the nearest 10,100,1000, etc. by passing in -1,-2,-3, etc., respectively.

"Booleans and Conditionals"

No comment on the lecture; it covers basic operators and order of operations for True and False in multi-conditional statements. Unless you don't know how True and False work, this lecture probably won't teach you much. For the exercises, I do like the introduction to writing concise code and that it shows how you can use a conditional statement automatically returns a boolean. It is also a good intro into how we can use booleans to write basic decision-making programs.

"Lists"

The Lists Lesson is a quick intro to lists and Tuples. Distinguishes that tuples are immutable. Introduces slicing, indexing, and a few list methods.

"Loops and List Comprehension"

This is a solid introduction to for loops, while loops, and list comprehension. This lesson focused more on list comprehension. I liked its comparison to SQL's Select, From, and Where clauses. The lessons continue to do a good job of showing how code can be refactored in different ways to simplify code.

"Strings and Dictionaries"

The lesson goes over info on basic string usage. Also, how dictionaries work -- I've never seen dictionary comprehension before!

planets = ['Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune']

planet_to_initial = {planet: planet[0] for planet in planets}

planet_to_initial

{'Mercury': 'M', 'Venus': 'V', 'Earth': 'E', 'Mars': 'M', 'Jupiter': 'J', 'Saturn': 'S', 'Uranus': 'U', 'Neptune': 'N'}

I do wish Kaggle had introduced f-strings.

"Working with External Libraries"

This lesson covers how to import libraries and variables, as well as how to view the variables and methods using dir(library) and touches on how special methods may be defined differently in libraries. It also briefly covers Matplotlib and NumPy.

Recap

Overall the Kaggle Python course is a brief intro, and is probably meant to introduce Python to someone who knows a bit of programming already. I do not think it would be great for someone brand new to programming, and I'd suggest some larger course with videos instead. It was a good refresher on the basics.

The course did not cover Python Classes or object-oriented programming, but it does provide enough to get started in Python. I am looking forward to the other courses as a nice recap of scikit-learn, Pandas, and data visualization.

I will move forward and complete the other Kaggle courses, and use them as recaps and/or intros to other subjects. However, based on the brevity of the Python course, I will definitely be moving on to more in depth resources such as the machine learning textbook/course I posted in my first post.