Series

Overview: Series

class Series(values: Union[Iterable[Any], numpy.ndarray, Mapping[Hashable, Any], int, float, str, bool], *, index: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]], Type[static_frame.core.index_auto.IndexAutoFactory]]] = None, name: Optional[Hashable] = <object object>, dtype: Optional[Union[str, numpy.dtype, type]] = None, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, own_index: bool = False)[source]

A one-dimensional, ordered, labelled container, immutable and of fixed size.

Series: Constructor

Overview: Series: Constructor

Series.__init__(values: Union[Iterable[Any], numpy.ndarray, Mapping[Hashable, Any], int, float, str, bool], *, index: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]], Type[static_frame.core.index_auto.IndexAutoFactory]]] = None, name: Optional[Hashable] = <object object>, dtype: Optional[Union[str, numpy.dtype, type]] = None, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, own_index: bool = False)None[source]

Initializer.

Parameters
  • values – An iterable of values to be aligned with the supplied (or automatically generated) index.

  • index – Optional index initializer. If provided in addition to data values, lengths must be compatible.

  • own_index – Flag the passed index as ownable by this static_frame.Series. Primarily used by internal clients.

>>> sf.Series((167, -200), index=('Mercury', 'Neptune'), dtype=np.int64)
<Series>
<Index>
Mercury  167
Neptune  -200
<<U7>    <int64>

classmethod Series.from_concat(containers: Iterable[static_frame.core.series.Series], *, index: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]], Type[static_frame.core.index_auto.IndexAutoFactory]]] = None, name: Optional[Hashable] = <object object>)static_frame.core.series.Series[source]

Concatenate multiple Series into a new Series.

Parameters
  • containers – Iterable of Series from which values in the new Series are drawn.

  • index – If None, the resultant index will be the concatenation of all indices (assuming they are unique in combination). If IndexAutoFactory, the resultant index is a auto-incremented integer index. Otherwise, the value is used as a index initializer.

Returns

static_frame.Series

classmethod Series.from_concat_items(items: Iterable[Tuple[Hashable, static_frame.core.series.Series]])static_frame.core.series.Series[source]

Produce a Series with a hierarchical index from an iterable of pairs of labels, Series. The IndexHierarchy is formed from the provided labels and the Index if each Series.

Parameters

items – Iterable of pairs of label, Series

Returns

static_frame.Series

classmethod Series.from_dict(mapping: Dict[Hashable, Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[], static_frame.core.index_base.IndexBase]] = None)static_frame.core.series.Series[source]

Series construction from a dictionary, where the first pair value is the index and the second is the value.

Parameters
  • mapping – a dictionary or similar mapping interface.

  • dtype – dtype or valid dtype specifier.

Returns

Series

>>> sf.Series.from_dict(dict(Mercury=167, Neptune=-200), dtype=np.int64)
<Series>
<Index>
Mercury  167
Neptune  -200
<<U7>    <int64>

classmethod Series.from_element(element: Any, *, index: Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]], dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[], static_frame.core.index_base.IndexBase]] = None, own_index: bool = False)static_frame.core.series.Series[source]

Create a static_frame.Series from a single element. The size of the resultant container will be determined by the index argument.

Returns

static_frame.Series

>>> sf.Series.from_element('lepton', index=('electron', 'muon', 'tau'))
<Series>
<Index>
electron lepton
muon     lepton
tau      lepton
<<U8>    <<U6>

classmethod Series.from_items(pairs: Iterable[Tuple[Hashable, Any]], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[], static_frame.core.index_base.IndexBase]] = None)static_frame.core.series.Series[source]

Series construction from an iterator or generator of pairs, where the first pair value is the index and the second is the value.

Parameters
  • pairs – Iterable of pairs of index, value.

  • dtype – dtype or valid dtype specifier.

Returns

static_frame.Series

>>> sf.Series.from_items(zip(('Mercury', 'Jupiter'), (4879, 12756)), dtype=np.int64)
<Series>
<Index>
Mercury  4879
Jupiter  12756
<<U7>    <int64>

classmethod Series.from_overlay(containers: Iterable[static_frame.core.series.Series], *, index: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]]] = None, union: bool = True, name: Optional[Hashable] = None)static_frame.core.series.Series[source]

Return a new Series made by overlaying containers, filling in missing values (None or NaN) with aligned values from subsequent containers.

Parameters
  • containers – Iterable of Series.

  • index – An Index or IndexHierarchy, or index initializer, to be used as the index upon which all containers are aligned. IndexAutoFactory is not supported.

  • union – If True, and no index argument is supplied, a union index from containers will be used; if False, the intersection index will be used.

classmethod Series.from_pandas(value: pandas.Series, *, index_constructor: Optional[Union[Callable[[...], IndexBase], Type[static_frame.core.index_auto.IndexAutoFactory]]] = None, name: Optional[Hashable] = <object object>, own_data: bool = False)Series[source]

Given a Pandas Series, return a Series.

Parameters
  • value – Pandas Series.

  • own_data – If True, the underlying NumPy data array will be made immutable and used without a copy.

  • own_index – If True, the underlying NumPy index label array will be made immutable and used without a copy.

Returns

static_frame.Series

Series: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String

Series: Exporter

Overview: Series: Exporter

Series.to_frame(axis: int = 1)Frame[source]

Return a Frame view of this Series. As underlying data is immutable, this is a no-copy operation.

Returns

Frame

Series.to_frame_go(axis: int = 1)FrameGO[source]

Return FrameGO view of this Series. As underlying data is immutable, this is a no-copy operation.

Returns

FrameGO

Series.to_html(config: Optional[static_frame.core.display_config.DisplayConfig] = None)str[source]

Return an HTML table representation of this Series using standard TABLE, TR, and TD tags. This is not a complete HTML page.

Parameters

config – Optional DisplayConfig instance.

Returns

str

Series.to_html_datatables(fp: Optional[Union[str, os.PathLike, TextIO]] = None, show: bool = True, config: Optional[static_frame.core.display_config.DisplayConfig] = None)Optional[str][source]

Return a complete HTML representation of this Series using the DataTables JS library for table naviagation and search. The page links to CDNs for JS resources, and thus will not fully render without an internet connection.

Parameters
  • fp – optional file path to write; if not provided, a temporary file will be created. Note: the caller is responsible for deleting this file.

  • show – if True, the file will be opened with a webbrowser.

  • config – Optional DisplayConfig instance.

Returns

str, absolute file path to the file written.

Series.to_pairs()Iterable[Tuple[Hashable, Any]][source]

Return a tuple of tuples, where each inner tuple is a pair of index label, value.

Returns

tp.Iterable[tp.Tuple[tp.Hashable, tp.Any]]

Series.to_pandas()pandas.Series[source]

Return a Pandas Series.

Returns

pandas.Series

Series.to_series_he()static_frame.core.series.SeriesHE[source]

Return a SeriesHE from this Series.

Series: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String

Series: Attribute

Overview: Series: Attribute

Series.STATIC: bool = True
Series.T

Transpose. For a 1D immutable container, this returns a reference to self.

Returns

Series

Series.dtype

Return the dtype of the underlying NumPy array.

Returns

numpy.dtype

>>> s = sf.Series((1, 2, 67, 62, 27, 14), index=('Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'), dtype=np.int64)
>>> s.dtype
dtype('int64')

Series.index

The index instance assigned to this container.

Returns

static_frame.Index

Series.mloc

The memory location, represented as an integer, of the underlying NumPy array.

Series.name

A hashable label attached to this container.

Returns

Hashable

Series.nbytes

Return the total bytes of the underlying NumPy array.

Returns

int

>>> s = sf.Series((1, 2, 67, 62, 27, 14), index=('Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'), dtype=np.int64)
>>> s.nbytes
48

Series.ndim

Return the number of dimensions, which for a Series is always 1.

Returns

int

>>> s = sf.Series((1, 2, 67, 62, 27, 14), index=('Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'), dtype=np.int64)
>>> s.ndim
1

Series.shape

Return a tuple describing the shape of the underlying NumPy array.

Returns

Tuple[int]

>>> s = sf.Series((1, 2, 67, 62, 27, 14), index=('Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'), dtype=np.int64)
>>> s
<Series>
<Index>
Earth    1
Mars     2
Jupiter  67
Saturn   62
Uranus   27
Neptune  14
<<U7>    <int64>
>>> s.shape
(6,)

Series.size

Return the size of the underlying NumPy array.

Returns

int

>>> s = sf.Series((1, 2, 67, 62, 27, 14), index=('Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'), dtype=np.int64)
>>> s.size
6

Series: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String

Series: Method

Overview: Series: Method

Series.__bool__()bool

Raises ValueError to prohibit ambiguous use of truethy evaluation.

Series.__deepcopy__(memo: Dict[int, Any])static_frame.core.series.Series[source]
Series.__len__()int[source]

Length of values.

>>> s = sf.Series((1, 2, 67, 62, 27, 14), index=('Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'), dtype=np.int64)
>>> len(s)
6

Series.__round__(decimals: int = 0)static_frame.core.series.Series[source]

Return a Series rounded to the given decimals. Negative decimals round to the left of the decimal point.

Parameters

decimals – number of decimals to round to.

Returns

Series

Series.all(axis: int = 0, skipna: bool = True, out: Optional[numpy.ndarray] = None)Any

Logical and over values along the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

Series.any(axis: int = 0, skipna: bool = True, out: Optional[numpy.ndarray] = None)Any

Logical or over values along the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

Series.astype(dtype: Optional[Union[str, numpy.dtype, type]])static_frame.core.series.Series[source]

Return a Series with type determined by dtype argument. Note that for Series, this is a simple function, whereas for Frame, this is an interface exposing both a callable and a getitem interface.

Parameters

dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Returns

Series

Series.clip(*, lower: Optional[Union[float, static_frame.core.series.Series]] = None, upper: Optional[Union[float, static_frame.core.series.Series]] = None)static_frame.core.series.Series[source]

Apply a clip operation to this Series. Note that clip operations can be applied to object types, but cannot be applied to non-numerical objects (e.g., strings, None)

Parameters
  • lower – value or Series to define the inclusive lower bound.

  • upper – value or Series to define the inclusive upper bound.

Returns

Series

Series.count(*, skipna: bool = True)int[source]

Return the count of non-NA elements.

Parameters

skipna

Series.cov(other: Union[static_frame.core.series.Series, numpy.ndarray], *, ddof: int = 1)float[source]

Return the index-aligned covariance to the supplied Series.

Parameters

ddof – Delta degrees of freedom, defaults to 1.

Series.cumprod(axis: int = 0, skipna: bool = True)Any

Return the cumulative product over the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

Series.cumsum(axis: int = 0, skipna: bool = True)Any

Return the cumulative sum over the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

Series.drop_duplicated(*, exclude_first: bool = False, exclude_last: bool = False)static_frame.core.series.Series[source]

Return a Series with duplicated values removed.

Parameters
  • exclude_first – Boolean to select if the first duplicated value is excluded.

  • exclude_last – Boolean to select if the last duplicated value is excluded.

Returns

Series

Series.dropna()static_frame.core.series.Series[source]

Return a new static_frame.Series after removing values of NaN or None.

Series.duplicated(*, exclude_first: bool = False, exclude_last: bool = False)numpy.ndarray[source]

Return a same-sized Boolean Series that shows True for all values that are duplicated.

Parameters
  • exclude_first – Boolean to select if the first duplicated value is excluded.

  • exclude_last – Boolean to select if the last duplicated value is excluded.

Returns

numpy.ndarray

Series.equals(other: Any, *, compare_name: bool = False, compare_dtype: bool = False, compare_class: bool = False, skipna: bool = True)bool[source]

Return a bool from comparison to any other object.

Parameters
  • compare_name – Include equality of the container’s name (and all composed containers) in the comparison.

  • compare_dtype – Include equality of the container’s dtype (and all composed containers) in the comparison.

  • compare_class – Include equality of the container’s class (and all composed containers) in the comparison.

  • skipna – If True, comparisons between missing values are equal.

Series.fillna(value: Any)static_frame.core.series.Series[source]

Return a new Series after replacing null (NaN or None) with the supplied value. The value can be an element or Series.

Parameters

value – Value to be used to replace missing values (NaN or None).

Series.fillna_backward(limit: int = 0)static_frame.core.series.Series[source]

Return a new Series after feeding backward the last non-null (NaN or None) observation across contiguous nulls.

Parameters

limit – Set the maximum count of missing values (NaN or None) to be filled per contiguous region of missing vlaues. A value of 0 is equivalent to no limit.

Series.fillna_forward(limit: int = 0)static_frame.core.series.Series[source]

Return a new Series after feeding forward the last non-null (NaN or None) observation across contiguous nulls.

Parameters

limit – Set the maximum count of missing values (NaN or None) to be filled per contiguous region of missing vlaues. A value of 0 is equivalent to no limit.

Series.fillna_leading(value: Any)static_frame.core.series.Series[source]

Return a new Series after filling leading (and only leading) null (NaN or None) with the supplied value.

Parameters

value – Value to be used to replace missing values (NaN or None).

Series.fillna_trailing(value: Any)static_frame.core.series.Series[source]

Return a new Series after filling trailing (and only trailing) null (NaN or None) with the supplied value.

Parameters

value – Value to be used to replace missing values (NaN or None).

Series.head(count: int = 5)static_frame.core.series.Series[source]

Return a Series consisting only of the top elements as specified by count.

Parameters

count – Number of elements to be returned from the top of the Series

Returns

Series

Series.iloc_max(*, skipna: bool = True)int[source]

Return the integer index corresponding to the maximum value.

Parameters

skipna – if True, NaN or None values will be ignored; if False, a found NaN will propagate.

Returns

int

Series.iloc_min(*, skipna: bool = True)int[source]

Return the integer index corresponding to the minimum value found.

Parameters

skipna – if True, NaN or None values will be ignored; if False, a found NaN will propagate.

Returns

int

Series.iloc_searchsorted(values: Any, *, side_left: bool = True)Union[Hashable, Iterable[Hashable]][source]

Given a sorted Series, return the iloc (integer) position(s) at which insertion in values would retain sort order.

Parameters
  • values – a single value, or iterable of values.

  • side_left – If True, the index of the first suitable location found is given, else return the last such index. If matching an existing value, side_left==True will return that position, side_left==Right will return the next position (or the length).

Series.insert_after(key: Hashable, container: static_frame.core.series.Series)static_frame.core.series.Series[source]

Create a new Series by inserting a Series at the position after the label specified by key.

Parameters
  • key – Label after which the new container will be inserted.

  • container – Container to be inserted.

Returns

Series

Series.insert_before(key: Hashable, container: static_frame.core.series.Series)static_frame.core.series.Series[source]

Create a new Series by inserting a Series at the position before the label specified by key.

Parameters
  • key – Label before which the new container will be inserted.

  • container – Container to be inserted.

Returns

Series

Series.isin(other: Iterable[Any])static_frame.core.series.Series[source]

Return a same-sized Boolean Series that shows if the same-positioned element is in the iterable passed to the function.

Returns

Series

Series.isna()static_frame.core.series.Series[source]

Return a same-indexed, Boolean Series indicating which values are NaN or None.

Series.loc_max(*, skipna: bool = True)Hashable[source]

Return the label corresponding to the maximum value found.

Parameters

skipna – if True, NaN or None values will be ignored; if False, a found NaN will propagate.

Returns

tp.Hashable

Series.loc_min(*, skipna: bool = True)Hashable[source]

Return the label corresponding to the minimum value found.

Parameters

skipna – if True, NaN or None values will be ignored; if False, a found NaN will propagate.

Returns

tp.Hashable

Series.loc_searchsorted(values: Any, *, side_left: bool = True, fill_value: Any = nan)Union[Hashable, Iterable[Hashable]][source]

Given a sorted Series, return the loc (label) position(s) at which insertion in values would retain sort order.

Parameters
  • values – a single value, or iterable of values.

  • side_left – If True, the index of the first suitable location found is given, else return the last such index. If matching an existing value, side_left==True will return that position, side_left==Right will return the next position (or the length).

  • fill_value – A value to be used to fill the label beyond the last label.

Series.max(axis: int = 0, skipna: bool = True)Any

Return the maximum along the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

Series.mean(axis: int = 0, skipna: bool = True, out: Optional[numpy.ndarray] = None)Any

Return the mean along the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

Series.median(axis: int = 0, skipna: bool = True, out: Optional[numpy.ndarray] = None)Any

Return the median along the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

Series.min(axis: int = 0, skipna: bool = True, out: Optional[numpy.ndarray] = None)Any

Return the minimum along the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

Series.notna()static_frame.core.series.Series[source]

Return a same-indexed, Boolean Series indicating which values are NaN or None.

Series.prod(axis: int = 0, skipna: bool = True, out: Optional[numpy.ndarray] = None)Any

Return the product along the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

Series.rehierarch(depth_map: Sequence[int])static_frame.core.series.Series[source]

Return a new Series with new a hierarchy based on the supplied depth_map.

Series.reindex(index: Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]], *, fill_value: Any = nan, own_index: bool = False, check_equals: bool = True)static_frame.core.series.Series[source]

Return a new Series with labels defined by the provided index. The size and ordering of the data is determined by the newly provided index, where data will continue to be aligned under labels found in both the new and the old index. Labels found only in the new index will be filled with fill_value.

Parameters
  • index – An iterable of unique, hashable values, or another Index or IndexHierarchy, to be used as the labels of the index.

  • columns – An iterable of unique, hashable values, or another Index or IndexHierarchy, to be used as the labels of the index.

  • fill_value – A value to be used to fill space created by a new index that has values not found in the previous index.

  • own_index – Flag the passed index as ownable by this static_frame.Series. Primarily used by internal clients.

>>> s = sf.Series((0, 62, 13), index=('Venus', 'Saturn', 'Neptune'))

>>> s.reindex(('Venus', 'Earth', 'Mars', 'Neptune'))
<Series>
<Index>
Venus    0.0
Earth    nan
Mars     nan
Neptune  13.0
<<U7>    <float64>

Series.relabel(index: Optional[Union[Callable[[], Any], Mapping[Hashable, Any], static_frame.core.series.Series, Type[static_frame.core.index_auto.IndexAutoFactory], static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]]])static_frame.core.series.Series[source]

Return a new Series with transformed labels on the index. The size and ordering of the data is never changed in a relabeling operation. The resulting index must be unique.

Parameters

index – One of the following types, used to create a new Index with the same size as the previous index. (a) A mapping (as a dictionary or Series), used to lookup and transform the labels in the previous index. Previous labels not found in the mapping will be reused. (b) A function, returning a hashable, that is applied to each label in the previous index. (c) The IndexAutoFactory type, to apply an auto-incremented integer index. (d) An index initializer, i.e., either an iterable of hashables or an Index instance.

>>> s = sf.Series((0, 62, 13), index=('Venus', 'Saturn', 'Neptune'), dtype=np.int64)

>>> s.relabel({'Venus': 'Mercury'})
<Series>
<Index>
Mercury  0
Saturn   62
Neptune  13
<<U7>    <int64>

>>> s.relabel(lambda x: x[:2].upper())
<Series>
<Index>
VE       0
SA       62
NE       13
<<U2>    <int64>

Series.relabel_flat()static_frame.core.series.Series[source]

Return a new Series, where an IndexHierarchy (if defined) is replaced with a flat, one-dimension index of tuples.

Series.relabel_level_add(level: Hashable)static_frame.core.series.Series[source]

Return a new Series, adding a new root level to an existing IndexHierarchy, or creating an IndexHierarchy if one is not yet defined.

Parameters

level – A hashable value to be used as a new root level, extending or creating an IndexHierarchy

Series.relabel_level_drop(count: int = 1)static_frame.core.series.Series[source]

Return a new Series, dropping one or more levels from a either the root or the leaves of an IndexHierarchy. The resulting index must be unique.

Parameters

count – A positive integer drops that many outer-most (root) levels; a negative integer drops that many inner-most (leaf)levels.

Series.rename(name: Optional[Hashable] = <object object>, *, index: Optional[Hashable] = <object object>)static_frame.core.series.Series[source]

Return a new Series with an updated name attribute.

Series.roll(shift: int, *, include_index: bool = False)static_frame.core.series.Series[source]

Return a Series with values rotated forward and wrapped around the index (with a positive shift) or backward and wrapped around the index (with a negative shift).

Parameters
  • shift – Positive or negative integer shift.

  • include_index – Determine if the Index is shifted with the underlying data.

Returns

Series

Series.sample(count: int = 1, *, seed: Optional[int] = None)static_frame.core.series.Series[source]

Randomly (optionally made deterministic with a fixed seed) extract items from the container to return a subset of the container.

Parameters
  • of elements to select. (Number) –

  • state of random selection. (Initial) –

Series.shift(shift: int, *, fill_value: Any = nan)static_frame.core.series.Series[source]

Return a Series with values shifted forward on the index (with a positive shift) or backward on the index (with a negative shift).

Parameters
  • shift – Positive or negative integer shift.

  • fill_value – Value to be used to fill data missing after the shift.

Returns

Series

Series.sort_index(*, ascending: bool = True, kind: str = 'mergesort', key: Optional[Callable[[static_frame.core.index_base.IndexBase], Union[numpy.ndarray, static_frame.core.index_base.IndexBase]]] = None)static_frame.core.series.Series[source]

Return a new Series ordered by the sorted Index.

Parameters
  • *

  • ascending – If True, sort in ascending order; if False, sort in descending order.

  • kind – Name of the sort algorithm as passed to NumPy.

  • key – A function that is used to pre-process the selected columns or rows and derive new values to sort by.

Returns

Series

Series.sort_values(*, ascending: bool = True, kind: str = 'mergesort', key: Optional[Callable[[static_frame.core.series.Series], Union[numpy.ndarray, static_frame.core.series.Series]]] = None)static_frame.core.series.Series[source]

Return a new Series ordered by the sorted values.

Parameters
  • *

  • ascending – If True, sort in ascending order; if False, sort in descending order.

  • kind – Name of the sort algorithm as passed to NumPy.

  • key – A function that is used to pre-process the selected columns or rows and derive new values to sort by.

Returns

Series

Series.std(axis: int = 0, skipna: bool = True, ddof: int = 0, out: Optional[numpy.ndarray] = None)Any

Return the standard deviaton along the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

Series.sum(axis: int = 0, skipna: bool = True, out: Optional[numpy.ndarray] = None)Any

Sum values along the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

Series.tail(count: int = 5)static_frame.core.series.Series[source]
Return a Series consisting only of the bottom elements as specified by count.

s

Parameters

count – Number of elements to be returned from the bottom of the Series

Returns

Series

Series.transpose()static_frame.core.series.Series[source]

Transpose. For a 1D immutable container, this returns a reference to self.

Returns

Series

Series.unique()numpy.ndarray[source]

Return a NumPy array of unique values.

Returns

numpy.ndarray

Series.var(axis: int = 0, skipna: bool = True, ddof: int = 0, out: Optional[numpy.ndarray] = None)Any

Return the variance along the specified axis.

Parameters
  • axis – Axis, defaulting to axis 0.

  • skipna – Skip missing (NaN) values, defaulting to True.

Series: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String

Series: Dictionary-Like

Overview: Series: Dictionary-Like

Series.__contains__(value: Hashable)bool[source]

Inclusion of value in index labels.

Returns

bool

Series.__iter__()Iterator[Hashable][source]

Iterator of index labels, same as static_frame.Series.keys.

Returns

Iterator[Hashasble]

Series.__reversed__()Iterator[Hashable][source]

Returns a reverse iterator on the series’ index.

Returns

Index

Series.get(key: Hashable, default: Optional[Any] = None)Any[source]

Return the value found at the index key, else the default if the key is not found.

Returns

Any

>>> s = sf.Series((1, 2, 67, 62, 27, 14), index=('Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'), dtype=np.int64)
>>> [s.get(k, None) for k in ('Mercury', 'Neptune', 'Pluto')]
[None, 14, None]

Series.items()Iterator[Tuple[Any, Any]][source]

Iterator of pairs of index label and value.

Returns

Iterator[Tuple[Hashable, Any]]

>>> s = sf.Series((1, 2, 67, 62, 27, 14), index=('Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'), dtype=np.int64)
>>> s
<Series>
<Index>
Earth    1
Mars     2
Jupiter  67
Saturn   62
Uranus   27
Neptune  14
<<U7>    <int64>
>>> [k for k, v in s.items() if v > 60]
['Jupiter', 'Saturn']

Series.keys()static_frame.core.index_base.IndexBase[source]

Iterator of index labels.

Returns

Iterator[Hashable]

Series.values

Series: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String

Series: Display

Overview: Series: Display

Series.interface

A Frame documenting the interface of this class.

>>> sf.Series.interface.loc[sf.Series.interface.index.via_str.startswith('sort')]
<Frame: Series>
<Index>                              cls_name group  doc                  <<U18>
<Index: signature>
sort_index(*, ascending, kind, key)  Series   Method Return a new Seri...
sort_values(*, ascending, kind, key) Series   Method Return a new Seri...
<<U94>                               <<U6>    <<U17> <<U83>

Series.__repr__()str

Return repr(self).

Series.__str__()

Return str(self).

Series.display(config: Optional[static_frame.core.display_config.DisplayConfig] = None)static_frame.core.display.Display[source]

Return a static_frame.Display, capable of providing a string representation.

Parameters

config – A static_frame.DisplayConfig instance. If not provided, the static_frame.DisplayActive will be used.

Series.display_tall(config: Optional[static_frame.core.display_config.DisplayConfig] = None)static_frame.core.display.Display

Maximize vertical presentation. Return a static_frame.Display, capable of providing a string representation.

Parameters

config – A static_frame.DisplayConfig instance. If not provided, the static_frame.DisplayActive will be used.

Series.display_wide(config: Optional[static_frame.core.display_config.DisplayConfig] = None)static_frame.core.display.Display

Maximize horizontal presentation. Return a static_frame.Display, capable of providing a string representation.

Parameters

config – A static_frame.DisplayConfig instance. If not provided, the static_frame.DisplayActive will be used.

Series: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String

Series: Assignment

Overview: Series: Assignment

Series.assign[key](value, *, fill_value)
Series.assign

Interface for doing assignment-like selection and replacement.

SeriesAssign.__call__(value: Any, *, fill_value: Any = nan)static_frame.core.series.Series[source]

Assign the value in the position specified by the selector. The name attribute is propagated to the returned container.

Parameters
  • value – Value to assign, which can be a Series, np.ndarray, or element.

  • *.

  • fill_value – If the value parameter has to be reindexed, this element will be used to fill newly created elements.

>>> s = sf.Series.from_items((('Venus', 108.2), ('Earth', 149.6), ('Saturn', 1433.5)))
>>> s
<Series>
<Index>
Venus    108.2
Earth    149.6
Saturn   1433.5
<<U6>    <float64>
>>> s.assign['Earth'](150)
<Series>
<Index>
Venus    108.2
Earth    150.0
Saturn   1433.5
<<U6>    <float64>
>>> s.assign['Earth':](0)
<Series>
<Index>
Venus    108.2
Earth    0.0
Saturn   0.0
<<U6>    <float64>

Series.assign[key].apply(func, *, fill_value)
Series.assign

Interface for doing assignment-like selection and replacement.

SeriesAssign.apply(func: Callable[[], Any], *, fill_value: Any = nan)static_frame.core.series.Series[source]

Provide a function to apply to the assignment target, and use that as the assignment value.

Parameters
  • func – A function to apply to the assignment target.

  • *.

  • fill_value – If the function does not produce a container with a matching index, the element will be used to fill newly created elements.

Series.assign.iloc[key](value, *, fill_value)
Series.assign

Interface for doing assignment-like selection and replacement.

SeriesAssign.__call__(value: Any, *, fill_value: Any = nan)static_frame.core.series.Series[source]

Assign the value in the position specified by the selector. The name attribute is propagated to the returned container.

Parameters
  • value – Value to assign, which can be a Series, np.ndarray, or element.

  • *.

  • fill_value – If the value parameter has to be reindexed, this element will be used to fill newly created elements.

>>> s = sf.Series.from_items((('Venus', 108.2), ('Earth', 149.6), ('Saturn', 1433.5)))
>>> s.assign.iloc[-1](0)
<Series>
<Index>
Venus    108.2
Earth    149.6
Saturn   0.0
<<U6>    <float64>

Series.assign.iloc[key].apply(func, *, fill_value)
Series.assign

Interface for doing assignment-like selection and replacement.

SeriesAssign.apply(func: Callable[[], Any], *, fill_value: Any = nan)static_frame.core.series.Series[source]

Provide a function to apply to the assignment target, and use that as the assignment value.

Parameters
  • func – A function to apply to the assignment target.

  • *.

  • fill_value – If the function does not produce a container with a matching index, the element will be used to fill newly created elements.

Series.assign.loc[key](value, *, fill_value)
Series.assign

Interface for doing assignment-like selection and replacement.

SeriesAssign.__call__(value: Any, *, fill_value: Any = nan)static_frame.core.series.Series[source]

Assign the value in the position specified by the selector. The name attribute is propagated to the returned container.

Parameters
  • value – Value to assign, which can be a Series, np.ndarray, or element.

  • *.

  • fill_value – If the value parameter has to be reindexed, this element will be used to fill newly created elements.

>>> s = sf.Series.from_items((('Venus', 108.2), ('Earth', 149.6), ('Saturn', 1433.5)))
>>> s.assign.loc[s < 150](0)
<Series>
<Index>
Venus    0.0
Earth    0.0
Saturn   1433.5
<<U6>    <float64>

Series.assign.loc[key].apply(func, *, fill_value)
Series.assign

Interface for doing assignment-like selection and replacement.

SeriesAssign.apply(func: Callable[[], Any], *, fill_value: Any = nan)static_frame.core.series.Series[source]

Provide a function to apply to the assignment target, and use that as the assignment value.

Parameters
  • func – A function to apply to the assignment target.

  • *.

  • fill_value – If the function does not produce a container with a matching index, the element will be used to fill newly created elements.

Series: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String

Series: Selector

Overview: Series: Selector

Series.drop[key]
Series.drop

Interface for dropping elements from static_frame.Series.

InterfaceSelectTrio.__getitem__(key: Union[int, numpy.integer, slice, List[Any], None, Index, Series, numpy.ndarray])Any[source]

Label-based selection.

>>> s = sf.Series((0, 0, 1, 2), index=('Mercury', 'Venus', 'Earth', 'Mars'), dtype=np.int64)
>>> s
<Series>
<Index>
Mercury  0
Venus    0
Earth    1
Mars     2
<<U7>    <int64>
>>> s.drop[s < 1]
<Series>
<Index>
Earth    1
Mars     2
<<U7>    <int64>
>>> s.drop[['Mercury', 'Mars']]
<Series>
<Index>
Venus    0
Earth    1
<<U7>    <int64>

Series.drop.iloc[key]
Series.drop

Interface for dropping elements from static_frame.Series.

InterfaceSelectTrio.iloc

Integer-position based selection.

>>> s = sf.Series((0, 0, 1, 2), index=('Mercury', 'Venus', 'Earth', 'Mars'), dtype=np.int64)
>>> s.drop.iloc[-2:]
<Series>
<Index>
Mercury  0
Venus    0
<<U7>    <int64>

Series.drop.loc[key]
Series.drop

Interface for dropping elements from static_frame.Series.

InterfaceSelectTrio.loc

Label-based selection.

Series.mask[key]
Series.mask

Interface for extracting Boolean static_frame.Series.

InterfaceSelectTrio.__getitem__(key: Union[int, numpy.integer, slice, List[Any], None, Index, Series, numpy.ndarray])Any[source]

Label-based selection.

Series.mask.iloc[key]
Series.mask

Interface for extracting Boolean static_frame.Series.

InterfaceSelectTrio.iloc

Integer-position based selection.

Series.mask.loc[key]
Series.mask

Interface for extracting Boolean static_frame.Series.

InterfaceSelectTrio.loc

Label-based selection.

Series.masked_array[key]
Series.masked_array

Interface for extracting NumPy Masked Arrays.

InterfaceSelectTrio.__getitem__(key: Union[int, numpy.integer, slice, List[Any], None, Index, Series, numpy.ndarray])Any[source]

Label-based selection.

Series.masked_array.iloc[key]
Series.masked_array

Interface for extracting NumPy Masked Arrays.

InterfaceSelectTrio.iloc

Integer-position based selection.

Series.masked_array.loc[key]
Series.masked_array

Interface for extracting NumPy Masked Arrays.

InterfaceSelectTrio.loc

Label-based selection.

Series[key]
Series.__getitem__ = <function Series.__getitem__>[source]
>>> s = sf.Series((1, 2, 67, 62, 27, 14), index=('Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'), dtype=np.int64)
>>> s
<Series>
<Index>
Earth    1
Mars     2
Jupiter  67
Saturn   62
Uranus   27
Neptune  14
<<U7>    <int64>

>>> s['Mars']
2
>>> s['Mars':]
<Series>
<Index>
Mars     2
Jupiter  67
Saturn   62
Uranus   27
Neptune  14
<<U7>    <int64>
>>> s[['Mars', 'Saturn']]
<Series>
<Index>
Mars     2
Saturn   62
<<U7>    <int64>
>>> s[s > 60]
<Series>
<Index>
Jupiter  67
Saturn   62
<<U7>    <int64>

Series.iloc[key]
Series.iloc

Interface for position-based selection.

>>> s = sf.Series((1, 2, 67, 62, 27, 14), index=('Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'), dtype=np.int64)
>>> s.iloc[-2:]
<Series>
<Index>
Uranus   27
Neptune  14
<<U7>    <int64>

Series.loc[key]
Series.loc

Interface for label-based selection.

Series: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String

Series: Iterator

Overview: Series: Iterator

Series.iter_element
iter_element

Iterator of elements.

>>> s = sf.Series((1, 2, 67, 62, 27, 14), index=('Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'))
>>> [x for x in s.iter_element()]
[1, 2, 67, 62, 27, 14]

Series.iter_element().apply(func, *, dtype, name)
iter_element

Iterator of elements.

IterNodeDelegate.apply(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a function to each value. Returns a new container.

Parameters
  • func – A function that takes a value.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

>>> s = sf.Series((1, 2, 67, 62, 27, 14), index=('Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'))
>>> s.iter_element().apply(lambda v: v > 20)
<Series>
<Index>
Earth    False
Mars     False
Jupiter  True
Saturn   True
Uranus   True
Neptune  False
<<U7>    <bool>

Series.iter_element().apply_iter(func)
iter_element

Iterator of elements.

IterNodeDelegate.apply_iter(func: Callable[[], Any])Iterator[Any][source]

Apply a function to each value. A generator of resulting values.

Parameters

func – A function that takes a value.

>>> s = sf.Series((1, 2, 67, 62, 27, 14), index=('Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'))
>>> [x for x in s.iter_element().apply_iter(lambda v: v > 20)]
[False, False, True, True, True, False]

Series.iter_element().apply_iter_items(func)
iter_element

Iterator of elements.

IterNodeDelegate.apply_iter_items(func: Callable[[], Any])Iterator[Tuple[Any, Any]][source]

Apply a function to each value. A generator of resulting key, value pairs.

Parameters

func – A function that takes a value.

Series.iter_element().apply_pool(func, *, dtype, name, max_workers, chunksize, use_threads)
iter_element

Iterator of elements.

IterNodeDelegate.apply_pool(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, max_workers: Optional[int] = None, chunksize: int = 1, use_threads: bool = False)FrameOrSeries[source]

Apply a function to each value. Employ parallel processing with either the ProcessPoolExecutor or ThreadPoolExecutor.

Parameters
  • func – A function that takes a value.

  • *

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

  • name – A hashable object to label the container.

  • max_workers – Number of parallel executors, as passed to the Thread- or ProcessPoolExecutor; None defaults to the max number of machine processes.

  • chunksize – Units of work per executor, as passed to the Thread- or ProcessPoolExecutor.

  • use_threads – Use the ThreadPoolExecutor instead of the ProcessPoolExecutor.

Series.iter_element().map_all(mapping, *, dtype, name)
iter_element

Iterator of elements.

IterNodeDelegate.map_all(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, an Exception is raised. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_element().map_all_iter(mapping)
iter_element

Iterator of elements.

IterNodeDelegate.map_all_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_element().map_all_iter_items(mapping)
iter_element

Iterator of elements.

IterNodeDelegate.map_all_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_element().map_any(mapping, *, dtype, name)
iter_element

Iterator of elements.

IterNodeDelegate.map_any(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_element().map_any_iter(mapping)
iter_element

Iterator of elements.

IterNodeDelegate.map_any_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_element().map_any_iter_items(mapping)
iter_element

Iterator of elements.

IterNodeDelegate.map_any_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_element().map_fill(mapping, *, fill_value, dtype, name)
iter_element

Iterator of elements.

IterNodeDelegate.map_fill(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the fill_value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_element().map_fill_iter(mapping, *, fill_value)
iter_element

Iterator of elements.

IterNodeDelegate.map_fill_iter(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Any][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting values.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Series.iter_element().map_fill_iter_items(mapping, *, fill_value)
iter_element

Iterator of elements.

IterNodeDelegate.map_fill_iter_items(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting key, value pairs.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Series.iter_element_items
iter_element_items

Iterator of label, element pairs.

>>> s = sf.Series((1, 2, 67, 62, 27, 14), index=('Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'))
>>> [x for x in s.iter_element_items()]
[('Earth', 1), ('Mars', 2), ('Jupiter', 67), ('Saturn', 62), ('Uranus', 27), ('Neptune', 14)]

Series.iter_element_items().apply(func, *, dtype, name)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.apply(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a function to each value. Returns a new container.

Parameters
  • func – A function that takes a value.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

>>> s = sf.Series((1, 2, 67, 62, 27, 14), index=('Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'))
>>> s.iter_element_items().apply(lambda k, v: v if 'u' in k else None)
<Series>
<Index>
Earth    None
Mars     None
Jupiter  67
Saturn   62
Uranus   27
Neptune  14
<<U7>    <object>

Series.iter_element_items().apply_iter(func)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.apply_iter(func: Callable[[], Any])Iterator[Any][source]

Apply a function to each value. A generator of resulting values.

Parameters

func – A function that takes a value.

Series.iter_element_items().apply_iter_items(func)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.apply_iter_items(func: Callable[[], Any])Iterator[Tuple[Any, Any]][source]

Apply a function to each value. A generator of resulting key, value pairs.

Parameters

func – A function that takes a value.

>>> s = sf.Series((1, 2, 67, 62, 27, 14), index=('Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'))

>>> [x for x in s.iter_element_items().apply_iter_items(lambda k, v: k.upper() if v > 20 else None)]
[('Earth', None), ('Mars', None), ('Jupiter', 'JUPITER'), ('Saturn', 'SATURN'), ('Uranus', 'URANUS'), ('Neptune', None)]


Series.iter_element_items().apply_pool(func, *, dtype, name, max_workers, chunksize, use_threads)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.apply_pool(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, max_workers: Optional[int] = None, chunksize: int = 1, use_threads: bool = False)FrameOrSeries[source]

Apply a function to each value. Employ parallel processing with either the ProcessPoolExecutor or ThreadPoolExecutor.

Parameters
  • func – A function that takes a value.

  • *

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

  • name – A hashable object to label the container.

  • max_workers – Number of parallel executors, as passed to the Thread- or ProcessPoolExecutor; None defaults to the max number of machine processes.

  • chunksize – Units of work per executor, as passed to the Thread- or ProcessPoolExecutor.

  • use_threads – Use the ThreadPoolExecutor instead of the ProcessPoolExecutor.

Series.iter_element_items().map_all(mapping, *, dtype, name)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.map_all(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, an Exception is raised. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_element_items().map_all_iter(mapping)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.map_all_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_element_items().map_all_iter_items(mapping)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.map_all_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_element_items().map_any(mapping, *, dtype, name)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.map_any(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_element_items().map_any_iter(mapping)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.map_any_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_element_items().map_any_iter_items(mapping)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.map_any_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_element_items().map_fill(mapping, *, fill_value, dtype, name)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.map_fill(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the fill_value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_element_items().map_fill_iter(mapping, *, fill_value)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.map_fill_iter(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Any][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting values.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Series.iter_element_items().map_fill_iter_items(mapping, *, fill_value)
iter_element_items

Iterator of label, element pairs.

IterNodeDelegate.map_fill_iter_items(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting key, value pairs.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Series.iter_group(*, axis)
iter_group

Iterator of Series, where each Series matches unique values.

>>> s = sf.Series((0, 0, 1, 2), index=('Mercury', 'Venus', 'Earth', 'Mars'), dtype=np.int64)
>>> next(iter(s.iter_group()))
<Series>
<Index>
Mercury  0
Venus    0
<<U7>    <int64>
>>> [x.values.tolist() for x in s.iter_group()]
[[0, 0], [1], [2]]

Series.iter_group(*, axis).apply(func, *, dtype, name)
iter_group

Iterator of Series, where each Series matches unique values.

IterNodeDelegate.apply(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a function to each value. Returns a new container.

Parameters
  • func – A function that takes a value.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_group(*, axis).apply_iter(func)
iter_group

Iterator of Series, where each Series matches unique values.

IterNodeDelegate.apply_iter(func: Callable[[], Any])Iterator[Any][source]

Apply a function to each value. A generator of resulting values.

Parameters

func – A function that takes a value.

Series.iter_group(*, axis).apply_iter_items(func)
iter_group

Iterator of Series, where each Series matches unique values.

IterNodeDelegate.apply_iter_items(func: Callable[[], Any])Iterator[Tuple[Any, Any]][source]

Apply a function to each value. A generator of resulting key, value pairs.

Parameters

func – A function that takes a value.

Series.iter_group(*, axis).apply_pool(func, *, dtype, name, max_workers, chunksize, use_threads)
iter_group

Iterator of Series, where each Series matches unique values.

IterNodeDelegate.apply_pool(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, max_workers: Optional[int] = None, chunksize: int = 1, use_threads: bool = False)FrameOrSeries[source]

Apply a function to each value. Employ parallel processing with either the ProcessPoolExecutor or ThreadPoolExecutor.

Parameters
  • func – A function that takes a value.

  • *

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

  • name – A hashable object to label the container.

  • max_workers – Number of parallel executors, as passed to the Thread- or ProcessPoolExecutor; None defaults to the max number of machine processes.

  • chunksize – Units of work per executor, as passed to the Thread- or ProcessPoolExecutor.

  • use_threads – Use the ThreadPoolExecutor instead of the ProcessPoolExecutor.

Series.iter_group(*, axis).map_all(mapping, *, dtype, name)
iter_group

Iterator of Series, where each Series matches unique values.

IterNodeDelegate.map_all(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, an Exception is raised. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_group(*, axis).map_all_iter(mapping)
iter_group

Iterator of Series, where each Series matches unique values.

IterNodeDelegate.map_all_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_group(*, axis).map_all_iter_items(mapping)
iter_group

Iterator of Series, where each Series matches unique values.

IterNodeDelegate.map_all_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_group(*, axis).map_any(mapping, *, dtype, name)
iter_group

Iterator of Series, where each Series matches unique values.

IterNodeDelegate.map_any(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_group(*, axis).map_any_iter(mapping)
iter_group

Iterator of Series, where each Series matches unique values.

IterNodeDelegate.map_any_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_group(*, axis).map_any_iter_items(mapping)
iter_group

Iterator of Series, where each Series matches unique values.

IterNodeDelegate.map_any_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_group(*, axis).map_fill(mapping, *, fill_value, dtype, name)
iter_group

Iterator of Series, where each Series matches unique values.

IterNodeDelegate.map_fill(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the fill_value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_group(*, axis).map_fill_iter(mapping, *, fill_value)
iter_group

Iterator of Series, where each Series matches unique values.

IterNodeDelegate.map_fill_iter(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Any][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting values.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Series.iter_group(*, axis).map_fill_iter_items(mapping, *, fill_value)
iter_group

Iterator of Series, where each Series matches unique values.

IterNodeDelegate.map_fill_iter_items(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting key, value pairs.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Series.iter_group_items(*, axis)
iter_group_items
>>> s = sf.Series((0, 0, 1, 2), index=('Mercury', 'Venus', 'Earth', 'Mars'))
>>> [(k, v.index.values.tolist()) for k, v in iter(s.iter_group_items()) if k > 0]
[(1, ['Earth']), (2, ['Mars'])]

Series.iter_group_items(*, axis).apply(func, *, dtype, name)
iter_group_items
IterNodeDelegate.apply(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a function to each value. Returns a new container.

Parameters
  • func – A function that takes a value.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_group_items(*, axis).apply_iter(func)
iter_group_items
IterNodeDelegate.apply_iter(func: Callable[[], Any])Iterator[Any][source]

Apply a function to each value. A generator of resulting values.

Parameters

func – A function that takes a value.

Series.iter_group_items(*, axis).apply_iter_items(func)
iter_group_items
IterNodeDelegate.apply_iter_items(func: Callable[[], Any])Iterator[Tuple[Any, Any]][source]

Apply a function to each value. A generator of resulting key, value pairs.

Parameters

func – A function that takes a value.

Series.iter_group_items(*, axis).apply_pool(func, *, dtype, name, max_workers, chunksize, use_threads)
iter_group_items
IterNodeDelegate.apply_pool(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, max_workers: Optional[int] = None, chunksize: int = 1, use_threads: bool = False)FrameOrSeries[source]

Apply a function to each value. Employ parallel processing with either the ProcessPoolExecutor or ThreadPoolExecutor.

Parameters
  • func – A function that takes a value.

  • *

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

  • name – A hashable object to label the container.

  • max_workers – Number of parallel executors, as passed to the Thread- or ProcessPoolExecutor; None defaults to the max number of machine processes.

  • chunksize – Units of work per executor, as passed to the Thread- or ProcessPoolExecutor.

  • use_threads – Use the ThreadPoolExecutor instead of the ProcessPoolExecutor.

Series.iter_group_items(*, axis).map_all(mapping, *, dtype, name)
iter_group_items
IterNodeDelegate.map_all(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, an Exception is raised. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_group_items(*, axis).map_all_iter(mapping)
iter_group_items
IterNodeDelegate.map_all_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_group_items(*, axis).map_all_iter_items(mapping)
iter_group_items
IterNodeDelegate.map_all_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_group_items(*, axis).map_any(mapping, *, dtype, name)
iter_group_items
IterNodeDelegate.map_any(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_group_items(*, axis).map_any_iter(mapping)
iter_group_items
IterNodeDelegate.map_any_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_group_items(*, axis).map_any_iter_items(mapping)
iter_group_items
IterNodeDelegate.map_any_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_group_items(*, axis).map_fill(mapping, *, fill_value, dtype, name)
iter_group_items
IterNodeDelegate.map_fill(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the fill_value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_group_items(*, axis).map_fill_iter(mapping, *, fill_value)
iter_group_items
IterNodeDelegate.map_fill_iter(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Any][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting values.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Series.iter_group_items(*, axis).map_fill_iter_items(mapping, *, fill_value)
iter_group_items
IterNodeDelegate.map_fill_iter_items(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting key, value pairs.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Series.iter_group_labels(depth_level)
iter_group_labels
Series.iter_group_labels(depth_level).apply(func, *, dtype, name)
iter_group_labels
IterNodeDelegate.apply(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a function to each value. Returns a new container.

Parameters
  • func – A function that takes a value.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_group_labels(depth_level).apply_iter(func)
iter_group_labels
IterNodeDelegate.apply_iter(func: Callable[[], Any])Iterator[Any][source]

Apply a function to each value. A generator of resulting values.

Parameters

func – A function that takes a value.

Series.iter_group_labels(depth_level).apply_iter_items(func)
iter_group_labels
IterNodeDelegate.apply_iter_items(func: Callable[[], Any])Iterator[Tuple[Any, Any]][source]

Apply a function to each value. A generator of resulting key, value pairs.

Parameters

func – A function that takes a value.

Series.iter_group_labels(depth_level).apply_pool(func, *, dtype, name, max_workers, chunksize, use_threads)
iter_group_labels
IterNodeDelegate.apply_pool(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, max_workers: Optional[int] = None, chunksize: int = 1, use_threads: bool = False)FrameOrSeries[source]

Apply a function to each value. Employ parallel processing with either the ProcessPoolExecutor or ThreadPoolExecutor.

Parameters
  • func – A function that takes a value.

  • *

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

  • name – A hashable object to label the container.

  • max_workers – Number of parallel executors, as passed to the Thread- or ProcessPoolExecutor; None defaults to the max number of machine processes.

  • chunksize – Units of work per executor, as passed to the Thread- or ProcessPoolExecutor.

  • use_threads – Use the ThreadPoolExecutor instead of the ProcessPoolExecutor.

Series.iter_group_labels(depth_level).map_all(mapping, *, dtype, name)
iter_group_labels
IterNodeDelegate.map_all(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, an Exception is raised. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_group_labels(depth_level).map_all_iter(mapping)
iter_group_labels
IterNodeDelegate.map_all_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_group_labels(depth_level).map_all_iter_items(mapping)
iter_group_labels
IterNodeDelegate.map_all_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_group_labels(depth_level).map_any(mapping, *, dtype, name)
iter_group_labels
IterNodeDelegate.map_any(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_group_labels(depth_level).map_any_iter(mapping)
iter_group_labels
IterNodeDelegate.map_any_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_group_labels(depth_level).map_any_iter_items(mapping)
iter_group_labels
IterNodeDelegate.map_any_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_group_labels(depth_level).map_fill(mapping, *, fill_value, dtype, name)
iter_group_labels
IterNodeDelegate.map_fill(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the fill_value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_group_labels(depth_level).map_fill_iter(mapping, *, fill_value)
iter_group_labels
IterNodeDelegate.map_fill_iter(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Any][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting values.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Series.iter_group_labels(depth_level).map_fill_iter_items(mapping, *, fill_value)
iter_group_labels
IterNodeDelegate.map_fill_iter_items(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting key, value pairs.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Series.iter_group_labels_items(depth_level)
iter_group_labels_items
Series.iter_group_labels_items(depth_level).apply(func, *, dtype, name)
iter_group_labels_items
IterNodeDelegate.apply(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a function to each value. Returns a new container.

Parameters
  • func – A function that takes a value.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_group_labels_items(depth_level).apply_iter(func)
iter_group_labels_items
IterNodeDelegate.apply_iter(func: Callable[[], Any])Iterator[Any][source]

Apply a function to each value. A generator of resulting values.

Parameters

func – A function that takes a value.

Series.iter_group_labels_items(depth_level).apply_iter_items(func)
iter_group_labels_items
IterNodeDelegate.apply_iter_items(func: Callable[[], Any])Iterator[Tuple[Any, Any]][source]

Apply a function to each value. A generator of resulting key, value pairs.

Parameters

func – A function that takes a value.

Series.iter_group_labels_items(depth_level).apply_pool(func, *, dtype, name, max_workers, chunksize, use_threads)
iter_group_labels_items
IterNodeDelegate.apply_pool(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, max_workers: Optional[int] = None, chunksize: int = 1, use_threads: bool = False)FrameOrSeries[source]

Apply a function to each value. Employ parallel processing with either the ProcessPoolExecutor or ThreadPoolExecutor.

Parameters
  • func – A function that takes a value.

  • *

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

  • name – A hashable object to label the container.

  • max_workers – Number of parallel executors, as passed to the Thread- or ProcessPoolExecutor; None defaults to the max number of machine processes.

  • chunksize – Units of work per executor, as passed to the Thread- or ProcessPoolExecutor.

  • use_threads – Use the ThreadPoolExecutor instead of the ProcessPoolExecutor.

Series.iter_group_labels_items(depth_level).map_all(mapping, *, dtype, name)
iter_group_labels_items
IterNodeDelegate.map_all(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, an Exception is raised. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_group_labels_items(depth_level).map_all_iter(mapping)
iter_group_labels_items
IterNodeDelegate.map_all_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_group_labels_items(depth_level).map_all_iter_items(mapping)
iter_group_labels_items
IterNodeDelegate.map_all_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_group_labels_items(depth_level).map_any(mapping, *, dtype, name)
iter_group_labels_items
IterNodeDelegate.map_any(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_group_labels_items(depth_level).map_any_iter(mapping)
iter_group_labels_items
IterNodeDelegate.map_any_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_group_labels_items(depth_level).map_any_iter_items(mapping)
iter_group_labels_items
IterNodeDelegate.map_any_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_group_labels_items(depth_level).map_fill(mapping, *, fill_value, dtype, name)
iter_group_labels_items
IterNodeDelegate.map_fill(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the fill_value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_group_labels_items(depth_level).map_fill_iter(mapping, *, fill_value)
iter_group_labels_items
IterNodeDelegate.map_fill_iter(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Any][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting values.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Series.iter_group_labels_items(depth_level).map_fill_iter_items(mapping, *, fill_value)
iter_group_labels_items
IterNodeDelegate.map_fill_iter_items(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting key, value pairs.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Series.iter_window(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment)
iter_window
Series.iter_window(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).apply(func, *, dtype, name)
iter_window
IterNodeDelegate.apply(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a function to each value. Returns a new container.

Parameters
  • func – A function that takes a value.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_window(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).apply_iter(func)
iter_window
IterNodeDelegate.apply_iter(func: Callable[[], Any])Iterator[Any][source]

Apply a function to each value. A generator of resulting values.

Parameters

func – A function that takes a value.

Series.iter_window(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).apply_iter_items(func)
iter_window
IterNodeDelegate.apply_iter_items(func: Callable[[], Any])Iterator[Tuple[Any, Any]][source]

Apply a function to each value. A generator of resulting key, value pairs.

Parameters

func – A function that takes a value.

Series.iter_window(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).apply_pool(func, *, dtype, name, max_workers, chunksize, use_threads)
iter_window
IterNodeDelegate.apply_pool(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, max_workers: Optional[int] = None, chunksize: int = 1, use_threads: bool = False)FrameOrSeries[source]

Apply a function to each value. Employ parallel processing with either the ProcessPoolExecutor or ThreadPoolExecutor.

Parameters
  • func – A function that takes a value.

  • *

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

  • name – A hashable object to label the container.

  • max_workers – Number of parallel executors, as passed to the Thread- or ProcessPoolExecutor; None defaults to the max number of machine processes.

  • chunksize – Units of work per executor, as passed to the Thread- or ProcessPoolExecutor.

  • use_threads – Use the ThreadPoolExecutor instead of the ProcessPoolExecutor.

Series.iter_window(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_all(mapping, *, dtype, name)
iter_window
IterNodeDelegate.map_all(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, an Exception is raised. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_window(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_all_iter(mapping)
iter_window
IterNodeDelegate.map_all_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_window(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_all_iter_items(mapping)
iter_window
IterNodeDelegate.map_all_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_window(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_any(mapping, *, dtype, name)
iter_window
IterNodeDelegate.map_any(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_window(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_any_iter(mapping)
iter_window
IterNodeDelegate.map_any_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_window(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_any_iter_items(mapping)
iter_window
IterNodeDelegate.map_any_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_window(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_fill(mapping, *, fill_value, dtype, name)
iter_window
IterNodeDelegate.map_fill(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the fill_value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_window(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_fill_iter(mapping, *, fill_value)
iter_window
IterNodeDelegate.map_fill_iter(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Any][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting values.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Series.iter_window(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_fill_iter_items(mapping, *, fill_value)
iter_window
IterNodeDelegate.map_fill_iter_items(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting key, value pairs.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Series.iter_window_array(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment)
iter_window_array
Series.iter_window_array(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).apply(func, *, dtype, name)
iter_window_array
IterNodeDelegate.apply(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a function to each value. Returns a new container.

Parameters
  • func – A function that takes a value.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_window_array(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).apply_iter(func)
iter_window_array
IterNodeDelegate.apply_iter(func: Callable[[], Any])Iterator[Any][source]

Apply a function to each value. A generator of resulting values.

Parameters

func – A function that takes a value.

Series.iter_window_array(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).apply_iter_items(func)
iter_window_array
IterNodeDelegate.apply_iter_items(func: Callable[[], Any])Iterator[Tuple[Any, Any]][source]

Apply a function to each value. A generator of resulting key, value pairs.

Parameters

func – A function that takes a value.

Series.iter_window_array(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).apply_pool(func, *, dtype, name, max_workers, chunksize, use_threads)
iter_window_array
IterNodeDelegate.apply_pool(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, max_workers: Optional[int] = None, chunksize: int = 1, use_threads: bool = False)FrameOrSeries[source]

Apply a function to each value. Employ parallel processing with either the ProcessPoolExecutor or ThreadPoolExecutor.

Parameters
  • func – A function that takes a value.

  • *

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

  • name – A hashable object to label the container.

  • max_workers – Number of parallel executors, as passed to the Thread- or ProcessPoolExecutor; None defaults to the max number of machine processes.

  • chunksize – Units of work per executor, as passed to the Thread- or ProcessPoolExecutor.

  • use_threads – Use the ThreadPoolExecutor instead of the ProcessPoolExecutor.

Series.iter_window_array(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_all(mapping, *, dtype, name)
iter_window_array
IterNodeDelegate.map_all(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, an Exception is raised. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_window_array(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_all_iter(mapping)
iter_window_array
IterNodeDelegate.map_all_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_window_array(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_all_iter_items(mapping)
iter_window_array
IterNodeDelegate.map_all_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_window_array(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_any(mapping, *, dtype, name)
iter_window_array
IterNodeDelegate.map_any(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_window_array(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_any_iter(mapping)
iter_window_array
IterNodeDelegate.map_any_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_window_array(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_any_iter_items(mapping)
iter_window_array
IterNodeDelegate.map_any_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_window_array(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_fill(mapping, *, fill_value, dtype, name)
iter_window_array
IterNodeDelegate.map_fill(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the fill_value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_window_array(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_fill_iter(mapping, *, fill_value)
iter_window_array
IterNodeDelegate.map_fill_iter(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Any][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting values.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Series.iter_window_array(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_fill_iter_items(mapping, *, fill_value)
iter_window_array
IterNodeDelegate.map_fill_iter_items(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting key, value pairs.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Series.iter_window_array_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment)
iter_window_array_items
Series.iter_window_array_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).apply(func, *, dtype, name)
iter_window_array_items
IterNodeDelegate.apply(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a function to each value. Returns a new container.

Parameters
  • func – A function that takes a value.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_window_array_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).apply_iter(func)
iter_window_array_items
IterNodeDelegate.apply_iter(func: Callable[[], Any])Iterator[Any][source]

Apply a function to each value. A generator of resulting values.

Parameters

func – A function that takes a value.

Series.iter_window_array_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).apply_iter_items(func)
iter_window_array_items
IterNodeDelegate.apply_iter_items(func: Callable[[], Any])Iterator[Tuple[Any, Any]][source]

Apply a function to each value. A generator of resulting key, value pairs.

Parameters

func – A function that takes a value.

Series.iter_window_array_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).apply_pool(func, *, dtype, name, max_workers, chunksize, use_threads)
iter_window_array_items
IterNodeDelegate.apply_pool(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, max_workers: Optional[int] = None, chunksize: int = 1, use_threads: bool = False)FrameOrSeries[source]

Apply a function to each value. Employ parallel processing with either the ProcessPoolExecutor or ThreadPoolExecutor.

Parameters
  • func – A function that takes a value.

  • *

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

  • name – A hashable object to label the container.

  • max_workers – Number of parallel executors, as passed to the Thread- or ProcessPoolExecutor; None defaults to the max number of machine processes.

  • chunksize – Units of work per executor, as passed to the Thread- or ProcessPoolExecutor.

  • use_threads – Use the ThreadPoolExecutor instead of the ProcessPoolExecutor.

Series.iter_window_array_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_all(mapping, *, dtype, name)
iter_window_array_items
IterNodeDelegate.map_all(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, an Exception is raised. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_window_array_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_all_iter(mapping)
iter_window_array_items
IterNodeDelegate.map_all_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_window_array_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_all_iter_items(mapping)
iter_window_array_items
IterNodeDelegate.map_all_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_window_array_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_any(mapping, *, dtype, name)
iter_window_array_items
IterNodeDelegate.map_any(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_window_array_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_any_iter(mapping)
iter_window_array_items
IterNodeDelegate.map_any_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_window_array_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_any_iter_items(mapping)
iter_window_array_items
IterNodeDelegate.map_any_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_window_array_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_fill(mapping, *, fill_value, dtype, name)
iter_window_array_items
IterNodeDelegate.map_fill(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the fill_value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_window_array_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_fill_iter(mapping, *, fill_value)
iter_window_array_items
IterNodeDelegate.map_fill_iter(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Any][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting values.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Series.iter_window_array_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_fill_iter_items(mapping, *, fill_value)
iter_window_array_items
IterNodeDelegate.map_fill_iter_items(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting key, value pairs.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Series.iter_window_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment)
iter_window_items
Series.iter_window_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).apply(func, *, dtype, name)
iter_window_items
IterNodeDelegate.apply(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a function to each value. Returns a new container.

Parameters
  • func – A function that takes a value.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_window_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).apply_iter(func)
iter_window_items
IterNodeDelegate.apply_iter(func: Callable[[], Any])Iterator[Any][source]

Apply a function to each value. A generator of resulting values.

Parameters

func – A function that takes a value.

Series.iter_window_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).apply_iter_items(func)
iter_window_items
IterNodeDelegate.apply_iter_items(func: Callable[[], Any])Iterator[Tuple[Any, Any]][source]

Apply a function to each value. A generator of resulting key, value pairs.

Parameters

func – A function that takes a value.

Series.iter_window_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).apply_pool(func, *, dtype, name, max_workers, chunksize, use_threads)
iter_window_items
IterNodeDelegate.apply_pool(func: Callable[[], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, max_workers: Optional[int] = None, chunksize: int = 1, use_threads: bool = False)FrameOrSeries[source]

Apply a function to each value. Employ parallel processing with either the ProcessPoolExecutor or ThreadPoolExecutor.

Parameters
  • func – A function that takes a value.

  • *

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

  • name – A hashable object to label the container.

  • max_workers – Number of parallel executors, as passed to the Thread- or ProcessPoolExecutor; None defaults to the max number of machine processes.

  • chunksize – Units of work per executor, as passed to the Thread- or ProcessPoolExecutor.

  • use_threads – Use the ThreadPoolExecutor instead of the ProcessPoolExecutor.

Series.iter_window_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_all(mapping, *, dtype, name)
iter_window_items
IterNodeDelegate.map_all(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, an Exception is raised. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_window_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_all_iter(mapping)
iter_window_items
IterNodeDelegate.map_all_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_window_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_all_iter_items(mapping)
iter_window_items
IterNodeDelegate.map_all_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, an Exception is raised. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_window_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_any(mapping, *, dtype, name)
iter_window_items
IterNodeDelegate.map_any(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_window_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_any_iter(mapping)
iter_window_items
IterNodeDelegate.map_any_iter(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Any][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting values.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_window_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_any_iter_items(mapping)
iter_window_items
IterNodeDelegate.map_any_iter_items(mapping: Union[Mapping[Hashable, Any], Series])Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the value is returned. A generator of resulting key, value pairs.

Parameters

mapping – A mapping type, such as a dictionary or Series.

Series.iter_window_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_fill(mapping, *, fill_value, dtype, name)
iter_window_items
IterNodeDelegate.map_fill(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None)FrameOrSeries[source]

Apply a mapping; for values not in the mapping, the fill_value is returned. Returns a new container.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

Series.iter_window_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_fill_iter(mapping, *, fill_value)
iter_window_items
IterNodeDelegate.map_fill_iter(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Any][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting values.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Series.iter_window_items(*, size, axis, step, window_sized, window_func, window_valid, label_shift, start_shift, size_increment).map_fill_iter_items(mapping, *, fill_value)
iter_window_items
IterNodeDelegate.map_fill_iter_items(mapping: Union[Mapping[Hashable, Any], Series], *, fill_value: Any = nan)Iterator[Tuple[Any, Any]][source]

Apply a mapping; for values not in the mapping, the fill_value is returned. A generator of resulting key, value pairs.

Parameters
  • mapping – A mapping type, such as a dictionary or Series.

  • fill_value – Value to be returned if the values is not a key in the mapping.

Series: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String

Series: Operator Binary

Overview: Series: Operator Binary

Series.__add__(other: Any)Any
Series.__and__(other: Any)Any
Series.__eq__(other: Any)Any

Return self==value.

>>> s1 = sf.Series((1, 2), index=('Earth', 'Mars'))
>>> s2 = sf.Series((2, 0), index=('Mars', 'Mercury'))

>>> s1 == s2
<Series>
<Index>
Earth    False
Mars     True
Mercury  False
<<U7>    <bool>

Series.__floordiv__(other: Any)Any
Series.__ge__(other: Any)Any

Return self>=value.

Series.__gt__(other: Any)Any

Return self>value.

>>> s = sf.Series.from_items((('Venus', 108.2), ('Earth', 149.6), ('Saturn', 1433.5)))
>>> s > s['Earth']
<Series>
<Index>
Venus    False
Earth    False
Saturn   True
<<U6>    <bool>

Series.__le__(other: Any)Any

Return self<=value.

Series.__lt__(other: Any)Any

Return self<value.

Series.__matmul__(other: Any)Any
Series.__mod__(other: Any)Any
Series.__mul__(other: Any)Any
>>> s1 = sf.Series((1, 2), index=('Earth', 'Mars'))
>>> s2 = sf.Series((2, 0), index=('Mars', 'Mercury'))
>>> s1 * s2
<Series>
<Index>
Earth    nan
Mars     4.0
Mercury  nan
<<U7>    <float64>

Series.__ne__(other: Any)Any

Return self!=value.

Series.__or__(other: Any)Any
Series.__pow__(other: Any)Any
Series.__radd__(other: Any)Any
Series.__rfloordiv__(other: Any)Any
Series.__rmatmul__(other: Any)Any
Series.__rmul__(other: Any)Any
Series.__rshift__(other: Any)Any
Series.__rsub__(other: Any)Any
Series.__rtruediv__(other: Any)Any
Series.__sub__(other: Any)Any
>>> s = sf.Series.from_items((('Venus', 108.2), ('Earth', 149.6), ('Saturn', 1433.5)))
>>> s
<Series>
<Index>
Venus    108.2
Earth    149.6
Saturn   1433.5
<<U6>    <float64>

>>> abs(s - s['Earth'])
<Series>
<Index>
Venus    41.39999999999999
Earth    0.0
Saturn   1283.9
<<U6>    <float64>

Series.__truediv__(other: Any)Any
>>> s = sf.Series.from_items((('Venus', 108.2), ('Earth', 149.6), ('Saturn', 1433.5)))

>>> s / s['Earth']
<Series>
<Index>
Venus    0.7232620320855615
Earth    1.0
Saturn   9.582219251336898
<<U6>    <float64>

Series.__xor__(other: Any)Any

Series: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String

Series: Operator Unary

Overview: Series: Operator Unary

Series.__abs__()static_frame.core.container.ContainerOperand
Series.__invert__()static_frame.core.container.ContainerOperand
Series.__neg__()static_frame.core.container.ContainerOperand
Series.__pos__()static_frame.core.container.ContainerOperand

Series: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String

Series: Accessor Datetime

Overview: Series: Accessor Datetime

Series.via_dt.year
Series.via_dt

Interface for applying datetime properties and methods to elements in this container.

InterfaceDatetime.year

Return the year of each element.

>>> s = sf.Series.from_dict({'Halley': '1986-02-09', 'Encke': '2003-12-28', "d'Arrest": '2008-08-01', 'Tempel 1': '2005-07-05'}, name='Perihelion Date', dtype=np.datetime64)

>>> s
<Series: Perihelion Date>
<Index>
Halley                    1986-02-09
Encke                     2003-12-28
d'Arrest                  2008-08-01
Tempel 1                  2005-07-05
<<U8>                     <datetime64[D]>
>>> s.via_dt.year
<Series: Perihelion Date>
<Index>
Halley                    1986
Encke                     2003
d'Arrest                  2008
Tempel 1                  2005
<<U8>                     <int64>

Series.via_dt.month
Series.via_dt

Interface for applying datetime properties and methods to elements in this container.

InterfaceDatetime.month

Return the month of each element, between 1 and 12 inclusive.

>>> s = sf.Series.from_dict({'Halley': '1986-02-09', 'Encke': '2003-12-28', "d'Arrest": '2008-08-01', 'Tempel 1': '2005-07-05'}, name='Perihelion Date', dtype=np.datetime64)

>>> s
<Series: Perihelion Date>
<Index>
Halley                    1986-02-09
Encke                     2003-12-28
d'Arrest                  2008-08-01
Tempel 1                  2005-07-05
<<U8>                     <datetime64[D]>
>>> s.via_dt.month
<Series: Perihelion Date>
<Index>
Halley                    2
Encke                     12
d'Arrest                  8
Tempel 1                  7
<<U8>                     <int64>

Series.via_dt.day
Series.via_dt

Interface for applying datetime properties and methods to elements in this container.

InterfaceDatetime.day

Return the day of each element, between 1 and the number of days in the given month of the given year.

>>> s = sf.Series.from_dict({'Halley': '1986-02-09', 'Encke': '2003-12-28', "d'Arrest": '2008-08-01', 'Tempel 1': '2005-07-05'}, name='Perihelion Date', dtype=np.datetime64)

>>> s
<Series: Perihelion Date>
<Index>
Halley                    1986-02-09
Encke                     2003-12-28
d'Arrest                  2008-08-01
Tempel 1                  2005-07-05
<<U8>                     <datetime64[D]>
>>> s.via_dt.day
<Series: Perihelion Date>
<Index>
Halley                    9
Encke                     28
d'Arrest                  1
Tempel 1                  5
<<U8>                     <int64>

Series.via_dt.weekday
Series.via_dt

Interface for applying datetime properties and methods to elements in this container.

InterfaceDatetime.weekday()TContainer[source]

Return the day of the week as an integer, where Monday is 0 and Sunday is 6.

>>> s = sf.Series.from_dict({'Halley': '1986-02-09', 'Encke': '2003-12-28', "d'Arrest": '2008-08-01', 'Tempel 1': '2005-07-05'}, name='Perihelion Date', dtype=np.datetime64)
>>> s
<Series: Perihelion Date>
<Index>
Halley                    1986-02-09
Encke                     2003-12-28
d'Arrest                  2008-08-01
Tempel 1                  2005-07-05
<<U8>                     <datetime64[D]>
>>> s.via_dt.weekday()
<Series: Perihelion Date>
<Index>
Halley                    6
Encke                     6
d'Arrest                  4
Tempel 1                  1
<<U8>                     <int64>

Series.via_dt.timetuple
Series.via_dt

Interface for applying datetime properties and methods to elements in this container.

InterfaceDatetime.timetuple()TContainer[source]

Return a time.struct_time such as returned by time.localtime().

Series.via_dt.fromisoformat
Series.via_dt

Interface for applying datetime properties and methods to elements in this container.

InterfaceDatetime.fromisoformat()TContainer[source]

Return a datetime.date object from an ISO 8601 format.

Series.via_dt.isoformat(sep, timespec)
Series.via_dt

Interface for applying datetime properties and methods to elements in this container.

InterfaceDatetime.isoformat(sep: str = 'T', timespec: str = 'auto')TContainer[source]

Return a string representing the date in ISO 8601 format, YYYY-MM-DD.

>>> s = sf.Series.from_dict({'Halley': '1986-02-09', 'Encke': '2003-12-28', "d'Arrest": '2008-08-01', 'Tempel 1': '2005-07-05'}, name='Perihelion Date', dtype=np.datetime64)
>>> s
<Series: Perihelion Date>
<Index>
Halley                    1986-02-09
Encke                     2003-12-28
d'Arrest                  2008-08-01
Tempel 1                  2005-07-05
<<U8>                     <datetime64[D]>
>>> s.via_dt.isoformat()
<Series: Perihelion Date>
<Index>
Halley                    1986-02-09
Encke                     2003-12-28
d'Arrest                  2008-08-01
Tempel 1                  2005-07-05
<<U8>                     <<U10>

Series.via_dt.strftime(format)
Series.via_dt

Interface for applying datetime properties and methods to elements in this container.

InterfaceDatetime.strftime(format: str)TContainer[source]

Return a string representing the date, controlled by an explicit format string.

>>> s = sf.Series.from_dict({'Halley': '1986-02-09', 'Encke': '2003-12-28', "d'Arrest": '2008-08-01', 'Tempel 1': '2005-07-05'}, name='Perihelion Date', dtype=np.datetime64)
>>> s
<Series: Perihelion Date>
<Index>
Halley                    1986-02-09
Encke                     2003-12-28
d'Arrest                  2008-08-01
Tempel 1                  2005-07-05
<<U8>                     <datetime64[D]>
>>> s.via_dt.strftime('%m/%d/%y')
<Series: Perihelion Date>
<Index>
Halley                    02/09/86
Encke                     12/28/03
d'Arrest                  08/01/08
Tempel 1                  07/05/05
<<U8>                     <<U8>

Series.via_dt.strptime(format)
Series.via_dt

Interface for applying datetime properties and methods to elements in this container.

InterfaceDatetime.strptime(format: str)TContainer[source]

Return a Python datetime object from parsing a string defined with format.

Series.via_dt.strpdate(format)
Series.via_dt

Interface for applying datetime properties and methods to elements in this container.

InterfaceDatetime.strpdate(format: str)TContainer[source]

Return a Python date object from parsing a string defined with format.

Series: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String

Series: Accessor String

Overview: Series: Accessor String

Series.via_str.capitalize
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.capitalize()TContainer[source]

Return a container with only the first character of each element capitalized.

>>> s = sf.Series(('lepton', 'lepton', 'quark'), index=('muon', 'tau', 'strange'))
>>> s.via_str.capitalize()
<Series>
<Index>
muon     Lepton
tau      Lepton
strange  Quark
<<U7>    <<U6>

Series.via_str.center(width, fillchar)
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.center(width: int, fillchar: str = ' ')TContainer[source]

Return a container with its elements centered in a string of length width.

>>> s = sf.Series(('lepton', 'lepton', 'quark'), index=('muon', 'tau', 'strange'))
>>> s.via_str.center(20, '-')
<Series>
<Index>
muon     -------lepton-------
tau      -------lepton-------
strange  -------quark--------
<<U7>    <<U20>

Series.via_str.count(sub, start, end)
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.count(sub: str, start: Optional[int] = None, end: Optional[int] = None)TContainer[source]

Returns a container with the number of non-overlapping occurrences of substring sub in the optional range start, end.

Series.via_str.decode(encoding, errors)
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.decode(encoding: Optional[str] = None, errors: Optional[str] = None)TContainer[source]

Apply str.decode() to each element. Elements must be bytes.

Series.via_str.encode(encoding, errors)
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.encode(encoding: Optional[str] = None, errors: Optional[str] = None)TContainer[source]

Apply str.encode() to each element. Elements must be strings.

Series.via_str.endswith(suffix, start, end)
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.endswith(suffix: Union[str, Iterable[str]], start: Optional[int] = None, end: Optional[int] = None)TContainer[source]

Returns a container with the number of non-overlapping occurrences of substring suffix (or an interable of suffixes) in the optional range start, end.

>>> s = sf.Series(('lepton', 'lepton', 'quark'), index=('muon', 'tau', 'strange'))
>>> s.via_str.endswith('ton')
<Series>
<Index>
muon     True
tau      True
strange  False
<<U7>    <bool>

Series.via_str.find(sub, start, end)
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.find(sub: str, start: Optional[int] = None, end: Optional[int] = None)TContainer[source]

For each element, return the lowest index in the string where substring sub is found.

Series.via_str.index(sub, start, end)
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.index(sub: str, start: Optional[int] = None, end: Optional[int] = None)TContainer[source]

Like find, but raises ValueError when the substring is not found.

Series.via_str.isalnum
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.isalnum()TContainer[source]

Returns true for each element if all characters in the string are alphanumeric and there is at least one character, false otherwise.

Series.via_str.isalpha
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.isalpha()TContainer[source]

Returns true for each element if all characters in the string are alphabetic and there is at least one character, false otherwise.

Series.via_str.isdecimal
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.isdecimal()TContainer[source]

For each element, return True if there are only decimal characters in the element.

Series.via_str.isdigit
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.isdigit()TContainer[source]

Returns true for each element if all characters in the string are digits and there is at least one character, false otherwise.

>>> s = sf.Series(('lepton', 'lepton', 'quark'), index=('muon', 'tau', 'strange'))
>>> s.via_str.isdigit()
<Series>
<Index>
muon     False
tau      False
strange  False
<<U7>    <bool>

Series.via_str.islower
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.islower()TContainer[source]

Returns true for each element if all cased characters in the string are lowercase and there is at least one cased character, false otherwise.

>>> s = sf.Series(('lepton', 'lepton', 'quark'), index=('muon', 'tau', 'strange'))
>>> s.via_str.islower()
<Series>
<Index>
muon     True
tau      True
strange  True
<<U7>    <bool>

Series.via_str.isnumeric
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.isnumeric()TContainer[source]

For each element in self, return True if there are only numeric characters in the element.

Series.via_str.isspace
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.isspace()TContainer[source]

Returns true for each element if there are only whitespace characters in the string and there is at least one character, false otherwise.

Series.via_str.istitle
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.istitle()TContainer[source]

Returns true for each element if the element is a titlecased string and there is at least one character, false otherwise.

Series.via_str.isupper
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.isupper()TContainer[source]

Returns true for each element if all cased characters in the string are uppercase and there is at least one character, false otherwise.

>>> s = sf.Series(('lepton', 'lepton', 'quark'), index=('muon', 'tau', 'strange'))
>>> s.via_str.isupper()
<Series>
<Index>
muon     False
tau      False
strange  False
<<U7>    <bool>

Series.via_str.ljust(width, fillchar)
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.ljust(width: int, fillchar: str = ' ')TContainer[source]

Return a container with its elements ljusted in a string of length width.

>>> s = sf.Series(('lepton', 'lepton', 'quark'), index=('muon', 'tau', 'strange'))
>>> s.via_str.ljust(10, '-')
<Series>
<Index>
muon     lepton----
tau      lepton----
strange  quark-----
<<U7>    <<U10>

Series.via_str.len
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.len()TContainer[source]

Return the length of the string.

Series.via_str.lower
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.lower()TContainer[source]

Return an array with the elements of self converted to lowercase.

Series.via_str.lstrip(chars)
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.lstrip(chars: Optional[str] = None)TContainer[source]

For each element, return a copy with the leading characters removed.

Series.via_str.partition(sep)
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.partition(sep: str)TContainer[source]

Partition each element around sep.

Series.via_str.replace(old, new, count)
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.replace(old: str, new: str, count: Optional[int] = None)TContainer[source]

Return a container with its elements replaced in a string of length width.

Series.via_str.rfind(sub, start, end)
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.rfind(sub: str, start: Optional[int] = None, end: Optional[int] = None)TContainer[source]

For each element, return the highest index in the string where substring sub is found, such that sub is contained within start, end.

Series.via_str.rindex(sub, start, end)
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.rindex(sub: str, start: Optional[int] = None, end: Optional[int] = None)TContainer[source]

Like rfind, but raises ValueError when the substring sub is not found.

Series.via_str.rjust(width, fillchar)
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.rjust(width: int, fillchar: str = ' ')TContainer[source]

Return a container with its elements rjusted in a string of length width.

>>> s = sf.Series(('lepton', 'lepton', 'quark'), index=('muon', 'tau', 'strange'))
>>> s.via_str.rjust(10, '-')
<Series>
<Index>
muon     ----lepton
tau      ----lepton
strange  -----quark
<<U7>    <<U10>

Series.via_str.rpartition(sep)
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.rpartition(sep: str)TContainer[source]

Partition (split) each element around the right-most separator.

Series.via_str.rsplit(sep, maxsplit)
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.rsplit(sep: str, maxsplit: int = - 1)TContainer[source]

For each element, return a tuple of the words in the string, using sep as the delimiter string.

Series.via_str.rstrip(chars)
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.rstrip(chars: Optional[str] = None)TContainer[source]

For each element, return a copy with the trailing characters removed.

Series.via_str.split(sep, maxsplit)
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.split(sep: str, maxsplit: int = - 1)TContainer[source]

For each element, return a tuple of the words in the string, using sep as the delimiter string.

Series.via_str.startswith(prefix, start, end)
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.startswith(prefix: Union[str, Iterable[str]], start: Optional[int] = None, end: Optional[int] = None)TContainer[source]

Returns a container with the number of non-overlapping occurrences of substring prefix (or an interable of prefixes) in the optional range start, end.

>>> s = sf.Series(('lepton', 'lepton', 'quark'), index=('muon', 'tau', 'strange'))
>>> s.via_str.startswith('lep')
<Series>
<Index>
muon     True
tau      True
strange  False
<<U7>    <bool>

Series.via_str.strip(chars)
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.strip(chars: Optional[str] = None)TContainer[source]

For each element, return a copy with the leading and trailing characters removed.

Series.via_str.swapcase
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.swapcase()TContainer[source]

Return a container with uppercase characters converted to lowercase and vice versa.

Series.via_str.title
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.title()TContainer[source]

Return a container with uppercase characters converted to lowercase and vice versa.

>>> s.via_str.title()
<Series>
<Index>
muon     Lepton
tau      Lepton
strange  Quark
<<U7>    <<U6>

Series.via_str.upper
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.upper()TContainer[source]

Return a container with uppercase characters converted to lowercase and vice versa.

>>> s = sf.Series(('lepton', 'lepton', 'quark'), index=('muon', 'tau', 'strange'))
>>> s.via_str.upper()
<Series>
<Index>
muon     LEPTON
tau      LEPTON
strange  QUARK
<<U7>    <<U6>

Series.via_str.zfill(width)
Series.via_str

Interface for applying string methods to elements in this container.

InterfaceString.zfill(width: int)TContainer[source]

Return the string left-filled with zeros.

Series: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String