S
Classes
Python is an object-oriented language, meaning that everything you create or use is a “class”. Classes allow the programmer to group relevant functions and methods together. In Pandas, Series and DataFrame are classes, and each has its own attributes (e.g., .shape) and methods (e.g., .apply()). While it’s not this book’s intention to give a lesson on object-oriented programming, I want to very quickly cover classes, with the hope that this information will help you navigate the official documentation and understand why things are the way they are.
What’s nice about classes is that the programmer can define any class for their intended purpose. The following class represents a person. There are a first name (fname), a last name (lname ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access