Detail: Batch: Operator Unary

Overview: Batch: Operator Unary

Batch.__abs__()
>>> bt = sf.Batch((('i', sf.Frame(np.arange(40, 46).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='v')), ('j', sf.Frame(np.arange(100, 106).reshape(3,2) / 3, index=('p', 'q', 'r'), columns=('a', 'b'), name='x'))))
>>> abs(bt).to_frame()
<Frame>
<Index>                a                  b                  <<U1>
<IndexHierarchy>
i                p     40.0               41.0
i                q     42.0               43.0
i                r     44.0               45.0
j                p     33.333333333333336 33.666666666666664
j                q     34.0               34.333333333333336
j                r     34.666666666666664 35.0
<<U1>            <<U1> <float64>          <float64>
Batch.__invert__()
>>> bt = sf.Batch((('i', sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), ('j', sf.Frame((np.arange(6).reshape(3,2) % 3).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='w'))))
>>> ~bt.to_frame()
<Frame>
<Index>                c      d      <<U1>
<IndexHierarchy>
i                p     True   False
i                q     True   False
i                r     True   False
j                p     True   False
j                q     False  True
j                r     False  False
<<U1>            <<U1> <bool> <bool>
Batch.__neg__()
>>> bt = sf.Batch((('i', sf.Frame(np.arange(40, 46).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='v')), ('j', sf.Frame(np.arange(100, 106).reshape(3,2) / 3, index=('p', 'q', 'r'), columns=('a', 'b'), name='x'))))
>>> -bt.to_frame()
<Frame>
<Index>                a                   b                   <<U1>
<IndexHierarchy>
i                p     -40.0               -41.0
i                q     -42.0               -43.0
i                r     -44.0               -45.0
j                p     -33.333333333333336 -33.666666666666664
j                q     -34.0               -34.333333333333336
j                r     -34.666666666666664 -35.0
<<U1>            <<U1> <float64>           <float64>
Batch.__pos__()
>>> bt = sf.Batch((('i', sf.Frame(np.arange(40, 46).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='v')), ('j', sf.Frame(np.arange(100, 106).reshape(3,2) / 3, index=('p', 'q', 'r'), columns=('a', 'b'), name='x'))))
>>> +bt.to_frame()
<Frame>
<Index>                a                  b                  <<U1>
<IndexHierarchy>
i                p     40.0               41.0
i                q     42.0               43.0
i                r     44.0               45.0
j                p     33.333333333333336 33.666666666666664
j                q     34.0               34.333333333333336
j                r     34.666666666666664 35.0
<<U1>            <<U1> <float64>          <float64>

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