Hello, I want to perform the same data preprocessing code with pandas to different subsets of dataframe. Is there any way to write the code more efficiently without repeating same code for 6 subsets?
Thank you!
Hello, I want to perform the same data preprocessing code with pandas to different subsets of dataframe. Is there any way to write the code more efficiently without repeating same code for 6 subsets?
Thank you!
Put the code in a function and then call it for each subset?