Object-Oriented Programming

An introduction to object-oriented programming.

Introduction

So far, we have learned how to define different functions to manipulate data. While useful, functions are not always intuitive to what we want to be accomplishing, and can even be limiting. Sometimes, we want to do more than just manipulate data that is passed into a function. In this section, we will be learning about a new type of programming, object-oriented programming (OOP), which allows the programmer to define objects in their code.

Object-oriented programming is meant to make coding more intuitive by allowing the programmer to manipulate tangible things, such as dogs, cars or people, and group these objects into different classes. In the context of data science, you will encounter OOP when you use packages and frameworks. Key data science libraries, such as pandas, numpy, and scikit-learn all heavily rely on OOP.

Last updated