groupby().last() drops columns (original) (raw)

DataFrame.groupby().last() gives incorrect result in the following case (pandas version: 0.8.1):

df1 = DataFrame({"A": [1, 1], "B": [1, 1], "C": ["x", "y"]})
print df1.groupby("A").last()
#    B
# A   
#1  1

The integer column B is handled correctly, but the string column C is dropped.
The result is correct if column B is not present:

df2 = DataFrame({"A": [1, 1], "C": ["x", "y"]})
print df2.groupby("A").last()
#    C
# A   
#1  y