So in Pandas we can do str operations on a string column like
str_lower = df["str_col"].str.lower()
I wonder, how is the str.lower() implemented in a class (note it is not about the specific implementation of str.lower() but more how such a thing would be implemented in python generally)?
The only thing I can think of, Is a method of a sub-class defined in the class e.g
class DataFrame():
class str():
def lower(self):
return [p.lower() for p in self.column]
but I doubt it's correct
__getattr__as well. Of course, I have no idea if that's what Pandas actually does