Detail: Series: Selector

Overview: Series: Selector

Series.drop[key]
drop

Interface for dropping elements from static_frame.Series. This alway returns a Series.

InterfaceSelectTrio.__getitem__(key)[source]

Label-based selection.

>>> s = sf.Series((2, 8, 19, 34, 54), index=('a', 'b', 'c', 'd', 'e'))
>>> s
<Series>
<Index>
a        2
b        8
c        19
d        34
e        54
<<U1>    <int64>
>>> s.drop['c']
<Series>
<Index>
a        2
b        8
d        34
e        54
<<U1>    <int64>
>>> s.drop['c':]
<Series>
<Index>
a        2
b        8
<<U1>    <int64>
>>> s.drop[['a', 'd']]
<Series>
<Index>
b        8
c        19
e        54
<<U1>    <int64>
Series.drop.iloc[key]
Series.drop

Interface for dropping elements from static_frame.Series. This alway returns a Series.

InterfaceSelectTrio.iloc

Integer-position based selection.

>>> s = sf.Series((2, 8, 19, 34, 54), index=('a', 'b', 'c', 'd', 'e'))
>>> s
<Series>
<Index>
a        2
b        8
c        19
d        34
e        54
<<U1>    <int64>
>>> s.drop.iloc[2]
<Series>
<Index>
a        2
b        8
d        34
e        54
<<U1>    <int64>
>>> s.drop.iloc[2:]
<Series>
<Index>
a        2
b        8
<<U1>    <int64>
>>> s.drop.iloc[[0, 4]]
<Series>
<Index>
b        8
c        19
d        34
<<U1>    <int64>
Series.drop.loc[key]
Series.drop

Interface for dropping elements from static_frame.Series. This alway returns a Series.

InterfaceSelectTrio.loc

Label-based selection.

>>> s = sf.Series((2, 8, 19, 34, 54), index=('a', 'b', 'c', 'd', 'e'))
>>> s
<Series>
<Index>
a        2
b        8
c        19
d        34
e        54
<<U1>    <int64>
>>> s.drop.loc['c']
<Series>
<Index>
a        2
b        8
d        34
e        54
<<U1>    <int64>
>>> s.drop.loc['c':]
<Series>
<Index>
a        2
b        8
<<U1>    <int64>
>>> s.drop.loc[['a', 'd']]
<Series>
<Index>
b        8
c        19
e        54
<<U1>    <int64>
Series.mask[key]
mask

Interface for extracting Boolean static_frame.Series.

InterfaceSelectTrio.__getitem__(key)[source]

Label-based selection.

>>> s = sf.Series((2, 8, 19, 34, 54), index=('a', 'b', 'c', 'd', 'e'))
>>> s
<Series>
<Index>
a        2
b        8
c        19
d        34
e        54
<<U1>    <int64>
>>> s.mask['c']
<Series>
<Index>
a        False
b        False
c        True
d        False
e        False
<<U1>    <bool>
>>> s.mask['c':]
<Series>
<Index>
a        False
b        False
c        True
d        True
e        True
<<U1>    <bool>
>>> s.mask[['a', 'd']]
<Series>
<Index>
a        True
b        False
c        False
d        True
e        False
<<U1>    <bool>
Series.mask.iloc[key]
Series.mask

Interface for extracting Boolean static_frame.Series.

InterfaceSelectTrio.iloc

Integer-position based selection.

>>> s = sf.Series((2, 8, 19, 34, 54), index=('a', 'b', 'c', 'd', 'e'))
>>> s
<Series>
<Index>
a        2
b        8
c        19
d        34
e        54
<<U1>    <int64>
>>> s.mask.iloc[2]
<Series>
<Index>
a        False
b        False
c        True
d        False
e        False
<<U1>    <bool>
>>> s.mask.iloc[2:]
<Series>
<Index>
a        False
b        False
c        True
d        True
e        True
<<U1>    <bool>
>>> s.mask.iloc[[0, 4]]
<Series>
<Index>
a        True
b        False
c        False
d        False
e        True
<<U1>    <bool>
Series.mask.loc[key]
Series.mask

Interface for extracting Boolean static_frame.Series.

InterfaceSelectTrio.loc

Label-based selection.

>>> s = sf.Series((2, 8, 19, 34, 54), index=('a', 'b', 'c', 'd', 'e'))
>>> s
<Series>
<Index>
a        2
b        8
c        19
d        34
e        54
<<U1>    <int64>
>>> s.mask.loc['c']
<Series>
<Index>
a        False
b        False
c        True
d        False
e        False
<<U1>    <bool>
>>> s.mask.loc['c':]
<Series>
<Index>
a        False
b        False
c        True
d        True
e        True
<<U1>    <bool>
>>> s.mask.loc[['a', 'd']]
<Series>
<Index>
a        True
b        False
c        False
d        True
e        False
<<U1>    <bool>
Series.masked_array[key]
masked_array

Interface for extracting NumPy Masked Arrays.

InterfaceSelectTrio.__getitem__(key)[source]

Label-based selection.

>>> s = sf.Series((2, 8, 19, 34, 54), index=('a', 'b', 'c', 'd', 'e'))
>>> s
<Series>
<Index>
a        2
b        8
c        19
d        34
e        54
<<U1>    <int64>
>>> s.masked_array['c']
[2 8 -- 34 54]
>>> s.masked_array['c':]
[2 8 -- -- --]
>>> s.masked_array[['a', 'd']]
[-- 8 19 -- 54]
Series.masked_array.iloc[key]
Series.masked_array

Interface for extracting NumPy Masked Arrays.

InterfaceSelectTrio.iloc

Integer-position based selection.

>>> s = sf.Series((2, 8, 19, 34, 54), index=('a', 'b', 'c', 'd', 'e'))
>>> s
<Series>
<Index>
a        2
b        8
c        19
d        34
e        54
<<U1>    <int64>
>>> s.masked_array.iloc[2]
[2 8 -- 34 54]
>>> s.masked_array.iloc[2:]
[2 8 -- -- --]
>>> s.masked_array.iloc[[0, 4]]
[-- 8 19 34 --]
Series.masked_array.loc[key]
Series.masked_array

Interface for extracting NumPy Masked Arrays.

InterfaceSelectTrio.loc

Label-based selection.

>>> s = sf.Series((2, 8, 19, 34, 54), index=('a', 'b', 'c', 'd', 'e'))
>>> s
<Series>
<Index>
a        2
b        8
c        19
d        34
e        54
<<U1>    <int64>
>>> s.masked_array.loc['c']
[2 8 -- 34 54]
>>> s.masked_array.loc['c':]
[2 8 -- -- --]
>>> s.masked_array.loc[['a', 'd']]
[-- 8 19 -- 54]
Series[key]()
Series.__getitem__ = <function Series.__getitem__>[source]
>>> s = sf.Series((2, 8, 19, 34, 54), index=('a', 'b', 'c', 'd', 'e'))
>>> s
<Series>
<Index>
a        2
b        8
c        19
d        34
e        54
<<U1>    <int64>
>>> s['c']
19
>>> s['c':]
<Series>
<Index>
c        19
d        34
e        54
<<U1>    <int64>
>>> s[['a', 'd']]
<Series>
<Index>
a        2
d        34
<<U1>    <int64>
Series.iloc[key]
iloc

Interface for position-based selection.

>>> s = sf.Series((2, 8, 19, 34, 54), index=('a', 'b', 'c', 'd', 'e'))
>>> s
<Series>
<Index>
a        2
b        8
c        19
d        34
e        54
<<U1>    <int64>
>>> s.iloc[2]
19
>>> s.iloc[2:]
<Series>
<Index>
c        19
d        34
e        54
<<U1>    <int64>
>>> s.iloc[[0, 4]]
<Series>
<Index>
a        2
e        54
<<U1>    <int64>
Series.loc[key]
loc

Interface for label-based selection.

>>> s = sf.Series((2, 8, 19, 34, 54), index=('a', 'b', 'c', 'd', 'e'))
>>> s
<Series>
<Index>
a        2
b        8
c        19
d        34
e        54
<<U1>    <int64>
>>> s.loc['c']
19
>>> s.loc['c':]
<Series>
<Index>
c        19
d        34
e        54
<<U1>    <int64>
>>> s.loc[['a', 'd']]
<Series>
<Index>
a        2
d        34
<<U1>    <int64>

Series: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Values | Accessor Datetime | Accessor String | Accessor Fill Value | Accessor Regular Expression | Accessor Hashlib | Accessor Type Clinic