Detail: FrameHE: Selector

Overview: FrameHE: Selector

FrameHE.bloc[key]
bloc
>>> f = sf.FrameHE.from_fields(((10, -2, 0, 0), (8, -3, 8, 0), (1, 0, 9, 12)), index=('p', 'q', 'r', 's'), columns=('a', 'b', 'c'), name='x')
>>> f
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
p            10      8       1
q            -2      -3      0
r            0       8       9
s            0       0       12
<<U1>        <int64> <int64> <int64>
>>> f.bloc[f > 5]
<Series>
<Index>
('p', 'a') 10
('p', 'b') 8
('r', 'b') 8
('r', 'c') 9
('s', 'c') 12
<object>   <int64>
FrameHE.drop[key]
drop
InterfaceSelectTrio.__getitem__(key)[source]

Label-based selection.

>>> f = sf.FrameHE.from_fields(((10, -2, 0, 0), (8, -3, 8, 0), (1, 0, 9, 12)), index=('p', 'q', 'r', 's'), columns=('a', 'b', 'c'), name='x')
>>> f
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
p            10      8       1
q            -2      -3      0
r            0       8       9
s            0       0       12
<<U1>        <int64> <int64> <int64>
>>> f.drop['c']
<FrameHE: x>
<Index>      a       b       <<U1>
<Index>
p            10      8
q            -2      -3
r            0       8
s            0       0
<<U1>        <int64> <int64>
>>> f.drop['b':]
<FrameHE: x>
<Index>      a       <<U1>
<Index>
p            10
q            -2
r            0
s            0
<<U1>        <int64>
>>> f.drop[['a', 'c']]
<FrameHE: x>
<Index>      b       <<U1>
<Index>
p            8
q            -3
r            8
s            0
<<U1>        <int64>
FrameHE.drop.iloc[key]
FrameHE.drop
InterfaceSelectTrio.iloc

Integer-position based selection.

>>> f = sf.FrameHE.from_fields(((10, -2, 0, 0), (8, -3, 8, 0), (1, 0, 9, 12)), index=('p', 'q', 'r', 's'), columns=('a', 'b', 'c'), name='x')
>>> f
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
p            10      8       1
q            -2      -3      0
r            0       8       9
s            0       0       12
<<U1>        <int64> <int64> <int64>
>>> f.drop.iloc[1]
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
p            10      8       1
r            0       8       9
s            0       0       12
<<U1>        <int64> <int64> <int64>
>>> f.drop.iloc[1:]
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
p            10      8       1
<<U1>        <int64> <int64> <int64>
>>> f.drop.iloc[[0, 2]]
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
q            -2      -3      0
s            0       0       12
<<U1>        <int64> <int64> <int64>
FrameHE.drop.loc[key]
FrameHE.drop
InterfaceSelectTrio.loc

Label-based selection.

>>> f = sf.FrameHE.from_fields(((10, -2, 0, 0), (8, -3, 8, 0), (1, 0, 9, 12)), index=('p', 'q', 'r', 's'), columns=('a', 'b', 'c'), name='x')
>>> f
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
p            10      8       1
q            -2      -3      0
r            0       8       9
s            0       0       12
<<U1>        <int64> <int64> <int64>
>>> f.drop.loc['r']
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
p            10      8       1
q            -2      -3      0
s            0       0       12
<<U1>        <int64> <int64> <int64>
>>> f.drop.loc['r':]
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
p            10      8       1
q            -2      -3      0
<<U1>        <int64> <int64> <int64>
>>> f.drop.loc[['p', 's']]
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
q            -2      -3      0
r            0       8       9
<<U1>        <int64> <int64> <int64>
FrameHE.mask[key]
mask
InterfaceSelectTrio.__getitem__(key)[source]

Label-based selection.

>>> f = sf.FrameHE.from_fields(((10, -2, 0, 0), (8, -3, 8, 0), (1, 0, 9, 12)), index=('p', 'q', 'r', 's'), columns=('a', 'b', 'c'), name='x')
>>> f
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
p            10      8       1
q            -2      -3      0
r            0       8       9
s            0       0       12
<<U1>        <int64> <int64> <int64>
>>> f.mask['c']
<FrameHE>
<Index>   a      b      c      <<U1>
<Index>
p         False  False  True
q         False  False  True
r         False  False  True
s         False  False  True
<<U1>     <bool> <bool> <bool>
>>> f.mask['b':]
<FrameHE>
<Index>   a      b      c      <<U1>
<Index>
p         False  True   True
q         False  True   True
r         False  True   True
s         False  True   True
<<U1>     <bool> <bool> <bool>
>>> f.mask[['a', 'c']]
<FrameHE>
<Index>   a      b      c      <<U1>
<Index>
p         True   False  True
q         True   False  True
r         True   False  True
s         True   False  True
<<U1>     <bool> <bool> <bool>
FrameHE.mask.iloc[key]
FrameHE.mask
InterfaceSelectTrio.iloc

Integer-position based selection.

>>> f = sf.FrameHE.from_fields(((10, -2, 0, 0), (8, -3, 8, 0), (1, 0, 9, 12)), index=('p', 'q', 'r', 's'), columns=('a', 'b', 'c'), name='x')
>>> f
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
p            10      8       1
q            -2      -3      0
r            0       8       9
s            0       0       12
<<U1>        <int64> <int64> <int64>
>>> f.mask.iloc[1]
<FrameHE>
<Index>   a      b      c      <<U1>
<Index>
p         False  False  False
q         True   True   True
r         False  False  False
s         False  False  False
<<U1>     <bool> <bool> <bool>
>>> f.mask.iloc[1:]
<FrameHE>
<Index>   a      b      c      <<U1>
<Index>
p         False  False  False
q         True   True   True
r         True   True   True
s         True   True   True
<<U1>     <bool> <bool> <bool>
>>> f.mask.iloc[[0, 2]]
<FrameHE>
<Index>   a      b      c      <<U1>
<Index>
p         True   True   True
q         False  False  False
r         True   True   True
s         False  False  False
<<U1>     <bool> <bool> <bool>
FrameHE.mask.loc[key]
FrameHE.mask
InterfaceSelectTrio.loc

Label-based selection.

>>> f = sf.FrameHE.from_fields(((10, -2, 0, 0), (8, -3, 8, 0), (1, 0, 9, 12)), index=('p', 'q', 'r', 's'), columns=('a', 'b', 'c'), name='x')
>>> f
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
p            10      8       1
q            -2      -3      0
r            0       8       9
s            0       0       12
<<U1>        <int64> <int64> <int64>
>>> f.mask.loc['r']
<FrameHE>
<Index>   a      b      c      <<U1>
<Index>
p         False  False  False
q         False  False  False
r         True   True   True
s         False  False  False
<<U1>     <bool> <bool> <bool>
>>> f.mask.loc['r':]
<FrameHE>
<Index>   a      b      c      <<U1>
<Index>
p         False  False  False
q         False  False  False
r         True   True   True
s         True   True   True
<<U1>     <bool> <bool> <bool>
>>> f.mask.loc[['p', 's']]
<FrameHE>
<Index>   a      b      c      <<U1>
<Index>
p         True   True   True
q         False  False  False
r         False  False  False
s         True   True   True
<<U1>     <bool> <bool> <bool>
FrameHE.masked_array[key]
masked_array
InterfaceSelectTrio.__getitem__(key)[source]

Label-based selection.

>>> f = sf.FrameHE.from_fields(((10, -2, 0, 0), (8, -3, 8, 0), (1, 0, 9, 12)), index=('p', 'q', 'r', 's'), columns=('a', 'b', 'c'), name='x')
>>> f
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
p            10      8       1
q            -2      -3      0
r            0       8       9
s            0       0       12
<<U1>        <int64> <int64> <int64>
>>> f.masked_array['c']
[[10 8 --]
 [-2 -3 --]
 [0 8 --]
 [0 0 --]]
>>> f.masked_array['b':]
[[10 -- --]
 [-2 -- --]
 [0 -- --]
 [0 -- --]]
>>> f.masked_array[['a', 'c']]
[[-- 8 --]
 [-- -3 --]
 [-- 8 --]
 [-- 0 --]]
FrameHE.masked_array.iloc[key]
FrameHE.masked_array
InterfaceSelectTrio.iloc

Integer-position based selection.

>>> f = sf.FrameHE.from_fields(((10, -2, 0, 0), (8, -3, 8, 0), (1, 0, 9, 12)), index=('p', 'q', 'r', 's'), columns=('a', 'b', 'c'), name='x')
>>> f
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
p            10      8       1
q            -2      -3      0
r            0       8       9
s            0       0       12
<<U1>        <int64> <int64> <int64>
>>> f.masked_array.iloc[1]
[[10 8 1]
 [-- -- --]
 [0 8 9]
 [0 0 12]]
>>> f.masked_array.iloc[1:]
[[10 8 1]
 [-- -- --]
 [-- -- --]
 [-- -- --]]
>>> f.masked_array.iloc[[0, 2]]
[[-- -- --]
 [-2 -3 0]
 [-- -- --]
 [0 0 12]]
FrameHE.masked_array.loc[key]
FrameHE.masked_array
InterfaceSelectTrio.loc

Label-based selection.

>>> f = sf.FrameHE.from_fields(((10, -2, 0, 0), (8, -3, 8, 0), (1, 0, 9, 12)), index=('p', 'q', 'r', 's'), columns=('a', 'b', 'c'), name='x')
>>> f
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
p            10      8       1
q            -2      -3      0
r            0       8       9
s            0       0       12
<<U1>        <int64> <int64> <int64>
>>> f.masked_array.loc['r']
[[10 8 1]
 [-2 -3 0]
 [-- -- --]
 [0 0 12]]
>>> f.masked_array.loc['r':]
[[10 8 1]
 [-2 -3 0]
 [-- -- --]
 [-- -- --]]
>>> f.masked_array.loc[['p', 's']]
[[-- -- --]
 [-2 -3 0]
 [0 8 9]
 [-- -- --]]
FrameHE[key]()
FrameHE.__getitem__ = <function Frame.__getitem__>
>>> f = sf.FrameHE.from_fields(((10, -2, 0, 0), (8, -3, 8, 0), (1, 0, 9, 12)), index=('p', 'q', 'r', 's'), columns=('a', 'b', 'c'), name='x')
>>> f
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
p            10      8       1
q            -2      -3      0
r            0       8       9
s            0       0       12
<<U1>        <int64> <int64> <int64>
>>> f['b']
<Series: b>
<Index>
p           8
q           -3
r           8
s           0
<<U1>       <int64>
>>> f['b':]
<FrameHE: x>
<Index>      b       c       <<U1>
<Index>
p            8       1
q            -3      0
r            8       9
s            0       12
<<U1>        <int64> <int64>
>>> f[['a', 'c']]
<FrameHE: x>
<Index>      a       c       <<U1>
<Index>
p            10      1
q            -2      0
r            0       9
s            0       12
<<U1>        <int64> <int64>
FrameHE.iloc[key]
iloc
>>> f = sf.FrameHE.from_fields(((10, -2, 0, 0), (8, -3, 8, 0), (1, 0, 9, 12)), index=('p', 'q', 'r', 's'), columns=('a', 'b', 'c'), name='x')
>>> f
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
p            10      8       1
q            -2      -3      0
r            0       8       9
s            0       0       12
<<U1>        <int64> <int64> <int64>
>>> f.iloc[2]
<Series: r>
<Index>
a           0
b           8
c           9
<<U1>       <int64>
>>> f.iloc[2:]
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
r            0       8       9
s            0       0       12
<<U1>        <int64> <int64> <int64>
>>> f.iloc[[0, 3]]
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
p            10      8       1
s            0       0       12
<<U1>        <int64> <int64> <int64>
FrameHE.loc[key]
loc
>>> f = sf.FrameHE.from_fields(((10, -2, 0, 0), (8, -3, 8, 0), (1, 0, 9, 12)), index=('p', 'q', 'r', 's'), columns=('a', 'b', 'c'), name='x')
>>> f
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
p            10      8       1
q            -2      -3      0
r            0       8       9
s            0       0       12
<<U1>        <int64> <int64> <int64>
>>> f.loc['r']
<Series: r>
<Index>
a           0
b           8
c           9
<<U1>       <int64>
>>> f.loc['r':]
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
r            0       8       9
s            0       0       12
<<U1>        <int64> <int64> <int64>
>>> f.loc[['p', 's']]
<FrameHE: x>
<Index>      a       b       c       <<U1>
<Index>
p            10      8       1
s            0       0       12
<<U1>        <int64> <int64> <int64>

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