pandas.Series.loc¶
- 
Series.loc¶
- Purely label-location based indexer for selection by label. - .loc[]is primarily label based, but may also be used with a boolean array.- Allowed inputs are: - A single label, e.g. 5or'a', (note that5is interpreted as a label of the index, and never as an integer position along the index).
- A list or array of labels, e.g. ['a', 'b', 'c'].
- A slice object with labels, e.g. 'a':'f'(note that contrary to usual python slices, both the start and the stop are included!).
- A boolean array.
- A callablefunction with one argument (the calling Series, DataFrame or Panel) and that returns valid output for indexing (one of the above)
 - .locwill raise a- KeyErrorwhen the items are not found.- See more at Selection by Label 
- A single label, e.g.