Different behavior of apply function depending on number of columns in data frame
https://github.com/pandas-dev/pandas/blob/a00154dcfe5057cb3fd86653172e74b6893e337d/pandas/core/frame.py#L4774-L4879

I have the following data frame:

d = pd.DataFrame([
    [1,2],
    [2,3],
    [5,6],
    [6,7],
    [8,9]
], columns = ["a", "b"])

I want to apply the following lambda function in order to get Series of lists:
d.apply(lambda x: [x["a"], x["b"]], axis=1)

But it returns DataFrame with two columns:
    a  b
0  1  2
1  2  3
2  5  6
3  6  7
4  8  9

But if i add one more column:
d_tmp = d.copy()
d_tmp["tmp"] = 1

d_tmp.apply(lambda x: [x["a"], x["b"]], axis=1)

It returns Series of lists:
0    [1, 2]
1    [2, 3]
2    [5, 6]
3    [6, 7]
4    [8, 9]
dtype: object
