Passing a scalar value, a list of scalars, or a slice object to the .iloc or .loc indexers causes pandas to scan the index labels for the appropriate rows and return them. If a single scalar value is passed, a Series is returned. If a list or slice object is passed, then a DataFrame is returned.