Data Science, Jupyter Notebook, Python, Deep Dives, Tips And Tricks.
Mutation happens outside the function in an explicit way: df['zeros'] = add_one_to_column(df['zeros']). By looking at the code, we can see that we're modifying the zeros column by applying the add_one_to_column function to it. If we had other transformations to the zeros column, we should keep them