Detail: Batch: Accessor Fill Value
Overview: Batch: Accessor Fill Value
- Batch.via_fill_value(fill_value).loc
- Batch.via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.loc
Label-based selection where labels not specified will define a new container containing those labels filled with the fill value.
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> bt.via_fill_value(-1).loc[['a', 'b', 'd']].to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i a -1 -1 i b 2 3 i d -1 -1 j a -1 -1 j b 0 2 j d -1 -1 <<U1> <<U1> <int64> <int64>
- Batch.via_fill_value(fill_value).__getitem__(key)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__getitem__(key)[source]
Label-based selection where labels not specified will define a new container containing those labels filled with the fill value.
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> bt.via_fill_value(-1)[['z', 'x']].to_frame() <Frame> <Index> z x <<U1> <IndexHierarchy> i b -1 2 i c -1 4 j b -1 0 j c -1 1 <<U1> <<U1> <int64> <int64>
- Batch.via_fill_value(fill_value).via_T
- Batch.via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.via_T
Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> s = sf.Series((2, 8, 19), index=('b', 'c', 'd')) >>> (bt.via_fill_value(-1).via_T * s).to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i b 4 6 i c 32 112 i d -19 -19 j b 0 4 j c 8 8 j d -19 -19 <<U1> <<U1> <int64> <int64>
- Batch.via_fill_value(fill_value).__add__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__add__(other)[source]
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> f = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y') >>> (bt.via_fill_value(0) + f).to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i a 3 2 i b 2 3 i c 24 26 j a 3 2 j b 0 2 j c 21 13 <<U1> <<U1> <int64> <int64>
- Batch.via_fill_value(fill_value).__sub__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__sub__(other)[source]
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> f = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y') >>> (bt.via_fill_value(0) - f).to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i a -3 -2 i b 2 3 i c -16 2 j a -3 -2 j b 0 2 j c -19 -11 <<U1> <<U1> <int64> <int64>
- Batch.via_fill_value(fill_value).__mul__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__mul__(other)[source]
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> f = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y') >>> (bt.via_fill_value(0) * f).to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i a 0 0 i b 0 0 i c 80 168 j a 0 0 j b 0 0 j c 20 12 <<U1> <<U1> <int64> <int64>
- Batch.via_fill_value(fill_value).__truediv__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__truediv__(other)[source]
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> f = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y') >>> (bt.via_fill_value(0) / f).to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i a 0.0 0.0 i b inf inf i c 0.2 1.1666666666666667 j a 0.0 0.0 j b nan inf j c 0.05 0.08333333333333333 <<U1> <<U1> <float64> <float64>
- Batch.via_fill_value(fill_value).__floordiv__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__floordiv__(other)[source]
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> f = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y') >>> (bt.via_fill_value(0) // f).to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i a 0 0 i b 0 0 i c 0 1 j a 0 0 j b 0 0 j c 0 0 <<U1> <<U1> <int64> <int64>
- Batch.via_fill_value(fill_value).__mod__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__mod__(other)[source]
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> f = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y') >>> (bt.via_fill_value(0) % f).to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i a 0 0 i b 0 0 i c 4 2 j a 0 0 j b 0 0 j c 1 1 <<U1> <<U1> <int64> <int64>
- Batch.via_fill_value(fill_value).__pow__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__pow__(other)[source]
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> f = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y') >>> (bt.via_fill_value(0) ** f).to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i a 0 0 i b 1 1 i c 1099511627776 56693912375296 j a 0 0 j b 1 1 j c 1 1 <<U1> <<U1> <int64> <int64>
- Batch.via_fill_value(fill_value).__lshift__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__lshift__(other)[source]
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> f = sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y') >>> (bt.via_fill_value(0) << f).to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i b 2 12 i c 8 28 j b 0 8 j c 2 2 <<U1> <<U1> <int64> <int64>
- Batch.via_fill_value(fill_value).__rshift__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__rshift__(other)[source]
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> f = sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y') >>> (bt.via_fill_value(0) >> f).to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i b 2 0 i c 2 7 j b 0 0 j c 0 0 <<U1> <<U1> <int64> <int64>
- Batch.via_fill_value(fill_value).__and__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__and__(other)[source]
>>> 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')))) >>> f = sf.Frame.from_fields(((False, True, True), (True, True, False)), columns=('a', 'b'), index=('p', 'q', 'r'), name='x') >>> (bt.via_fill_value(False) & f).to_frame() <Frame> <Index> a b c d <<U1> <IndexHierarchy> i p False False False False i q False False False False i r False False False False j p False False False False j q False False False False j r False False False False <<U1> <<U1> <bool> <bool> <bool> <bool>
- Batch.via_fill_value(fill_value).__xor__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__xor__(other)[source]
>>> 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')))) >>> f = sf.Frame.from_fields(((False, True, True), (True, True, False)), columns=('a', 'b'), index=('p', 'q', 'r'), name='x') >>> (bt.via_fill_value(False) ^ f).to_frame() <Frame> <Index> a b c d <<U1> <IndexHierarchy> i p False True False True i q True True False True i r True False False True j p False True False True j q True True True False j r True False True True <<U1> <<U1> <bool> <bool> <bool> <bool>
- Batch.via_fill_value(fill_value).__or__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__or__(other)[source]
Return self|value.
>>> 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')))) >>> f = sf.Frame.from_fields(((False, True, True), (True, True, False)), columns=('a', 'b'), index=('p', 'q', 'r'), name='x') >>> (bt.via_fill_value(False) | f).to_frame() <Frame> <Index> a b c d <<U1> <IndexHierarchy> i p False True False True i q True True False True i r True False False True j p False True False True j q True True True False j r True False True True <<U1> <<U1> <bool> <bool> <bool> <bool>
- Batch.via_fill_value(fill_value).__lt__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__lt__(other)[source]
Return self<value.
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> f = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y') >>> (bt.via_fill_value(0) < f).to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i a True True i b False False i c True False j a True True j b False False j c True True <<U1> <<U1> <bool> <bool>
- Batch.via_fill_value(fill_value).__le__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__le__(other)[source]
Return self<=value.
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> f = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y') >>> (bt.via_fill_value(0) <= f).to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i a True True i b False False i c True False j a True True j b True False j c True True <<U1> <<U1> <bool> <bool>
- Batch.via_fill_value(fill_value).__eq__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__eq__(other)[source]
Return self==value.
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> f = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y') >>> (bt.via_fill_value(0) == f).to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i a False False i b False False i c False False j a False False j b True False j c False False <<U1> <<U1> <bool> <bool>
- Batch.via_fill_value(fill_value).__ne__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__ne__(other)[source]
Return self!=value.
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> f = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y') >>> (bt.via_fill_value(0) != f).to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i a True True i b True True i c True True j a True True j b False True j c True True <<U1> <<U1> <bool> <bool>
- Batch.via_fill_value(fill_value).__gt__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__gt__(other)[source]
Return self>value.
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> f = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y') >>> (bt.via_fill_value(0) > f).to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i a False False i b True True i c False True j a False False j b False True j c False False <<U1> <<U1> <bool> <bool>
- Batch.via_fill_value(fill_value).__ge__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__ge__(other)[source]
Return self>=value.
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> f = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y') >>> (bt.via_fill_value(0) >= f).to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i a False False i b True True i c False True j a False False j b True True j c False False <<U1> <<U1> <bool> <bool>
- Batch.via_fill_value(fill_value).__radd__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__radd__(other)[source]
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> f = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y') >>> (f + bt.via_fill_value(0)).to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i a 3 2 i b 2 3 i c 24 26 j a 3 2 j b 0 2 j c 21 13 <<U1> <<U1> <int64> <int64>
- Batch.via_fill_value(fill_value).__rsub__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__rsub__(other)[source]
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> f = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y') >>> (f - bt.via_fill_value(0)).to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i a 3 2 i b -2 -3 i c 16 -2 j a 3 2 j b 0 -2 j c 19 11 <<U1> <<U1> <int64> <int64>
- Batch.via_fill_value(fill_value).__rmul__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__rmul__(other)[source]
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> f = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y') >>> (f * bt.via_fill_value(0)).to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i a 0 0 i b 0 0 i c 80 168 j a 0 0 j b 0 0 j c 20 12 <<U1> <<U1> <int64> <int64>
- Batch.via_fill_value(fill_value).__rtruediv__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__rtruediv__(other)[source]
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> f = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y') >>> (f / bt.via_fill_value(0)).to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i a inf inf i b 0.0 0.0 i c 5.0 0.8571428571428571 j a inf inf j b nan 0.0 j c 20.0 12.0 <<U1> <<U1> <float64> <float64>
- Batch.via_fill_value(fill_value).__rfloordiv__(other)
- via_fill_value = <function Batch.via_fill_value>[source]
- InterfaceFillValue.__rfloordiv__(other)[source]
>>> bt = sf.Batch((('i', sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')), ('j', sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')))) >>> f = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y') >>> (f // bt.via_fill_value(0)).to_frame() <Frame> <Index> x y <<U1> <IndexHierarchy> i a 0 0 i b 0 0 i c 5 0 j a 0 0 j b 0 0 j c 20 12 <<U1> <<U1> <int64> <int64>
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 | Accessor Reduce