Detail: FillValueAuto: Constructor

Overview: FillValueAuto: Constructor

FillValueAuto.__init__(b=<object object>, i=<object object>, u=<object object>, f=<object object>, c=<object object>, m=<object object>, M=<object object>, O=<object object>, S=<object object>, U=<object object>, V=<object object>)[source]
Parameters:
  • b – fill value for bool kind

  • i – fill value for integer kind

  • u – fill value for unsigned integer kind

  • f – fill value for float kind

  • c – fill value for complex kind

  • m – fill value for timedelta64 kind

  • M – fill value for datetime64 kind

  • O – fill value for object kind

  • S – fill value for bytes kind

  • U – fill value for unicode kind

  • V – fill value for void kind

>>> f = sf.Frame.from_fields(((10, 2, np.nan, 2), ('qrs ', 'XYZ', '', '123'), ('1517-01-01', '1517-04-01', 'NaT', '1517-04-01')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x')
>>> f
<Frame: x>
<Index>    a         b     c               <<U1>
<Index>
0          10.0      qrs   1517-01-01
1          2.0       XYZ   1517-04-01
2          nan             NaT
3          2.0       123   1517-04-01
<int64>    <float64> <<U4> <datetime64[D]>
>>> f.fillfalsy(sf.FillValueAuto(f=-1, U='na', M=np.datetime64('2021-01-01')))
<Frame: x>
<Index>    a         b     c               <<U1>
<Index>
0          10.0      qrs   1517-01-01
1          2.0       XYZ   1517-04-01
2          -1.0      na    2021-01-01
3          2.0       123   1517-04-01
<int64>    <float64> <<U4> <datetime64[D]>
>>> f.shift(index=2, fill_value=sf.FillValueAuto)
<Frame: x>
<Index>    a         b     c               <<U1>
<Index>
0          nan             NaT
1          nan             NaT
2          10.0      qrs   1517-01-01
3          2.0       XYZ   1517-04-01
<int64>    <float64> <<U4> <datetime64[D]>
classmethod FillValueAuto.from_default(b=False, i=0, u=0, f=nan, c=nan + nanj, m=numpy.timedelta64('NaT'), M=numpy.datetime64('NaT'), O=None, S=b'', U='', V=b'\x00')[source]

Create a FileValueAuto instance based on a default selected to prohibit type coercions.

Parameters:
  • b – fill value for bool kind

  • i – fill value for integer kind

  • u – fill value for unsigned integer kind

  • f – fill value for float kind

  • c – fill value for complex kind

  • m – fill value for timedelta64 kind

  • M – fill value for datetime64 kind

  • O – fill value for object kind

  • S – fill value for bytes kind

  • U – fill value for unicode kind

  • V – fill value for void kind

>>> sf.FillValueAuto.from_default()
<static_frame.core.fill_value_auto.FillValueAuto object at 0x7f828ced1ac0>

FillValueAuto: Constructor | Attribute | Display | Selector