Ravindra BagaleCourses & study guides मराठी Track your progress

Python Classes and Objects for Beginners: OOP Basics with Simple Examples

Ravindra Bagale's Tip — Chala mitrano

You do not need to be an OOP expert for data work. But pandas DataFrame is a class, and df.head() is a method. Today we learn just enough about classes to understand what you use daily.

What you will learn in this chapter

  • What a class and an object are
  • init and attributes
  • Methods that use the object's data
  • Many objects from one class
  • A tiny bit of inheritance
  • How this connects to pandas

Practice data

All names, shops, banks, hospitals and amounts in this chapter are made up for learning. They are not real people or real company numbers.

Concepts in this chapter

  1. P11.1What Is a Class and an Object in Python
  2. P11.2How to Add Methods to a Python Class
  3. P11.3Many Objects in a List: Classes with Real Data
  4. P11.4Python Inheritance Basics with an Example