
Nov. 29, 2021
3:35 p.m.
On Mon, Nov 29, 2021 at 08:44:00AM -0500, David Mertz, Ph.D. wrote:
On Mon, Nov 29, 2021 at 5:15 AM Steven D'Aprano <steve@pearwood.info> wrote:
- the method modifies the object in place, and returns self; - versus the method returns a new, modified, copy of the object. Pandas uses the first style (I think; corrections welcome). Strings use the second, because they have no choice.
Pandas returns SOMETHING when a method is called. Maybe it's self, maybe it's after mutation, maybe it's a new DataFrame, Grouper, Series, etc.
Okay, thanks for the correction. -- Steve