Detail: FrameGO: Selector

Overview: FrameGO: Selector

FrameGO.bloc[key]
bloc
>>> f = sf.FrameGO.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
<FrameGO: x>
<IndexGO>    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>
FrameGO.drop[key]
drop
InterfaceSelectTrio.__getitem__(key)[source]

Label-based selection.

>>> f = sf.FrameGO.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
<FrameGO: x>
<IndexGO>    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']
<FrameGO: x>
<IndexGO>    a       b       <<U1>
<Index>
p            10      8
q            -2      -3
r            0       8
s            0       0
<<U1>        <int64> <int64>
>>> f.drop['b':]
<FrameGO: x>
<IndexGO>    a       <<U1>
<Index>
p            10
q            -2
r            0
s            0
<<U1>        <int64>
>>> f.drop[['a', 'c']]
<FrameGO: x>
<IndexGO>    b       <<U1>
<Index>
p            8
q            -3
r            8
s            0
<<U1>        <int64>
FrameGO.drop.iloc[key]
FrameGO.drop
InterfaceSelectTrio.iloc

Integer-position based selection.

>>> f = sf.FrameGO.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
<FrameGO: x>
<IndexGO>    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]
<FrameGO: x>
<IndexGO>    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:]
<FrameGO: x>
<IndexGO>    a       b       c       <<U1>
<Index>
p            10      8       1
<<U1>        <int64> <int64> <int64>
>>> f.drop.iloc[[0, 2]]
<FrameGO: x>
<IndexGO>    a       b       c       <<U1>
<Index>
q            -2      -3      0
s            0       0       12
<<U1>        <int64> <int64> <int64>
FrameGO.drop.loc[key]
FrameGO.drop
InterfaceSelectTrio.loc

Label-based selection.

>>> f = sf.FrameGO.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
<FrameGO: x>
<IndexGO>    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']
<FrameGO: x>
<IndexGO>    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':]
<FrameGO: x>
<IndexGO>    a       b       c       <<U1>
<Index>
p            10      8       1
q            -2      -3      0
<<U1>        <int64> <int64> <int64>
>>> f.drop.loc[['p', 's']]
<FrameGO: x>
<IndexGO>    a       b       c       <<U1>
<Index>
q            -2      -3      0
r            0       8       9
<<U1>        <int64> <int64> <int64>
FrameGO.mask[key]
mask
InterfaceSelectTrio.__getitem__(key)[source]

Label-based selection.

>>> f = sf.FrameGO.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
<FrameGO: x>
<IndexGO>    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']
<FrameGO>
<IndexGO> 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':]
<FrameGO>
<IndexGO> 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']]
<FrameGO>
<IndexGO> 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>
FrameGO.mask.iloc[key]
FrameGO.mask
InterfaceSelectTrio.iloc

Integer-position based selection.

>>> f = sf.FrameGO.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
<FrameGO: x>
<IndexGO>    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]
<FrameGO>
<IndexGO> 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:]
<FrameGO>
<IndexGO> 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]]
<FrameGO>
<IndexGO> 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>
FrameGO.mask.loc[key]
FrameGO.mask
InterfaceSelectTrio.loc

Label-based selection.

>>> f = sf.FrameGO.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
<FrameGO: x>
<IndexGO>    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']
<FrameGO>
<IndexGO> 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':]
<FrameGO>
<IndexGO> 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']]
<FrameGO>
<IndexGO> 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>
FrameGO.masked_array[key]
masked_array
InterfaceSelectTrio.__getitem__(key)[source]

Label-based selection.

>>> f = sf.FrameGO.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
<FrameGO: x>
<IndexGO>    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 --]]
FrameGO.masked_array.iloc[key]
FrameGO.masked_array
InterfaceSelectTrio.iloc

Integer-position based selection.

>>> f = sf.FrameGO.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
<FrameGO: x>
<IndexGO>    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]]
FrameGO.masked_array.loc[key]
FrameGO.masked_array
InterfaceSelectTrio.loc

Label-based selection.

>>> f = sf.FrameGO.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
<FrameGO: x>
<IndexGO>    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]
 [-- -- --]]
FrameGO[key]()
FrameGO.__getitem__ = <function Frame.__getitem__>
>>> f = sf.FrameGO.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
<FrameGO: x>
<IndexGO>    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':]
<FrameGO: x>
<IndexGO>    b       c       <<U1>
<Index>
p            8       1
q            -3      0
r            8       9
s            0       12
<<U1>        <int64> <int64>
>>> f[['a', 'c']]
<FrameGO: x>
<IndexGO>    a       c       <<U1>
<Index>
p            10      1
q            -2      0
r            0       9
s            0       12
<<U1>        <int64> <int64>
FrameGO.iloc[key]
iloc
>>> f = sf.FrameGO.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
<FrameGO: x>
<IndexGO>    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:]
<FrameGO: x>
<IndexGO>    a       b       c       <<U1>
<Index>
r            0       8       9
s            0       0       12
<<U1>        <int64> <int64> <int64>
>>> f.iloc[[0, 3]]
<FrameGO: x>
<IndexGO>    a       b       c       <<U1>
<Index>
p            10      8       1
s            0       0       12
<<U1>        <int64> <int64> <int64>
FrameGO.loc[key]
loc
>>> f = sf.FrameGO.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
<FrameGO: x>
<IndexGO>    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':]
<FrameGO: x>
<IndexGO>    a       b       c       <<U1>
<Index>
r            0       8       9
s            0       0       12
<<U1>        <int64> <int64> <int64>
>>> f.loc[['p', 's']]
<FrameGO: x>
<IndexGO>    a       b       c       <<U1>
<Index>
p            10      8       1
s            0       0       12
<<U1>        <int64> <int64> <int64>

FrameGO: 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 | Accessor Reduce