You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the classes have a weird combination of modifying attributes of the object in-place and methods that don't modifying attributes but return the results, of which other methods use to modify attributes.
This inconsistency is tied around thinking about object immutability. Some objects work nicely as immutable, i.e. their methods always return a new modified object. But mutable objects let you modify the object in place.
pandas data frames are not immutable, you can change the underyling data, but it seems like most of their methods return a new data frame as opposed to modifying it in place. So it is a combination. I'm really not sure what the best OO design paradigm is for this stuff.
The text was updated successfully, but these errors were encountered:
Right now the classes have a weird combination of modifying attributes of the object in-place and methods that don't modifying attributes but return the results, of which other methods use to modify attributes.
This inconsistency is tied around thinking about object immutability. Some objects work nicely as immutable, i.e. their methods always return a new modified object. But mutable objects let you modify the object in place.
pandas data frames are not immutable, you can change the underyling data, but it seems like most of their methods return a new data frame as opposed to modifying it in place. So it is a combination. I'm really not sure what the best OO design paradigm is for this stuff.
The text was updated successfully, but these errors were encountered: