Detail: Frame: Accessor Fill ValueΒΆ

Overview: Frame: Accessor Fill Value

Frame.via_fill_value(fill_value).loc
Frame.via_fill_value = <function Frame.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.

>>> f = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f.via_fill_value(-1).loc[['a', 'b', 'd']]
<Frame: y>
<Index>    x       y       <<U1>
<Index>
a          3       2
b          0       0
d          -1      -1
<<U1>      <int64> <int64>
Frame.via_fill_value(fill_value).__getitem__(key)
via_fill_value = <function Frame.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.

>>> f = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f.via_fill_value(-1)[['z', 'x']]
<Frame: y>
<Index>    z       x       <<U1>
<Index>
a          -1      3
b          -1      0
c          -1      20
<<U1>      <int64> <int64>
Frame.via_fill_value(fill_value).via_T
Frame.via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.via_T

Interface for using binary operators with one-dimensional sequences, where the opperand is applied column-wise.

>>> f = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> s = sf.Series((2, 8, 19), index=('b', 'c', 'd'))
>>> f.via_fill_value(-1).via_T * s
<Frame>
<Index> x       y       <<U1>
<Index>
a       -3      -2
b       0       0
c       160     96
d       -19     -19
<<U1>   <int64> <int64>
Frame.via_fill_value(fill_value).__add__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__add__(other)[source]
>>> f1 = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f1.via_fill_value(0) + f2
<Frame>
<Index> x       y       <<U1>
<Index>
a       3       2
b       2       3
c       24      26
<<U1>   <int64> <int64>
Frame.via_fill_value(fill_value).__sub__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__sub__(other)[source]
>>> f1 = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f1.via_fill_value(0) - f2
<Frame>
<Index> x       y       <<U1>
<Index>
a       3       2
b       -2      -3
c       16      -2
<<U1>   <int64> <int64>
Frame.via_fill_value(fill_value).__mul__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__mul__(other)[source]
>>> f1 = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f1.via_fill_value(0) * f2
<Frame>
<Index> x       y       <<U1>
<Index>
a       0       0
b       0       0
c       80      168
<<U1>   <int64> <int64>
Frame.via_fill_value(fill_value).__truediv__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__truediv__(other)[source]
>>> f1 = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f1.via_fill_value(0) / f2
<Frame>
<Index> x         y                  <<U1>
<Index>
a       inf       inf
b       0.0       0.0
c       5.0       0.8571428571428571
<<U1>   <float64> <float64>
Frame.via_fill_value(fill_value).__floordiv__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__floordiv__(other)[source]
>>> f1 = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f1.via_fill_value(0) // f2
<Frame>
<Index> x       y       <<U1>
<Index>
a       0       0
b       0       0
c       5       0
<<U1>   <int64> <int64>
Frame.via_fill_value(fill_value).__mod__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__mod__(other)[source]
>>> f1 = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f1.via_fill_value(0) % f2
<Frame>
<Index> x       y       <<U1>
<Index>
a       0       0
b       0       0
c       0       12
<<U1>   <int64> <int64>
Frame.via_fill_value(fill_value).__pow__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__pow__(other)[source]
>>> f1 = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f1.via_fill_value(0) ** f2
<Frame>
<Index> x       y                <<U1>
<Index>
a       1       1
b       0       0
c       160000  1283918464548864
<<U1>   <int64> <int64>
Frame.via_fill_value(fill_value).__lshift__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__lshift__(other)[source]
>>> f1 = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f1.via_fill_value(0) << f2
<Frame>
<Index> x       y       <<U1>
<Index>
a       3       2
b       0       0
c       40      24
<<U1>   <int64> <int64>
Frame.via_fill_value(fill_value).__rshift__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__rshift__(other)[source]
>>> f1 = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((0, 1), (2, 1)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f1.via_fill_value(0) >> f2
<Frame>
<Index> x       y       <<U1>
<Index>
a       3       2
b       0       0
c       10      6
<<U1>   <int64> <int64>
Frame.via_fill_value(fill_value).__and__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__and__(other)[source]
>>> f1 = sf.Frame.from_fields(((False, True, True), (True, False, True)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((False, True), (True, True)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f1.via_fill_value(False) & f2
<Frame>
<Index> x      y      <<U1>
<Index>
a       False  False
b       False  False
c       True   True
<<U1>   <bool> <bool>
Frame.via_fill_value(fill_value).__xor__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__xor__(other)[source]
>>> f1 = sf.Frame.from_fields(((False, True, True), (True, False, True)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((False, True), (True, True)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f1.via_fill_value(False) ^ f2
<Frame>
<Index> x      y      <<U1>
<Index>
a       False  True
b       True   True
c       False  False
<<U1>   <bool> <bool>
Frame.via_fill_value(fill_value).__or__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__or__(other)[source]
>>> f1 = sf.Frame.from_fields(((False, True, True), (True, False, True)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((False, True), (True, True)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f1.via_fill_value(False) | f2
<Frame>
<Index> x      y      <<U1>
<Index>
a       False  True
b       True   True
c       True   True
<<U1>   <bool> <bool>
Frame.via_fill_value(fill_value).__lt__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__lt__(other)[source]

Return self<value.

>>> f1 = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f1.via_fill_value(0) < f2
<Frame>
<Index> x      y      <<U1>
<Index>
a       False  False
b       True   True
c       False  True
<<U1>   <bool> <bool>
Frame.via_fill_value(fill_value).__le__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__le__(other)[source]

Return self<=value.

>>> f1 = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f1.via_fill_value(0) <= f2
<Frame>
<Index> x      y      <<U1>
<Index>
a       False  False
b       True   True
c       False  True
<<U1>   <bool> <bool>
Frame.via_fill_value(fill_value).__eq__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__eq__(other)[source]

Return self==value.

>>> f1 = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f1.via_fill_value(0) == f2
<Frame>
<Index> x      y      <<U1>
<Index>
a       False  False
b       False  False
c       False  False
<<U1>   <bool> <bool>
Frame.via_fill_value(fill_value).__ne__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__ne__(other)[source]

Return self!=value.

>>> f1 = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f1.via_fill_value(0) != f2
<Frame>
<Index> x      y      <<U1>
<Index>
a       True   True
b       True   True
c       True   True
<<U1>   <bool> <bool>
Frame.via_fill_value(fill_value).__gt__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__gt__(other)[source]

Return self>value.

>>> f1 = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f1.via_fill_value(0) > f2
<Frame>
<Index> x      y      <<U1>
<Index>
a       True   True
b       False  False
c       True   False
<<U1>   <bool> <bool>
Frame.via_fill_value(fill_value).__ge__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__ge__(other)[source]

Return self>=value.

>>> f1 = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f1.via_fill_value(0) >= f2
<Frame>
<Index> x      y      <<U1>
<Index>
a       True   True
b       False  False
c       True   False
<<U1>   <bool> <bool>
Frame.via_fill_value(fill_value).__radd__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__radd__(other)[source]
>>> f1 = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f2 + f1.via_fill_value(0)
RuntimeError('via_fill_value interfaces can only be used on the left-hand side of binary expressions.')
Frame.via_fill_value(fill_value).__rsub__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__rsub__(other)[source]
>>> f1 = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f2 - f1.via_fill_value(0)
RuntimeError('via_fill_value interfaces can only be used on the left-hand side of binary expressions.')
Frame.via_fill_value(fill_value).__rmul__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__rmul__(other)[source]
>>> f1 = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f2 * f1.via_fill_value(0)
RuntimeError('via_fill_value interfaces can only be used on the left-hand side of binary expressions.')
Frame.via_fill_value(fill_value).__rtruediv__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__rtruediv__(other)[source]
>>> f1 = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f2 / f1.via_fill_value(0)
RuntimeError('via_fill_value interfaces can only be used on the left-hand side of binary expressions.')
Frame.via_fill_value(fill_value).__rfloordiv__(other)
via_fill_value = <function Frame.via_fill_value>[source]
InterfaceFillValue.__rfloordiv__(other)[source]
>>> f1 = sf.Frame.from_fields(((3, 0, 20), (2, 0, 12)), index=('a', 'b', 'c'), columns=('x', 'y'), name='y')
>>> f2 = sf.Frame.from_fields(((2, 4), (3, 14)), index=('b', 'c'), columns=('x', 'y'), name='y')
>>> f2 // f1.via_fill_value(0)
RuntimeError('via_fill_value interfaces can only be used on the left-hand side of binary expressions.')

Frame: 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