From this code you can easily and efficiently update your images paths in yur csv and by following this code of line you can easily make updates in your dataframe
with Reszing images code you can easily take pictures from the disk resize the images and save it on disk no need to load all the images in moemory