Data Science, Jupyter Notebook, Python, Deep Dives, Tips And Tricks.
function: Instead of mutating the input data frame ( df), we're creating a new copy, mutating it and returning it: One caveat with this approach is that we waste too much memory because every time we apply a function to a data frame, we create a copy. Excessive data copying can quickly blow up