Join GitHub today
DataFrame apply results in a DataFrame when lambda returns a list of length equal to the number of DataFrame features #16353
Hello guys, I'm using the apply method with axis=1 argument and returning a list for each row. The weird thing is when the length of this list is equal to the number of features in the original dataframe, this apply returns another dataframe, and a series if anything else. I don't know if this is intended, but it was very unexpected.