woodwork.column_accessor.WoodworkColumnAccessor.loc#

property WoodworkColumnAccessor.loc#

Access a group of rows by label(s) or a boolean array.

.loc[] is primarily label based, but may also be used with a boolean array.

If the selection result is a Series, Woodwork typing information will be initialized for the returned Series.

Allowed inputs are:

A single label, e.g. 5 or 'a', (note that 5 is 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'. A boolean array of the same length as the axis being sliced, e.g. [True, False, True]. An alignable boolean Series. The index of the key will be aligned before masking. An alignable Index. The Index of the returned selection will be the input. A callable function with one argument (the calling Series or DataFrame) and that returns valid output for indexing (one of the above)