In Pandas, when I select a label that only has one entry in the index I get back a Series, but when I select an entry that has more then one entry I get back a data frame.
Why is that? Is there a way to ensure I always get back a data frame?
In : import pandas as pd
In : df = pd.DataFrame(data=range(5), index=[1, 2, 3, 3, 3])
In : type….