Detail: SeriesHE: Accessor ValuesΒΆ

Overview: SeriesHE: Accessor Values

SeriesHE.via_values.apply(func, *args, **kwargs)
SeriesHE.via_values

Interface for applying functions to values (as arrays) in this container.

InterfaceValues.apply(func, *args, **kwargs)[source]
>>> s = sf.SeriesHE((10, 2, 8), index=('a', 'b', 'c'))
>>> s.via_values.apply(np.sin)
<SeriesHE>
<Index>
a          -0.5440211108893698
b          0.9092974268256817
c          0.9893582466233818
<<U1>      <float64>
SeriesHE.via_values.__array_ufunc__(ufunc, method, *args, **kwargs)
SeriesHE.via_values

Interface for applying functions to values (as arrays) in this container.

InterfaceValues.__array_ufunc__(ufunc, method, *args, **kwargs)[source]

Support for applying NumPy functions directly on containers, returning NumPy arrays.

>>> s = sf.SeriesHE((10, 2, 8), index=('a', 'b', 'c'))
>>> np.sin(s.via_values)
<SeriesHE>
<Index>
a          -0.5440211108893698
b          0.9092974268256817
c          0.9893582466233818
<<U1>      <float64>
SeriesHE.via_values.__call__(*, consolidate_blocks, unify_blocks, dtype)
SeriesHE.via_values

Interface for applying functions to values (as arrays) in this container.

InterfaceValues.__call__(*, consolidate_blocks=False, unify_blocks=False, dtype=None)[source]
Parameters
  • consolidate_blocks – Group adjacent same-typed arrays into 2D arrays.

  • unify_blocks – Group all arrays into single array, re-typing to an appropriate dtype.

  • dtype – specify a dtype to be used in conversion before consolidation or unification, and before function application.

>>> s = sf.SeriesHE((10, 2, 8), index=('a', 'b', 'c'))
>>> np.sin(s.via_values(unify_blocks=True))
<SeriesHE>
<Index>
a          -0.5440211108893698
b          0.9092974268256817
c          0.9893582466233818
<<U1>      <float64>

SeriesHE: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Values | Accessor Datetime | Accessor String | Accessor Fill Value | Accessor Regular Expression | Accessor Hashlib