FrameGO¶
Overview: FrameGO
- class FrameGO(data: Union[Iterable[Iterable[Any]], numpy.ndarray] = <object object>, *, index: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]], Type[static_frame.core.index_auto.IndexAutoFactory]]] = None, columns: 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>, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, columns_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, own_data: bool = False, own_index: bool = False, own_columns: bool = False)[source]¶
A grow-only Frame, providing a two-dimensional, ordered, labelled container, immutable with grow-only columns.
FrameGO: Constructor¶
Overview: FrameGO: Constructor
- FrameGO.__init__(data: Union[Iterable[Iterable[Any]], numpy.ndarray] = <object object>, *, index: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]], Type[static_frame.core.index_auto.IndexAutoFactory]]] = None, columns: 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>, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, columns_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, own_data: bool = False, own_index: bool = False, own_columns: bool = False) None
Initializer.
- Parameters
data – Default Frame initialization requires typed data such as a NumPy array. All other initialization should use specialized constructors.
index – Optional index initializer. If provided in addition to data values, lengths must be compatible.
columns – Optional column initializer. If provided in addition to data values, lengths must be compatible.
index_constructor –
columns_constructor –
own_data – Flag the data values as ownable by this
static_frame.Frame
. Primarily used by internal clients.own_index – Flag the passed index as ownable by this
static_frame.Frame
. Primarily used by internal clients.own_columns – Flag the passed columns as ownable by this
static_frame.Frame
. Primarily used by internal clients.
>>> f = sf.FrameGO(np.array([[76.1, 0.967], [3.3, 0.847]]), columns=('Period', 'Eccentricity'), index=('Halley', 'Encke'), name='Orbits') >>> f <FrameGO: Orbits> <IndexGO> Period Eccentricity <<U12> <Index> Halley 76.1 0.967 Encke 3.3 0.847 <<U6> <float64> <float64> >>> f['Inclination'] = (162.2, 11.8) >>> f <FrameGO: Orbits> <IndexGO> Period Eccentricity Inclination <<U12> <Index> Halley 76.1 0.967 162.2 Encke 3.3 0.847 11.8 <<U6> <float64> <float64> <float64>
- classmethod FrameGO.from_arrow(value: pyarrow.Table, *, index_depth: int = 0, index_name_depth_level: Optional[Union[int, Iterable[int]]] = None, index_constructors: Union[Callable[[...], IndexBase], None, Sequence[Optional[Callable[[...], IndexBase]]]] = None, columns_depth: int = 1, columns_name_depth_level: Optional[Union[int, Iterable[int]]] = None, columns_constructors: Union[Callable[[...], IndexBase], None, Sequence[Optional[Callable[[...], IndexBase]]]] = None, dtypes: Union[str, numpy.dtype, type, None, Iterable[Optional[Union[str, numpy.dtype, type]]], Dict[Hashable, Optional[Union[str, numpy.dtype, type]]]] = None, name: Hashable = None, consolidate_blocks: bool = False) Frame
Realize a
Frame
from an Arrow Table.- Parameters
value – A
pyarrow.Table
instance.index_depth – integer specification of how many columns to use in forming the index. A value of 0 will select none; a value greater than 1 will create an
IndexHierarchy
.columns_depth – integer specification of how many rows to use in forming the columns. A value of 0 will select none; a value greater than 1 will create an
IndexHierarchy
.dtypes – Optionally provide an iterable of dtypes, equal in length to the length of each row, or a mapping by column name (where overspecied labels is not an error). If a dtype is given as None, element-wise type determination will be used.
name – A hashable object to label the container.
consolidate_blocks – Optionally consolidate adjacent same-typed columns into contiguous arrays.
- Returns
- classmethod FrameGO.from_clipboard(*, delimiter: str = '\t', index_depth: int = 0, index_column_first: Optional[Union[int, str]] = None, index_name_depth_level: Optional[Union[int, Iterable[int]]] = None, index_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None, index_continuation_token: Optional[Hashable] = <object object>, columns_depth: int = 1, columns_name_depth_level: Optional[Union[int, Iterable[int]]] = None, columns_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None, columns_continuation_token: Optional[Hashable] = <object object>, skip_header: int = 0, skip_footer: int = 0, quote_char: str = '"', encoding: Optional[str] = None, dtypes: Union[str, numpy.dtype, type, None, Iterable[Optional[Union[str, numpy.dtype, type]]], Dict[Hashable, Optional[Union[str, numpy.dtype, type]]]] = None, name: Optional[Hashable] = None, consolidate_blocks: bool = False, store_filter: Optional[static_frame.core.store_filter.StoreFilter] = <static_frame.core.store_filter.StoreFilter object>) static_frame.core.frame.Frame
Create a
Frame
from the contents of the clipboard (assuming a table is stored as delimited file).- Returns
- classmethod FrameGO.from_concat(frames: Iterable[Union[static_frame.core.frame.Frame, static_frame.core.series.Series]], *, axis: int = 0, union: bool = True, index: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]], Type[static_frame.core.index_auto.IndexAutoFactory]]] = None, columns: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]], Type[static_frame.core.index_auto.IndexAutoFactory]]] = None, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, columns_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, name: Optional[Hashable] = None, fill_value: object = nan, consolidate_blocks: bool = False) static_frame.core.frame.Frame
Concatenate multiple
Frame
orSeries
into a newFrame
. If index or columns are provided and appropriately sized, the resultingFrame
will use those indices. If the axis along concatenation (index for axis 0, columns for axis 1) is unique after concatenation, it will be preserved; otherwise, a new index or anIndexAutoFactory
must be supplied.- Parameters
frames – Iterable of Frames.
axis – Integer specifying 0 to concatenate supplied Frames vertically (aligning on columns), 1 to concatenate horizontally (aligning on rows).
union – If True, the union of the aligned indices is used; if False, the intersection is used.
index – Optionally specify a new index.
columns – Optionally specify new columns.
index_constructor – Optionally apply a constructor to the derived or passed labels.
columns_constructor – Optionally apply a constructor to the derived or passed labels.
name – A hashable object to label the container.
consolidate_blocks – Optionally consolidate adjacent same-typed columns into contiguous arrays.
- Returns
- classmethod FrameGO.from_concat_items(items: Iterable[Tuple[Hashable, Union[static_frame.core.frame.Frame, static_frame.core.series.Series]]], *, axis: int = 0, union: bool = True, name: Optional[Hashable] = None, fill_value: object = nan, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, columns_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, consolidate_blocks: bool = False) static_frame.core.frame.Frame
Produce a
Frame
with a hierarchical index from an iterable of pairs of labels,Frame
. TheIndexHierarchy
is formed from the provided labels and theIndex
if eachFrame
.- Parameters
items – Iterable of pairs of label,
Frame
axis –
union –
name –
fill_value –
index_constructor –
columns_constructor –
consolidate_blocks –
- classmethod FrameGO.from_csv(fp: Union[str, os.PathLike, TextIO, Iterator[str]], *, index_depth: int = 0, index_column_first: Optional[Union[int, str]] = None, index_name_depth_level: Optional[Union[int, Iterable[int]]] = None, index_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None, index_continuation_token: Optional[Hashable] = <object object>, columns_depth: int = 1, columns_name_depth_level: Optional[Union[int, Iterable[int]]] = None, columns_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None, columns_continuation_token: Optional[Hashable] = <object object>, skip_header: int = 0, skip_footer: int = 0, quote_char: str = '"', encoding: Optional[str] = None, dtypes: Union[str, numpy.dtype, type, None, Iterable[Optional[Union[str, numpy.dtype, type]]], Dict[Hashable, Optional[Union[str, numpy.dtype, type]]]] = None, name: Optional[Hashable] = None, consolidate_blocks: bool = False, store_filter: Optional[static_frame.core.store_filter.StoreFilter] = <static_frame.core.store_filter.StoreFilter object>) static_frame.core.frame.Frame
Specialized version of
Frame.from_delimited
for CSV files.- Returns
- classmethod FrameGO.from_delimited(fp: Union[str, os.PathLike, TextIO, Iterator[str]], *, delimiter: str, index_depth: int = 0, index_column_first: Optional[Union[int, str]] = None, index_name_depth_level: Optional[Union[int, Iterable[int]]] = None, index_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None, index_continuation_token: Optional[Hashable] = <object object>, columns_depth: int = 1, columns_name_depth_level: Optional[Union[int, Iterable[int]]] = None, columns_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None, columns_continuation_token: Optional[Hashable] = <object object>, skip_header: int = 0, skip_footer: int = 0, quote_char: str = '"', encoding: Optional[str] = None, dtypes: Union[str, numpy.dtype, type, None, Iterable[Optional[Union[str, numpy.dtype, type]]], Dict[Hashable, Optional[Union[str, numpy.dtype, type]]]] = None, name: Optional[Hashable] = None, consolidate_blocks: bool = False, store_filter: Optional[static_frame.core.store_filter.StoreFilter] = <static_frame.core.store_filter.StoreFilter object>) static_frame.core.frame.Frame
Create a Frame from a file path or a file-like object defining a delimited (CSV, TSV) data file.
- Parameters
fp – A file path or a file-like object.
delimiter – The character used to seperate row elements.
index_depth – Specify the number of columns used to create the index labels; a value greater than 1 will attempt to create a hierarchical index.
index_column_first – Optionally specify a column, by position or name, to become the start of the index if index_depth is greater than 0. If not set and index_depth is greater than 0, the first column will be used.
index_name_depth_level – If columns_depth is greater than 0, interpret values over index as the index name.
index_constructors –
index_continuation_token –
columns_depth – Specify the number of rows after the skip_header used to create the column labels. A value of 0 will be no header; a value greater than 1 will attempt to create a hierarchical index.
columns_name_depth_level – If index_depth is greater than 0, interpret values over index as the columns name.
columns_constructors –
columns_continuation_token –
skip_header – Number of leading lines to skip.
skip_footer – Number of trailing lines to skip.
store_filter – A StoreFilter instance, defining translation between unrepresentable types. Presently nly the
to_nan
attributes is used.dtypes – Optionally provide an iterable of dtypes, equal in length to the length of each row, or a mapping by column name (where overspecied labels is not an error). If a dtype is given as None, element-wise type determination will be used.
name – A hashable object to label the container.
consolidate_blocks – Optionally consolidate adjacent same-typed columns into contiguous arrays.
- Returns
- classmethod FrameGO.from_dict(mapping: Dict[Hashable, Iterable[Any]], *, index: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]]] = None, fill_value: object = nan, dtypes: Union[str, numpy.dtype, type, None, Iterable[Optional[Union[str, numpy.dtype, type]]], Dict[Hashable, Optional[Union[str, numpy.dtype, type]]]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, columns_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, consolidate_blocks: bool = False) static_frame.core.frame.Frame
Create a Frame from a dictionary (or any object that has an items() method) where keys are column labels and values are columns values (either sequence types or
Series
).- Parameters
mapping – a dictionary or similar mapping interface.
index –
fill_value –
dtypes – Optionally provide an iterable of dtypes, equal in length to the length of each row, or a mapping by column name (where overspecied labels is not an error). If a dtype is given as None, element-wise type determination will be used.
name – A hashable object to label the container.
index_constructor –
columns_constructor –
consolidate_blocks – Optionally consolidate adjacent same-typed columns into contiguous arrays.
>>> f = sf.FrameGO.from_dict(dict(diameter=(12756, 142984, 120536), mass=(5.97, 1898, 568)), index=('Earth', 'Jupiter', 'Saturn'), dtypes=dict(diameter=np.int64)) >>> f['radius'] = f['diameter'] * 0.5 >>> f <FrameGO> <IndexGO> diameter mass radius <<U8> <Index> Earth 12756 5.97 6378.0 Jupiter 142984 1898.0 71492.0 Saturn 120536 568.0 60268.0 <<U7> <int64> <float64> <float64>
- classmethod FrameGO.from_dict_records(records: Iterable[Dict[Hashable, Any]], *, index: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]]] = None, dtypes: Union[str, numpy.dtype, type, None, Iterable[Optional[Union[str, numpy.dtype, type]]], Dict[Hashable, Optional[Union[str, numpy.dtype, type]]]] = None, name: Optional[Hashable] = None, fill_value: object = nan, consolidate_blocks: bool = False, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, columns_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, own_index: bool = False) static_frame.core.frame.Frame
Frame constructor from an iterable of dictionaries, where each dictionary represents a row; column names will be derived from the union of all row dictionary keys.
- Parameters
records – Iterable of row values, where row values are dictionaries.
index – Optionally provide an iterable of index labels, equal in length to the number of records. If a generator, this value will not be evaluated until after records are loaded.
dtypes – Optionally provide an iterable of dtypes, equal in length to the length of each row, or a mapping by column name (where overspecied labels is not an error). If a dtype is given as None, element-wise type determination will be used.
name – A hashable object to label the container.
consolidate_blocks – Optionally consolidate adjacent same-typed columns into contiguous arrays.
- Returns
- classmethod FrameGO.from_dict_records_items(items: Iterator[Tuple[Hashable, Iterable[Any]]], *, dtypes: Union[str, numpy.dtype, type, None, Iterable[Optional[Union[str, numpy.dtype, type]]], Dict[Hashable, Optional[Union[str, numpy.dtype, type]]]] = None, name: Optional[Hashable] = None, consolidate_blocks: bool = False) static_frame.core.frame.Frame
Frame constructor from iterable of pairs of index label, row, where row is a dictionary. Column names will be derived from the union of all row dictionary keys.
- Parameters
items – Iterable of pairs of index label, row values, where row values are arrays, tuples, lists, dictionaries, or namedtuples.
dtypes – Optionally provide an iterable of dtypes, equal in length to the length of each row, or a mapping by column name (where overspecied labels is not an error). If a dtype is given as None, element-wise type determination will be used.
name – A hashable object to label the container.
consolidate_blocks – Optionally consolidate adjacent same-typed columns into contiguous arrays.
- Returns
- classmethod FrameGO.from_element(element: Any, *, index: Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]], columns: 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, columns_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, own_index: bool = False, own_columns: bool = False) static_frame.core.frame.Frame
Create a Frame from an element, i.e., a single value stored in a single cell. Both
index
andcolumns
are required, and cannot be specified withIndexAutoFactory
.
- classmethod FrameGO.from_element_items(items: Iterable[Tuple[Tuple[Hashable, Hashable], Any]], *, index: Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]], columns: Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]], dtype: Union[str, numpy.dtype, type, None, Iterable[Optional[Union[str, numpy.dtype, type]]], Dict[Hashable, Optional[Union[str, numpy.dtype, type]]]] = None, axis: Optional[int] = None, name: Optional[Hashable] = None, fill_value: object = <object object>, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, columns_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, own_index: bool = False, own_columns: bool = False) static_frame.core.frame.Frame
Create a
Frame
from an iterable of key, value, where key is a pair of row, column labels.This function is partialed (setting the index and columns) and used by
IterNodeDelegate
as the apply constructor for doing application on element iteration.- Parameters
items – an iterable of pairs of 2-tuples of row, column loc labels and values.
axis – when None, items can be in an order; when 0, items must be well-formed and ordered row major; when 1, items must be well-formed and ordered columns major.
- Returns
- classmethod FrameGO.from_elements(elements: Iterable[Any], *, index: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]], Type[static_frame.core.index_auto.IndexAutoFactory]]] = None, columns: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]], Type[static_frame.core.index_auto.IndexAutoFactory]]] = None, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, columns_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, own_index: bool = False, own_columns: bool = False) static_frame.core.frame.Frame
Create a Frame from an iterable of elements, to be formed into a
Frame
with a single column.
- classmethod FrameGO.from_fields(fields: Iterable[Iterable[Any]], *, index: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]]] = None, columns: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]]] = None, fill_value: object = nan, dtypes: Union[str, numpy.dtype, type, None, Iterable[Optional[Union[str, numpy.dtype, type]]], Dict[Hashable, Optional[Union[str, numpy.dtype, type]]]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, columns_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, own_index: bool = False, own_columns: bool = False, consolidate_blocks: bool = False) static_frame.core.frame.Frame
Frame constructor from an iterator of columns, where columns are iterables.
Series
can be provided as values if anindex
argument is supplied.- Parameters
fields – Iterable of column values.
index – Iterable of values to create an Index.
fill_value – If pairs include Series, they will be reindexed with the provided index; reindexing will use this fill value.
dtypes – Optionally provide an iterable of dtypes, equal in length to the length of each row, or a mapping by column name (where overspecied labels is not an error). If a dtype is given as None, element-wise type determination will be used.
name – A hashable object to label the container.
consolidate_blocks – Optionally consolidate adjacent same-typed columns into contiguous arrays.
- Returns
- classmethod FrameGO.from_hdf5(fp: Union[str, os.PathLike], *, label: Hashable = <object object>, index_depth: int = 0, index_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None, columns_depth: int = 1, columns_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None, consolidate_blocks: bool = False) static_frame.core.frame.Frame
Load Frame from the contents of a table in an HDF5 file.
- classmethod FrameGO.from_items(pairs: Iterable[Tuple[Hashable, Iterable[Any]]], *, index: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]]] = None, fill_value: object = nan, dtypes: Union[str, numpy.dtype, type, None, Iterable[Optional[Union[str, numpy.dtype, type]]], Dict[Hashable, Optional[Union[str, numpy.dtype, type]]]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, columns_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, consolidate_blocks: bool = False) static_frame.core.frame.Frame
Frame constructor from an iterator of pairs, where the first value is the column label and the second value is an iterable of column values.
Series
can be provided as values if anindex
argument is supplied.- Parameters
pairs – Iterable of pairs of column name, column values.
index – Iterable of values to create an Index.
fill_value – If pairs include Series, they will be reindexed with the provided index; reindexing will use this fill value.
dtypes – Optionally provide an iterable of dtypes, equal in length to the length of each row, or a mapping by column name (where overspecied labels is not an error). If a dtype is given as None, element-wise type determination will be used.
name – A hashable object to label the container.
index_constructor –
columns_constructor –
consolidate_blocks – Optionally consolidate adjacent same-typed columns into contiguous arrays.
- Returns
- classmethod FrameGO.from_json(json_data: str, *, dtypes: Union[str, numpy.dtype, type, None, Iterable[Optional[Union[str, numpy.dtype, type]]], Dict[Hashable, Optional[Union[str, numpy.dtype, type]]]] = None, name: Optional[Hashable] = None, consolidate_blocks: bool = False) static_frame.core.frame.Frame
Frame constructor from an in-memory JSON document.
- Parameters
json_data – a string of JSON, encoding a table as an array of JSON objects.
dtypes – Optionally provide an iterable of dtypes, equal in length to the length of each row, or a mapping by column name (where overspecied labels is not an error). If a dtype is given as None, element-wise type determination will be used.
name – A hashable object to label the container.
consolidate_blocks – Optionally consolidate adjacent same-typed columns into contiguous arrays.
- Returns
- classmethod FrameGO.from_json_url(url: str, *, dtypes: Union[str, numpy.dtype, type, None, Iterable[Optional[Union[str, numpy.dtype, type]]], Dict[Hashable, Optional[Union[str, numpy.dtype, type]]]] = None, name: Optional[Hashable] = None, consolidate_blocks: bool = False) static_frame.core.frame.Frame
Frame constructor from a JSON documenst provided via a URL.
- Parameters
url – URL to the JSON resource.
dtypes – Optionally provide an iterable of dtypes, equal in length to the length of each row, or a mapping by column name (where overspecied labels is not an error). If a dtype is given as None, element-wise type determination will be used.
name – A hashable object to label the container.
consolidate_blocks – Optionally consolidate adjacent same-typed columns into contiguous arrays.
- Returns
- static FrameGO.from_msgpack(msgpack_data: bin) static_frame.core.frame.Frame
Frame constructor from an in-memory binary object formatted as a msgpack.
- Parameters
msgpack_data – A binary msgpack object, encoding a Frame as produced from to_msgpack()
- classmethod FrameGO.from_npy(fp: Union[str, os.PathLike]) static_frame.core.frame.Frame
Create a
Frame
from an directory of npy files.- Parameters
fp – The path to the NPY directory.
- classmethod FrameGO.from_npy_mmap(fp: Union[str, os.PathLike]) Tuple[static_frame.core.frame.Frame, Callable[[], None]]
Create a
Frame
from an directory of npy files using memory maps.- Parameters
fp – The path to the NPY directory.
- Returns
A tuple of
Frame
and the callable needed to close the open memory map objects. On some platforms this must be called before the process exits.
- classmethod FrameGO.from_npz(fp: Union[str, os.PathLike]) static_frame.core.frame.Frame
Create a
Frame
from an npz file.
- classmethod FrameGO.from_overlay(containers: Iterable[static_frame.core.frame.Frame], *, index: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]]] = None, columns: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]]] = None, union: bool = True, name: Optional[Hashable] = None, func: Callable[[numpy.ndarray], numpy.ndarray] = <function isna_array>, fill_value: Any = <object object>) static_frame.core.frame.Frame
Return a new
Frame
made by overlaying containers, filling in values with aligned values from subsequent containers. Values are filled based on a passed function that must return a Boolean array. By default, that function is isna_array, returning True for missing values (NaN and None).- Parameters
containers – Iterable of
Frame
.index – An optional
Index
,IndexHierarchy
, or index initializer, to be used as the index upon which all containers are aligned.IndexAutoFactory
is not supported.columns – An optional
Index
,IndexHierarchy
, or columns initializer, to be used as the columns upon which all containers are aligned.IndexAutoFactory
is not supported.union – If True, and no
index
orcolumns
argument is supplied, a union index or columns fromcontainers
will be used; if False, the intersection index or columns will be used.name –
func – A function that takes an array and returns a same-sized Boolean array, where True indicates availability for insertion.
- classmethod FrameGO.from_pandas(value: pandas.DataFrame, *, index: Optional[Union[IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]], Type[static_frame.core.index_auto.IndexAutoFactory]]] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None, columns: Optional[Union[IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]], Type[static_frame.core.index_auto.IndexAutoFactory]]] = None, columns_constructor: Optional[Callable[[...], IndexBase]] = None, dtypes: Union[str, numpy.dtype, type, None, Iterable[Optional[Union[str, numpy.dtype, type]]], Dict[Hashable, Optional[Union[str, numpy.dtype, type]]]] = None, name: Optional[Hashable] = <object object>, consolidate_blocks: bool = False, own_data: bool = False) Frame
Given a Pandas DataFrame, return a Frame.
- Parameters
value – Pandas DataFrame.
index_constructor – Optional class or constructor function to create the
Index
applied to the rows.columns_constructor – Optional class or constructor function to create the
Index
applied to the columns.dtypes –
consolidate_blocks – Optionally consolidate adjacent same-typed columns into contiguous arrays.
own_data – If True, the underlying NumPy data array will be made immutable and used without a copy.
- Returns
- classmethod FrameGO.from_parquet(fp: Union[str, os.PathLike], *, index_depth: int = 0, index_name_depth_level: Optional[Union[int, Iterable[int]]] = None, index_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None, columns_depth: int = 1, columns_name_depth_level: Optional[Union[int, Iterable[int]]] = None, columns_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None, columns_select: Optional[Iterable[str]] = None, dtypes: Union[str, numpy.dtype, type, None, Iterable[Optional[Union[str, numpy.dtype, type]]], Dict[Hashable, Optional[Union[str, numpy.dtype, type]]]] = None, name: Optional[Hashable] = None, consolidate_blocks: bool = False) static_frame.core.frame.Frame
Realize a
Frame
from a Parquet file.- Parameters
fp – A string file path or
Path
instance.index_depth – integer specification of how many columns to use in forming the index. A value of 0 will select none; a value greater than 1 will create an
IndexHierarchy
.index_name_depth_level –
index_constructors –
columns_depth – integer specification of how many rows to use in forming the columns. A value of 0 will select none; a value greater than 1 will create an
IndexHierarchy
.columns_name_depth_level –
columns_constructors –
columns_select – An optional iterable of column names to load.
dtypes – Optionally provide an iterable of dtypes, equal in length to the length of each row, or a mapping by column name (where overspecied labels is not an error). If a dtype is given as None, element-wise type determination will be used.
name – A hashable object to label the container.
consolidate_blocks – Optionally consolidate adjacent same-typed columns into contiguous arrays.
- classmethod FrameGO.from_pickle(fp: Union[str, os.PathLike]) static_frame.core.frame.Frame
Create a
Frame
from a pickle file.The pickle module is not secure. Only unpickle data you trust.
- Parameters
fp – The path to the pickle file.
- classmethod FrameGO.from_records(records: Iterable[Any], *, index: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]]] = None, columns: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]]] = None, dtypes: Union[str, numpy.dtype, type, None, Iterable[Optional[Union[str, numpy.dtype, type]]], Dict[Hashable, Optional[Union[str, numpy.dtype, type]]]] = None, name: Optional[Hashable] = None, consolidate_blocks: bool = False, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, columns_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, own_index: bool = False, own_columns: bool = False) static_frame.core.frame.Frame
Construct a
Frame
from an iterable of rows, where rows are defined as iterables, including tuples, lists, and arrays. If each row is a NamedTuple, andcolumns
is not provided, column names will be derived from the NamedTuple fields.Supplying
dtypes
will significantly improve performance, as otherwise columnar array types must be derived by element-wise examination.For records defined as
Series
, useFrame.from_concat
; for records defined as dictionary, useFrame.from_dict_records
; for creating aFrame
from a single dictionary, where keys are column labels and values are columns, useFrame.from_dict
.- Parameters
records – Iterable of row values, where row values are arrays, tuples, lists, or namedtuples. For dictionary records, use
Frame.from_dict_records
.index – Optionally provide an iterable of index labels, equal in length to the number of records. If a generator, this value will not be evaluated until after records are loaded.
columns – Optionally provide an iterable of column labels, equal in length to the number of elements in a row.
dtypes – Optionally provide an iterable of dtypes, equal in length to the length of each row, or a mapping by column name (where overspecied labels is not an error). If a dtype is given as None, element-wise type determination will be used.
name – A hashable object to label the container.
consolidate_blocks – Optionally consolidate adjacent same-typed columns into contiguous arrays.
- Returns
- classmethod FrameGO.from_records_items(items: Iterator[Tuple[Hashable, Iterable[Any]]], *, columns: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]]] = None, dtypes: Union[str, numpy.dtype, type, None, Iterable[Optional[Union[str, numpy.dtype, type]]], Dict[Hashable, Optional[Union[str, numpy.dtype, type]]]] = None, name: Optional[Hashable] = None, consolidate_blocks: bool = False, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, columns_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, own_columns: bool = False) static_frame.core.frame.Frame
Frame constructor from iterable of pairs of index value, row (where row is an iterable).
- Parameters
items – Iterable of pairs of index label, row values, where row values are arrays, tuples, lists, dictionaries, or namedtuples.
columns – Optionally provide an iterable of column labels, equal in length to the length of each row.
dtypes – Optionally provide an iterable of dtypes, equal in length to the length of each row, or a mapping by column name (where overspecied labels is not an error). If a dtype is given as None, element-wise type determination will be used.
name – A hashable object to label the container.
consolidate_blocks – Optionally consolidate adjacent same-typed columns into contiguous arrays.
- Returns
- classmethod FrameGO.from_series(series: static_frame.core.series.Series, *, name: Optional[Hashable] = None, columns_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None) static_frame.core.frame.Frame
Frame constructor from a Series:
- Parameters
series – A Series instance, to be realized as single column, with the column label taken from the name attribute.
- classmethod FrameGO.from_sql(query: str, *, connection: sqlite3.Connection, index_depth: int = 0, index_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None, columns_depth: int = 1, columns_select: Optional[Iterable[str]] = None, columns_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None, dtypes: Union[str, numpy.dtype, type, None, Iterable[Optional[Union[str, numpy.dtype, type]]], Dict[Hashable, Optional[Union[str, numpy.dtype, type]]]] = None, name: Optional[Hashable] = None, consolidate_blocks: bool = False, parameters: Iterable[Any] = ()) static_frame.core.frame.Frame
Frame constructor from an SQL query and a database connection object.
- Parameters
query – A query string.
connection – A DBAPI2 (PEP 249) Connection object, such as those returned from SQLite (via the sqlite3 module) or PyODBC.
dtypes – Optionally provide an iterable of dtypes, equal in length to the length of each row, or a mapping by column name (where overspecied labels is not an error). If a dtype is given as None, element-wise type determination will be used.
index_depth –
index_constructors –
columns_depth –
columns_select – An optional iterable of field names to extract from the results of the query.
columns_constructors –
name – A hashable object to label the container.
consolidate_blocks – Optionally consolidate adjacent same-typed columns into contiguous arrays.
parameters – Provide a list of values for an SQL query expecting parameter substitution.
- classmethod FrameGO.from_sqlite(fp: Union[str, os.PathLike], *, label: Hashable = <object object>, index_depth: int = 0, index_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None, columns_depth: int = 1, columns_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None, dtypes: Union[str, numpy.dtype, type, None, Iterable[Optional[Union[str, numpy.dtype, type]]], Dict[Hashable, Optional[Union[str, numpy.dtype, type]]]] = None, consolidate_blocks: bool = False) static_frame.core.frame.Frame
Load Frame from the contents of a table in an SQLite database file.
- classmethod FrameGO.from_structured_array(array: numpy.ndarray, *, index_depth: int = 0, index_column_first: Optional[Union[int, Hashable]] = None, index_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None, columns_depth: int = 1, columns_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None, dtypes: Union[str, numpy.dtype, type, None, Iterable[Optional[Union[str, numpy.dtype, type]]], Dict[Hashable, Optional[Union[str, numpy.dtype, type]]]] = None, name: Optional[Hashable] = None, consolidate_blocks: bool = False, store_filter: Optional[static_frame.core.store_filter.StoreFilter] = <static_frame.core.store_filter.StoreFilter object>) static_frame.core.frame.Frame
Convert a NumPy structed array into a Frame.
- Parameters
array – Structured NumPy array.
index_depth – Depth if index levels, where (for example) 0 is no index, 1 is a single column index, and 2 is a two-columns IndexHierarchy.
index_column_first – Optionally provide the name or position offset of the column to use as the index.
dtypes – Optionally provide an iterable of dtypes, equal in length to the length of each row, or a mapping by column name (where overspecied labels is not an error). If a dtype is given as None, element-wise type determination will be used.
name – A hashable object to label the container.
consolidate_blocks – Optionally consolidate adjacent same-typed columns into contiguous arrays.
- Returns
- classmethod FrameGO.from_tsv(fp: Union[str, os.PathLike, TextIO, Iterator[str]], *, index_depth: int = 0, index_column_first: Optional[Union[int, str]] = None, index_name_depth_level: Optional[Union[int, Iterable[int]]] = None, index_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None, index_continuation_token: Optional[Hashable] = <object object>, columns_depth: int = 1, columns_name_depth_level: Optional[Union[int, Iterable[int]]] = None, columns_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None, columns_continuation_token: Optional[Hashable] = <object object>, skip_header: int = 0, skip_footer: int = 0, quote_char: str = '"', encoding: Optional[str] = None, dtypes: Union[str, numpy.dtype, type, None, Iterable[Optional[Union[str, numpy.dtype, type]]], Dict[Hashable, Optional[Union[str, numpy.dtype, type]]]] = None, name: Optional[Hashable] = None, consolidate_blocks: bool = False, store_filter: Optional[static_frame.core.store_filter.StoreFilter] = <static_frame.core.store_filter.StoreFilter object>) static_frame.core.frame.Frame
Specialized version of
Frame.from_delimited
for TSV files.- Returns
- classmethod FrameGO.from_xlsx(fp: Union[str, os.PathLike], *, label: Hashable = <object object>, index_depth: int = 0, index_name_depth_level: Optional[Union[int, Iterable[int]]] = None, index_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None, columns_depth: int = 1, columns_name_depth_level: Optional[Union[int, Iterable[int]]] = None, columns_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None, dtypes: Union[str, numpy.dtype, type, None, Iterable[Optional[Union[str, numpy.dtype, type]]], Dict[Hashable, Optional[Union[str, numpy.dtype, type]]]] = None, consolidate_blocks: bool = False, skip_header: int = 0, skip_footer: int = 0, trim_nadir: bool = False, store_filter: Optional[static_frame.core.store_filter.StoreFilter] = <static_frame.core.store_filter.StoreFilter object>) static_frame.core.frame.Frame
Load Frame from the contents of a sheet in an XLSX workbook.
- Parameters
label – Optionally provide the sheet name from with to read. If not provided, the first sheet will be used.
FrameGO: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Fill Value | Accessor Regular Expression
FrameGO: Exporter¶
Overview: FrameGO: Exporter
- FrameGO.to_arrow(*, include_index: bool = True, include_index_name: bool = True, include_columns: bool = True, include_columns_name: bool = False) pyarrow.Table
Return a
pyarrow.Table
from thisFrame
.
- FrameGO.to_clipboard(*, delimiter: str = '\t', include_index: bool = True, include_index_name: bool = True, include_columns: bool = True, include_columns_name: bool = False, encoding: Optional[str] = None, line_terminator: str = '\n', quote_char: str = '"', quote_double: bool = True, escape_char: Optional[str] = None, quoting: int = 0, store_filter: Optional[static_frame.core.store_filter.StoreFilter] = <static_frame.core.store_filter.StoreFilter object>) None
Given a file path or file-like object, write the
Frame
as delimited text. Thedelimiter
defaults to a tab.- Parameters
object. (A file path, PathLib instance, or file-like) –
* –
delimiter – Character to be used for delimiterarating elements.
include_index – If True, the index will be written.
include_index_name – If including columns, populate the row above the index with the index
name
. Cannot be True ifinclude_columns_name
isTrue
.include_columns – If
True
, the columns will be written.include_columns_name – If including index, populate the column to the left of the columns with the columns
name
. Cannot be True ifinclude_index_name
is True.encoding – Encoding type to be used when opening the file.
line_terminator – The string used to terminate lines.
quote_char – A one-character string used to quote fields containing special characters, such as the
delimiter
orquote_char
, or which contain new-line characters.quote_double – Controls how instances of quote_char appearing inside a field should themselves be quoted. When
True
, the character is doubled. WhenFalse
, theescape_char
is used as a prefix to thequote_char
. It defaults to True.escape_char – A one-character string used by the writer to escape the delimiter if quoting is set to QUOTE_NONE and the quotechar if quote_double is False.
quoting – Controls when quotes should be generated. It can take on any of the QUOTE_* constants from the standard library csv module.
store_filter – A
StoreFilter
instance.
- FrameGO.to_csv(fp: Union[str, os.PathLike, TextIO], *, include_index: bool = True, include_index_name: bool = True, include_columns: bool = True, include_columns_name: bool = False, encoding: Optional[str] = None, line_terminator: str = '\n', quote_char: str = '"', quote_double: bool = True, escape_char: Optional[str] = None, quoting: int = 0, store_filter: Optional[static_frame.core.store_filter.StoreFilter] = <static_frame.core.store_filter.StoreFilter object>) None
Given a file path or file-like object, write the
Frame
as delimited text. The delimiter is set to a comma.- Parameters
object. (A file path, PathLib instance, or file-like) –
* –
include_index – If True, the index will be written.
include_index_name – If including columns, populate the row above the index with the index
name
. Cannot be True ifinclude_columns_name
isTrue
.include_columns – If
True
, the columns will be written.include_columns_name – If including index, populate the column to the left of the columns with the columns
name
. Cannot be True ifinclude_index_name
is True.encoding – Encoding type to be used when opening the file.
line_terminator – The string used to terminate lines.
quote_char – A one-character string used to quote fields containing special characters, such as the
delimiter
orquote_char
, or which contain new-line characters.quote_double – Controls how instances of quote_char appearing inside a field should themselves be quoted. When
True
, the character is doubled. WhenFalse
, theescape_char
is used as a prefix to thequote_char
. It defaults to True.escape_char – A one-character string used by the writer to escape the delimiter if quoting is set to QUOTE_NONE and the quotechar if quote_double is False.
quoting – Controls when quotes should be generated. It can take on any of the QUOTE_* constants from the standard library csv module.
store_filter – A
StoreFilter
instance.
- FrameGO.to_delimited(fp: Union[str, os.PathLike, TextIO], *, delimiter: str, include_index: bool = True, include_index_name: bool = True, include_columns: bool = True, include_columns_name: bool = False, encoding: Optional[str] = None, line_terminator: str = '\n', quote_char: str = '"', quote_double: bool = True, escape_char: Optional[str] = None, quoting: int = 0, store_filter: Optional[static_frame.core.store_filter.StoreFilter] = <static_frame.core.store_filter.StoreFilter object>) None
Given a file path or file-like object, write the
Frame
as delimited text. Adelimiter
character must be specified.- Parameters
object. (A file path, PathLib instance, or file-like) –
* –
delimiter – Character to be used for delimiterarating elements.
include_index – If True, the index will be written.
include_index_name – If including columns, populate the row above the index with the index
name
. Cannot be True ifinclude_columns_name
isTrue
.include_columns – If
True
, the columns will be written.include_columns_name – If including index, populate the column to the left of the columns with the columns
name
. Cannot be True ifinclude_index_name
is True.encoding – Encoding type to be used when opening the file.
line_terminator – The string used to terminate lines.
quote_char – A one-character string used to quote fields containing special characters, such as the
delimiter
orquote_char
, or which contain new-line characters.quote_double – Controls how instances of quote_char appearing inside a field should themselves be quoted. When
True
, the character is doubled. WhenFalse
, theescape_char
is used as a prefix to thequote_char
. It defaults to True.escape_char – A one-character string used by the writer to escape the delimiter if quoting is set to QUOTE_NONE and the quotechar if quote_double is False.
quoting – Controls when quotes should be generated. It can take on any of the QUOTE_* constants from the standard library csv module.
store_filter – A
StoreFilter
instance.
- FrameGO.to_frame() static_frame.core.frame.Frame [source]
- FrameGO.to_frame_go() static_frame.core.frame.FrameGO [source]
- FrameGO.to_frame_he() static_frame.core.frame.FrameHE [source]
- FrameGO.to_hdf5(fp: Union[str, os.PathLike], *, label: Hashable = <object object>, include_index: bool = True, include_columns: bool = True) None
Write the Frame as single-table SQLite file.
- FrameGO.to_html(config: Optional[static_frame.core.display_config.DisplayConfig] = None, style_config: Optional[static_frame.core.style_config.StyleConfig] = <static_frame.core.style_config.StyleConfig object>) str
Return an HTML table representation of this
Frame
using standard TABLE, TR, and TD tags. This is not a complete HTML page.- Parameters
config – Optional
DisplayConfig
instance.- Returns
str
- FrameGO.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]
Return a complete HTML representation of this
Frame
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.
- FrameGO.to_latex(config: Optional[static_frame.core.display_config.DisplayConfig] = None) str
Display the Frame as a LaTeX formatted table.
- FrameGO.to_markdown(config: Optional[static_frame.core.display_config.DisplayConfig] = None) str
Display the Frame as a Markdown formatted table.
- FrameGO.to_msgpack() bin
Return a msgpack.
- FrameGO.to_npy(fp: Union[str, os.PathLike], *, include_index: bool = True, include_columns: bool = True, consolidate_blocks: bool = False) None
Write a
Frame
as a directory of npy file.
- FrameGO.to_npz(fp: Union[str, os.PathLike], *, include_index: bool = True, include_columns: bool = True, consolidate_blocks: bool = False) None
Write a
Frame
as an npz file.
- FrameGO.to_pairs(axis: int = 0) Iterable[Tuple[Hashable, Iterable[Tuple[Hashable, Any]]]]
Return a tuple of major axis key, minor axis key vlaue pairs, where major axis is determined by the axis argument. Note that the returned object is eagerly constructed; use an iterator interface for lazy iteration.
- FrameGO.to_pandas() pandas.DataFrame
Return a Pandas DataFrame.
- FrameGO.to_parquet(fp: Union[str, os.PathLike, _io.BytesIO], *, include_index: bool = True, include_index_name: bool = True, include_columns: bool = True, include_columns_name: bool = False) None
Write an Arrow Parquet binary file.
- FrameGO.to_pickle(fp: Union[str, os.PathLike], *, protocol: Optional[int] = None) None
Write a
Frame
as a Python pickle.The pickle module is not secure. Only unpickle data you trust.
- Parameters
fp – file path to write.
protocol – Pickle protocol to use.
- FrameGO.to_rst(config: Optional[static_frame.core.display_config.DisplayConfig] = None) str
Display the Frame as an RST formatted table.
- FrameGO.to_series(*, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = <class 'static_frame.core.index.Index'>) static_frame.core.series.Series
Return a
Series
representation of thisFrame
, where the index is extended with columns to from tuple labels for each element in theFrame
.- Parameters
index_constructor – Index constructor of the tuples produced by combining index and columns into one label. Providing
IndexHierarchy.from_labels
will produce a hierarchical index.
- FrameGO.to_sqlite(fp: Union[str, os.PathLike], *, label: Hashable = <object object>, include_index: bool = True, include_columns: bool = True) None
Write the Frame as single-table SQLite file.
- FrameGO.to_tsv(fp: Union[str, os.PathLike, TextIO], *, include_index: bool = True, include_index_name: bool = True, include_columns: bool = True, include_columns_name: bool = False, encoding: Optional[str] = None, line_terminator: str = '\n', quote_char: str = '"', quote_double: bool = True, escape_char: Optional[str] = None, quoting: int = 0, store_filter: Optional[static_frame.core.store_filter.StoreFilter] = <static_frame.core.store_filter.StoreFilter object>) None
Given a file path or file-like object, write the
Frame
as delimited text. The delimiter is set to a tab.- Parameters
object. (A file path, PathLib instance, or file-like) –
* –
include_index – If True, the index will be written.
include_index_name – If including columns, populate the row above the index with the index
name
. Cannot be True ifinclude_columns_name
isTrue
.include_columns – If
True
, the columns will be written.include_columns_name – If including index, populate the column to the left of the columns with the columns
name
. Cannot be True ifinclude_index_name
is True.encoding – Encoding type to be used when opening the file.
line_terminator – The string used to terminate lines.
quote_char – A one-character string used to quote fields containing special characters, such as the
delimiter
orquote_char
, or which contain new-line characters.quote_double – Controls how instances of quote_char appearing inside a field should themselves be quoted. When
True
, the character is doubled. WhenFalse
, theescape_char
is used as a prefix to thequote_char
. It defaults to True.escape_char – A one-character string used by the writer to escape the delimiter if quoting is set to QUOTE_NONE and the quotechar if quote_double is False.
quoting – Controls when quotes should be generated. It can take on any of the QUOTE_* constants from the standard library csv module.
store_filter – A
StoreFilter
instance.
- FrameGO.to_visidata() None
Open an interactive VisiData session.
- FrameGO.to_xarray() Dataset
Return an xarray Dataset.
In order to preserve columnar types, and following the precedent of Pandas, the
Frame
, with a 1D index, is translated as a Dataset of 1D arrays, where each DataArray is a 1D array. If the index is anIndexHierarchy
, each column is mapped into an ND array of shape equal to the unique values found at each depth of the index.
- FrameGO.to_xlsx(fp: Union[str, os.PathLike], *, label: Hashable = <object object>, include_index: bool = True, include_index_name: bool = True, include_columns: bool = True, include_columns_name: bool = False, merge_hierarchical_labels: bool = True, store_filter: Optional[static_frame.core.store_filter.StoreFilter] = <static_frame.core.store_filter.StoreFilter object>) None
Write the Frame as single-sheet XLSX file.
FrameGO: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Fill Value | Accessor Regular Expression
FrameGO: Attribute¶
Overview: FrameGO: Attribute
- FrameGO.STATIC: bool = False
- FrameGO.T
Transpose. Return a
Frame
withindex
ascolumns
and vice versa.
- FrameGO.columns
The
IndexBase
instance assigned for column labels.
- FrameGO.dtypes
Return a Series of dytpes for each realizable column.
- Returns
- FrameGO.index
The
IndexBase
instance assigned for row labels.
- FrameGO.mloc
The memory locations, represented as an array of integers, of the underlying NumPy arrays.
- FrameGO.name
A hashable label attached to this container.
- Returns
Hashable
- FrameGO.nbytes
Return the total bytes of the underlying NumPy array.
- Returns
int
- FrameGO.ndim
Return the number of dimensions, which for a Frame is always 2.
- Returns
int
- FrameGO.shape
Return a tuple describing the shape of the underlying NumPy array.
- Returns
tp.Tuple[int]
- FrameGO.size
Return the size of the underlying NumPy array.
- Returns
int
FrameGO: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Fill Value | Accessor Regular Expression
FrameGO: Method¶
Overview: FrameGO: Method
- FrameGO.__array__(dtype: Optional[numpy.dtype] = None) numpy.ndarray
Support the __array__ interface, returning a 1D array of values.
- FrameGO.__array_ufunc__(ufunc: Callable[[...], numpy.ndarray], method: str, *args: Any, **kwargs: Any) static_frame.core.container.ContainerOperand
Support for NumPy elements or arrays on the left hand of binary operators.
- FrameGO.__bool__() bool
Raises ValueError to prohibit ambiguous use of truethy evaluation.
- FrameGO.__deepcopy__(memo: Dict[int, Any]) static_frame.core.frame.Frame
- FrameGO.__len__() int
Length of rows in values.
- FrameGO.__round__(decimals: int = 0) static_frame.core.frame.Frame
Return a
Frame
rounded to the given decimals. Negative decimals round to the left of the decimal point.- Parameters
decimals – number of decimals to round to.
- Returns
- FrameGO.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.
- FrameGO.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.
- FrameGO.astype[key](dtypes, *, consolidate_blocks)
- FrameGO.astype
Retype one or more columns. When used as a function, can provide retype the entire
Frame
; Alternatively, when used as a__getitem__
interface, loc-style column selection can be used to type one or more coloumns.- 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.
- InterfaceAsType.__getitem__(key: Union[int, numpy.integer, slice, List[Any], None, Index, Series, numpy.ndarray]) FrameAsType [source]
Selector of columns by label.
- Parameters
key – A loc selector, either a label, a list of labels, a slice of labels, or a Boolean array.
- FrameGO.astype(dtype)
- astype
Retype one or more columns. When used as a function, can provide retype the entire
Frame
; Alternatively, when used as a__getitem__
interface, loc-style column selection can be used to type one or more coloumns.- 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.
- InterfaceAsType.__call__(dtype: numpy.dtype) Frame [source]
Apply a single
dtype
to all columns.
- FrameGO.clip(*, lower: Optional[Union[float, static_frame.core.series.Series, static_frame.core.frame.Frame]] = None, upper: Optional[Union[float, static_frame.core.series.Series, static_frame.core.frame.Frame]] = None, axis: Optional[int] = None) static_frame.core.frame.Frame
Apply a clip operation to this
Frame
. Note that clip operations can be applied to object types, but cannot be applied to non-numerical objects (e.g., strings, None)
- FrameGO.count(*, skipna: bool = True, skipfalsy: bool = False, unique: bool = False, axis: int = 0) static_frame.core.series.Series
Return the count of non-NA values along the provided
axis
, where 0 provides counts per column, 1 provides counts per row.- Parameters
axis –
- FrameGO.cov(*, axis: int = 1, ddof: int = 1) static_frame.core.frame.Frame
Compute a covariance matrix.
- Parameters
axis – if 0, each row represents a variable, with observations as columns; if 1, each column represents a variable, with observations as rows. Defaults to 1.
ddof – Delta degrees of freedom, defaults to 1.
- FrameGO.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.
- FrameGO.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.
- FrameGO.drop_duplicated(*, axis: int = 0, exclude_first: bool = False, exclude_last: bool = False) static_frame.core.frame.Frame
Return a
Frame
with duplicated rows (axis 0) or columns (axis 1) removed. All values in the row or column are compared to determine duplication.- Parameters
axis – Integer specifying axis, where 0 is rows and 1 is columns. Axis 0 is set by default.
exclude_first – Boolean to select if the first duplicated value is excluded.
exclude_last – Boolean to select if the last duplicated value is excluded.
- FrameGO.dropfalsy(axis: int = 0, condition: Callable[[numpy.ndarray], bool] = <function all>) static_frame.core.frame.Frame
Return a new Frame after removing rows (axis 0) or columns (axis 1) where any or all values are falsy. The condition is determined by a NumPy ufunc that process the Boolean array returned by
isfalsy()
; the default isnp.all
.- Parameters
axis –
condition –
- FrameGO.dropna(axis: int = 0, condition: Callable[[numpy.ndarray], bool] = <function all>) static_frame.core.frame.Frame
Return a new Frame after removing rows (axis 0) or columns (axis 1) where any or all values are NA (NaN or None). The condition is determined by a NumPy ufunc that process the Boolean array returned by
isna()
; the default isnp.all
.- Parameters
axis –
condition –
- FrameGO.duplicated(*, axis: int = 0, exclude_first: bool = False, exclude_last: bool = False) static_frame.core.series.Series
Return an axis-sized Boolean
Series
that shows True for all rows (axis 0) or columns (axis 1) duplicated.- Parameters
axis – Integer specifying axis, where 0 is rows and 1 is columns. Axis 0 is set by default.
exclude_first – Boolean to select if the first duplicated value is excluded.
exclude_last – Boolean to select if the last duplicated value is excluded.
- FrameGO.equals(other: Any, *, compare_name: bool = False, compare_dtype: bool = False, compare_class: bool = False, skipna: bool = True) bool
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.
- FrameGO.extend(container: Union[static_frame.core.frame.Frame, static_frame.core.series.Series], fill_value: Any = nan) None [source]
Extend this FrameGO (in-place) with another Frame’s blocks or Series array; as blocks are immutable, this is a no-copy operation when indices align. If indices do not align, the passed-in Frame or Series will be reindexed (as happens when adding a column to a FrameGO).
If a Series is passed in, the column name will be taken from the Series
name
attribute.This method differs from FrameGO.extend_items() by permitting contiguous underlying blocks to be extended from another Frame into this Frame.
- FrameGO.extend_items(pairs: Iterable[Tuple[Hashable, static_frame.core.series.Series]], fill_value: Any = nan) None [source]
Given an iterable of pairs of column name, column value, extend this FrameGO. Columns values can be any iterable suitable for usage in __setitem__.
- FrameGO.fillfalsy(value: Any) static_frame.core.frame.Frame
Return a new
Frame
after replacing null (NaN or None) values with the supplied value.- Parameters
value – Value to be used to replace missing values (NaN or None).
- FrameGO.fillfalsy_backward(limit: int = 0, *, axis: int = 0) static_frame.core.frame.Frame
Return a new
Frame
after filling backward falsy values with the first observed value.- 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.
axis – Axis upon which to evaluate contiguous missing values, where 0 is vertically (between row values) and 1 is horizontally (between column values).
- FrameGO.fillfalsy_forward(limit: int = 0, *, axis: int = 0) static_frame.core.frame.Frame
Return a new
Frame
after filling forward falsy values with the last observed value.- 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.
axis – Axis upon which to evaluate contiguous missing values, where 0 is vertically (between row values) and 1 is horizontally (between column values).
- FrameGO.fillfalsy_leading(value: Any, *, axis: int = 0) static_frame.core.frame.Frame
Return a new
Frame
after filling leading (and only leading) falsy values with the providedvalue
.- Parameters
value – Value to be used to replace missing values (NaN or None).
axis – Axis upon which to evaluate contiguous missing values, where 0 is vertically (between row values) and 1 is horizontally (between column values).
- FrameGO.fillfalsy_trailing(value: Any, *, axis: int = 0) static_frame.core.frame.Frame
Return a new
Frame
after filling trailing (and only trailing) falsy values with the providedvalue
.- Parameters
value – Value to be used to replace missing values (NaN or None).
axis – Axis upon which to evaluate contiguous missing values, where 0 is vertically (between row values) and 1 is horizontally (between column values).
- FrameGO.fillna(value: Any) static_frame.core.frame.Frame
Return a new
Frame
after replacing null (NaN or None) values with the supplied value.- Parameters
value – Value to be used to replace missing values (NaN or None).
- FrameGO.fillna_backward(limit: int = 0, *, axis: int = 0) static_frame.core.frame.Frame
Return a new
Frame
after filling backward null (NaN or None) with the first observed value.- 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.
axis – Axis upon which to evaluate contiguous missing values, where 0 is vertically (between row values) and 1 is horizontally (between column values).
- FrameGO.fillna_forward(limit: int = 0, *, axis: int = 0) static_frame.core.frame.Frame
Return a new
Frame
after filling forward null (NaN or None) with the last observed value.- 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.
axis – Axis upon which to evaluate contiguous missing values, where 0 is vertically (between row values) and 1 is horizontally (between column values).
- FrameGO.fillna_leading(value: Any, *, axis: int = 0) static_frame.core.frame.Frame
Return a new
Frame
after filling leading (and only leading) null (NaN or None) with the providedvalue
.- Parameters
value – Value to be used to replace missing values (NaN or None).
axis – Axis upon which to evaluate contiguous missing values, where 0 is vertically (between row values) and 1 is horizontally (between column values).
- FrameGO.fillna_trailing(value: Any, *, axis: int = 0) static_frame.core.frame.Frame
Return a new
Frame
after filling trailing (and only trailing) null (NaN or None) with the providedvalue
.- Parameters
value – Value to be used to replace missing values (NaN or None).
axis – Axis upon which to evaluate contiguous missing values, where 0 is vertically (between row values) and 1 is horizontally (between column values).
- FrameGO.head(count: int = 5) static_frame.core.frame.Frame
Return a
Frame
consisting only of the top elements as specified bycount
.- Parameters
count – Number of elements to be returned from the top of the
Frame
- FrameGO.iloc_max(*, skipna: bool = True, axis: int = 0) static_frame.core.series.Series
Return the integer indices corresponding to the maximum values found.
- Parameters
skipna – if True, NaN or None values will be ignored; if False, a found NaN will propagate.
axis – Axis upon which to evaluate contiguous missing values, where 0 is vertically (between row values) and 1 is horizontally (between column values).
- FrameGO.iloc_min(*, skipna: bool = True, axis: int = 0) static_frame.core.series.Series
Return the integer indices corresponding to the minimum values found.
- Parameters
skipna – if True, NaN or None values will be ignored; if False, a found NaN will propagate.
axis – Axis upon which to evaluate contiguous missing values, where 0 is vertically (between row values) and 1 is horizontally (between column values).
- FrameGO.insert_after(key: Hashable, container: Union[static_frame.core.frame.Frame, static_frame.core.series.Series], *, fill_value: Any = nan) static_frame.core.frame.Frame
Create a new
Frame
by inserting a namedSeries
orFrame
at the position after the label specified bykey
.- Parameters
key – Label after which the new container will be inserted.
container – Container to be inserted.
fill_value – A value to be used to fill space after reindexing the new container.
- Returns
- FrameGO.insert_before(key: Hashable, container: Union[static_frame.core.frame.Frame, static_frame.core.series.Series], *, fill_value: Any = nan) static_frame.core.frame.Frame
Create a new
Frame
by inserting a namedSeries
orFrame
at the position before the label specified bykey
.- Parameters
key – Label before which the new container will be inserted.
container – Container to be inserted.
fill_value – A value to be used to fill space after reindexing the new container.
- Returns
- FrameGO.isfalsy() static_frame.core.frame.Frame
Return a same-indexed, Boolean Frame indicating True which values are falsy.
- FrameGO.isin(other: Any) static_frame.core.frame.Frame
Return a same-sized Boolean
Frame
that shows if the same-positioned element is in the passed iterable.
- FrameGO.isna() static_frame.core.frame.Frame
Return a same-indexed, Boolean Frame indicating True which values are NaN or None.
- FrameGO.join_inner(other: static_frame.core.frame.Frame, *, left_depth_level: Optional[Union[int, Iterable[int]]] = None, left_columns: Union[int, numpy.integer, slice, List[Any], None, static_frame.core.index.Index, static_frame.core.series.Series, numpy.ndarray] = None, right_depth_level: Optional[Union[int, Iterable[int]]] = None, right_columns: Union[int, numpy.integer, slice, List[Any], None, static_frame.core.index.Index, static_frame.core.series.Series, numpy.ndarray] = None, left_template: str = '{}', right_template: str = '{}', fill_value: Any = nan, composite_index: bool = True, composite_index_fill_value: Optional[Hashable] = None) static_frame.core.frame.Frame
Perform an inner join.
- Parameters
left_depth_level – Specify one or more left index depths to include in the join predicate.
left_columns – Specify one or more left columns to include in the join predicate.
right_depth_level – Specify one or more right index depths to include in the join predicate.
right_columns – Specify one or more right columns to include in the join predicate.
left_template – Provide a format string for naming left columns in the joined result.
right_template – Provide a format string for naming right columns in the joined result.
fill_value – A value to be used to fill space created in the join.
composite_index – If True, an index of tuples will be returned, formed from the left index label and the right index label; if False, an index of matching labels, if unique, will be returned.
composite_index_fill_value – Value to be used when forming a composite index when a label is missing.
- Returns
- FrameGO.join_left(other: static_frame.core.frame.Frame, *, left_depth_level: Optional[Union[int, Iterable[int]]] = None, left_columns: Union[int, numpy.integer, slice, List[Any], None, static_frame.core.index.Index, static_frame.core.series.Series, numpy.ndarray] = None, right_depth_level: Optional[Union[int, Iterable[int]]] = None, right_columns: Union[int, numpy.integer, slice, List[Any], None, static_frame.core.index.Index, static_frame.core.series.Series, numpy.ndarray] = None, left_template: str = '{}', right_template: str = '{}', fill_value: Any = nan, composite_index: bool = True, composite_index_fill_value: Optional[Hashable] = None) static_frame.core.frame.Frame
Perform a left outer join.
- Parameters
left_depth_level – Specify one or more left index depths to include in the join predicate.
left_columns – Specify one or more left columns to include in the join predicate.
right_depth_level – Specify one or more right index depths to include in the join predicate.
right_columns – Specify one or more right columns to include in the join predicate.
left_template – Provide a format string for naming left columns in the joined result.
right_template – Provide a format string for naming right columns in the joined result.
fill_value – A value to be used to fill space created in the join.
composite_index – If True, an index of tuples will be returned, formed from the left index label and the right index label; if False, an index of matching labels, if unique, will be returned.
composite_index_fill_value – Value to be used when forming a composite index when a label is missing.
- Returns
- FrameGO.join_outer(other: static_frame.core.frame.Frame, *, left_depth_level: Optional[Union[int, Iterable[int]]] = None, left_columns: Union[int, numpy.integer, slice, List[Any], None, static_frame.core.index.Index, static_frame.core.series.Series, numpy.ndarray] = None, right_depth_level: Optional[Union[int, Iterable[int]]] = None, right_columns: Union[int, numpy.integer, slice, List[Any], None, static_frame.core.index.Index, static_frame.core.series.Series, numpy.ndarray] = None, left_template: str = '{}', right_template: str = '{}', fill_value: Any = nan, composite_index: bool = True, composite_index_fill_value: Optional[Hashable] = None) static_frame.core.frame.Frame
Perform an outer join.
- Parameters
left_depth_level – Specify one or more left index depths to include in the join predicate.
left_columns – Specify one or more left columns to include in the join predicate.
right_depth_level – Specify one or more right index depths to include in the join predicate.
right_columns – Specify one or more right columns to include in the join predicate.
left_template – Provide a format string for naming left columns in the joined result.
right_template – Provide a format string for naming right columns in the joined result.
fill_value – A value to be used to fill space created in the join.
composite_index – If True, an index of tuples will be returned, formed from the left index label and the right index label; if False, an index of matching labels, if unique, will be returned.
composite_index_fill_value – Value to be used when forming a composite index when a label is missing.
- Returns
- FrameGO.join_right(other: static_frame.core.frame.Frame, *, left_depth_level: Optional[Union[int, Iterable[int]]] = None, left_columns: Union[int, numpy.integer, slice, List[Any], None, static_frame.core.index.Index, static_frame.core.series.Series, numpy.ndarray] = None, right_depth_level: Optional[Union[int, Iterable[int]]] = None, right_columns: Union[int, numpy.integer, slice, List[Any], None, static_frame.core.index.Index, static_frame.core.series.Series, numpy.ndarray] = None, left_template: str = '{}', right_template: str = '{}', fill_value: Any = nan, composite_index: bool = True, composite_index_fill_value: Optional[Hashable] = None) static_frame.core.frame.Frame
Perform a right outer join.
- Parameters
left_depth_level – Specify one or more left index depths to include in the join predicate.
left_columns – Specify one or more left columns to include in the join predicate.
right_depth_level – Specify one or more right index depths to include in the join predicate.
right_columns – Specify one or more right columns to include in the join predicate.
left_template – Provide a format string for naming left columns in the joined result.
right_template – Provide a format string for naming right columns in the joined result.
fill_value – A value to be used to fill space created in the join.
composite_index – If True, an index of tuples will be returned, formed from the left index label and the right index label; if False, an index of matching labels, if unique, will be returned.
composite_index_fill_value – Value to be used when forming a composite index when a label is missing.
- Returns
- FrameGO.loc_max(*, skipna: bool = True, axis: int = 0) static_frame.core.series.Series
Return the labels corresponding to the maximum values found.
- Parameters
skipna – if True, NaN or None values will be ignored; if False, a found NaN will propagate.
axis – Axis upon which to evaluate contiguous missing values, where 0 is vertically (between row values) and 1 is horizontally (between column values).
- FrameGO.loc_min(*, skipna: bool = True, axis: int = 0) static_frame.core.series.Series
Return the labels corresponding to the minimum value found.
- Parameters
skipna – if True, NaN or None values will be ignored; if False, a found NaN will propagate.
axis – Axis upon which to evaluate contiguous missing values, where 0 is vertically (between row values) and 1 is horizontally (between column values).
- FrameGO.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.
- FrameGO.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.
- FrameGO.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.
- FrameGO.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.
- FrameGO.notfalsy() static_frame.core.frame.Frame
Return a same-indexed, Boolean Frame indicating True which values are not falsy.
- FrameGO.notna() static_frame.core.frame.Frame
Return a same-indexed, Boolean Frame indicating True which values are not NaN or None.
- FrameGO.pivot(index_fields: Union[Hashable, Iterable[Hashable]], columns_fields: Union[Hashable, Iterable[Hashable]] = (), data_fields: Union[Hashable, Iterable[Hashable]] = (), *, func: Union[Callable[[...], Any], Mapping[Hashable, Callable[[...], Any]]] = <function nansum>, fill_value: object = nan, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None) static_frame.core.frame.Frame
Produce a pivot table, where one or more columns is selected for each of index_fields, columns_fields, and data_fields. Unique values from the provided
index_fields
will be used to create a new index; unique values from the providedcolumns_fields
will be used to create a new columns; if onedata_fields
value is selected, that is the value that will be displayed; if more than one values is given, those values will be presented with a hierarchical index on the columns; ifdata_fields
is not provided, all unused fields will be displayed.- Parameters
index_fields –
columns_fields –
data_fields –
*, –
fill_value – If the index expansion produces coordinates that have no existing data value, fill that position with this value.
func – function to apply to
data_fields
, or a dictionary of labelled functions to apply to data fields, producing an additional hierarchical level.index_constructor –
- FrameGO.pivot_stack(depth_level: Union[int, Iterable[int]] = - 1, *, fill_value: object = nan) static_frame.core.frame.Frame
Move labels from the columns to the index, creating or extending an
IndexHierarchy
on the index.- Parameters
depth_level – selection of columns depth or depth to move onto the index.
- FrameGO.pivot_unstack(depth_level: Union[int, Iterable[int]] = - 1, *, fill_value: object = nan) static_frame.core.frame.Frame
Move labels from the index to the columns, creating or extending an
IndexHierarchy
on the columns.- Parameters
depth_level – selection of index depth or depth to move onto the columns.
- FrameGO.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.
- FrameGO.rank_dense(*, axis: int = 0, skipna: bool = True, ascending: Union[bool, Iterable[bool]] = True, start: int = 0, fill_value: Any = nan) static_frame.core.frame.Frame
Rank values as compactly as possible, where ties get the same value, and ranks are contiguous (potentially non-unique) integers.
- Parameters
axis – Integer specifying axis of ranking, where 0 ranks vertically (within each column) and 1 ranks horizontally (within each row)
skipna – If
True
, exclude NA values (NaN or None) from ranking, replacing those values withfill_value
.ascending – Boolean, or iterable of Booleans; if
True
, the lowest ranks correspond to the lowest values; if an iterable, apply per column or row. The default isTrue
.start – The reference value for the lowest rank. Some ranking methodologies (mean, max) may not return this value given some inputs. The default is 0; for ranks that start from 1, provide a value of 1.
fill_value – A value to be used to fill NA values ignored in ranking when
skipna
isTrue
. The default isnp.nan
but can be set to any value to force NA values to the “bottom” or “top” of a rank as needed.
- Returns
- FrameGO.rank_max(*, axis: int = 0, skipna: bool = True, ascending: Union[bool, Iterable[bool]] = True, start: int = 0, fill_value: Any = nan) static_frame.core.frame.Frame
Rank values where tied values are assigned the maximum ordinal rank; ranks are potentially non-contiguous and non-unique integers.
- Parameters
axis – Integer specifying axis of ranking, where 0 ranks vertically (within each column) and 1 ranks horizontally (within each row)
skipna – If
True
, exclude NA values (NaN or None) from ranking, replacing those values withfill_value
.ascending – Boolean, or iterable of Booleans; if
True
, the lowest ranks correspond to the lowest values; if an iterable, apply per column or row. The default isTrue
.start – The reference value for the lowest rank. Some ranking methodologies (mean, max) may not return this value given some inputs. The default is 0; for ranks that start from 1, provide a value of 1.
fill_value – A value to be used to fill NA values ignored in ranking when
skipna
isTrue
. The default isnp.nan
but can be set to any value to force NA values to the “bottom” or “top” of a rank as needed.
- Returns
- FrameGO.rank_mean(*, axis: int = 0, skipna: bool = True, ascending: Union[bool, Iterable[bool]] = True, start: int = 0, fill_value: Any = nan) static_frame.core.frame.Frame
Rank values where tied values are assigned the mean of the ordinal ranks; ranks are potentially non-contiguous and non-unique floats.
- Parameters
axis – Integer specifying axis of ranking, where 0 ranks vertically (within each column) and 1 ranks horizontally (within each row)
skipna – If
True
, exclude NA values (NaN or None) from ranking, replacing those values withfill_value
.ascending – Boolean, or iterable of Booleans; if
True
, the lowest ranks correspond to the lowest values; if an iterable, apply per column or row. The default isTrue
.start – The reference value for the lowest rank. Some ranking methodologies (mean, max) may not return this value given some inputs. The default is 0; for ranks that start from 1, provide a value of 1.
fill_value – A value to be used to fill NA values ignored in ranking when
skipna
isTrue
. The default isnp.nan
but can be set to any value to force NA values to the “bottom” or “top” of a rank as needed.
- Returns
- FrameGO.rank_min(*, axis: int = 0, skipna: bool = True, ascending: Union[bool, Iterable[bool]] = True, start: int = 0, fill_value: Any = nan) static_frame.core.frame.Frame
Rank values where tied values are assigned the minimum ordinal rank; ranks are potentially non-contiguous and non-unique integers.
- Parameters
axis – Integer specifying axis of ranking, where 0 ranks vertically (within each column) and 1 ranks horizontally (within each row)
skipna – If
True
, exclude NA values (NaN or None) from ranking, replacing those values withfill_value
.ascending – Boolean, or iterable of Booleans; if
True
, the lowest ranks correspond to the lowest values; if an iterable, apply per column or row. The default isTrue
.start – The reference value for the lowest rank. Some ranking methodologies (mean, max) may not return this value given some inputs. The default is 0; for ranks that start from 1, provide a value of 1.
fill_value – A value to be used to fill NA values ignored in ranking when
skipna
isTrue
. The default isnp.nan
but can be set to any value to force NA values to the “bottom” or “top” of a rank as needed.
- Returns
- FrameGO.rank_ordinal(*, axis: int = 0, skipna: bool = True, ascending: Union[bool, Iterable[bool]] = True, start: int = 0, fill_value: Any = nan) static_frame.core.frame.Frame
Rank values distinctly, where ties get distinct values that maintain their ordering, and ranks are contiguous unique integers.
- Parameters
axis – Integer specifying axis of ranking, where 0 ranks vertically (within each column) and 1 ranks horizontally (within each row)
skipna – If
True
, exclude NA values (NaN or None) from ranking, replacing those values withfill_value
.ascending – Boolean, or iterable of Booleans; if
True
, the lowest ranks correspond to the lowest values; if an iterable, apply per column or row. The default isTrue
.start – The reference value for the lowest rank. Some ranking methodologies (mean, max) may not return this value given some inputs. The default is 0; for ranks that start from 1, provide a value of 1.
fill_value – A value to be used to fill NA values ignored in ranking when
skipna
isTrue
. The default isnp.nan
but can be set to any value to force NA values to the “bottom” or “top” of a rank as needed.
- Returns
- FrameGO.rehierarch(index: Optional[Iterable[int]] = None, columns: Optional[Iterable[int]] = None) static_frame.core.frame.Frame
Produce a new Frame with index and/or columns constructed with a transformed hierarchy.
- Parameters
index – Depth level specifier
columns – Depth level specifier
- FrameGO.reindex(index: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]]] = None, columns: Optional[Union[static_frame.core.index_base.IndexBase, Iterable[Hashable], Iterable[Sequence[Hashable]]]] = None, *, fill_value: object = nan, own_index: bool = False, own_columns: bool = False, check_equals: bool = True) static_frame.core.frame.Frame
Return a new
Frame
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 withfill_value
.- Parameters
index – An iterable of unique, hashable values, or another
Index
orIndexHierarchy
, to be used as the labels of the index.columns – An iterable of unique, hashable values, or another
Index
orIndexHierarchy
, 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.Frame
. Primarily used by internal clients.own_columns – Flag the passed columns as ownable by this
static_frame.Frame
. Primarily used by internal clients.check_equals –
- FrameGO.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]]]] = None, columns: 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]]]] = None, *, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, columns_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None) static_frame.core.frame.Frame
Return a new
Frame
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 orSeries
), 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) TheIndexAutoFactory
type, to apply an auto-incremented integer index. (d) An index initializer, i.e., either an iterable of hashables or anIndex
instance.columns – 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 orSeries
), 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) TheIndexAutoFactory
type, to apply an auto-incremented integer index. (d) An index initializer, i.e., either an iterable of hashables or anIndex
instance.
- FrameGO.relabel_flat(index: bool = False, columns: bool = False) static_frame.core.frame.Frame
Return a new
Frame
, where anIndexHierarchy
(if defined) is replaced with a flat, one-dimension index of tuples.- Parameters
index – Boolean to flag flatening on the index.
columns – Boolean to flag flatening on the columns.
- FrameGO.relabel_level_add(index: Optional[Hashable] = None, columns: Optional[Hashable] = None, *, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None, columns_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None) static_frame.core.frame.Frame
Return a new
Frame
, adding a new root level to an existingIndexHierarchy
, or creating anIndexHierarchy
if one is not yet defined.- Parameters
index – A hashable value to be used as a new root level, extending or creating an
IndexHierarchy
columns – A hashable value to be used as a new root level, extending or creating an
IndexHierarchy
*, –
index_constructor –
columns_constructor –
- FrameGO.relabel_level_drop(index: int = 0, columns: int = 0) static_frame.core.frame.Frame
Return a new
Frame
, dropping one or more levels from a either the root or the leaves of anIndexHierarchy
. The resulting index must be unique.- Parameters
index – A positive integer drops that many outer-most (root) levels; a negative integer drops that many inner-most (leaf)levels. Default is zero.
columns – A positive integer drops that many outer-most (root) levels; a negative integer drops that many inner-most (leaf)levels. Default is zero.
- FrameGO.relabel_shift_in(key: Union[int, numpy.integer, slice, List[Any], None, static_frame.core.index.Index, static_frame.core.series.Series, numpy.ndarray], *, axis: int = 0) static_frame.core.frame.Frame
Create, or augment, an
IndexHierarchy
by providing one or more selections from the Frame (via axis-appropriateloc
selections) to move into theIndex
.- Parameters
key – a loc-style selection on the opposite axis.
axis – 0 modifies the index by selecting columns with
key
; 1 modifies the columns by selecting rows withkey
.
- FrameGO.relabel_shift_out(depth_level: Union[int, Iterable[int]], *, axis: int = 0) static_frame.core.frame.Frame
Shift values from an index on an axis to the Frame by providing one or more depth level selections.
- Parameters
dpeth_level – an iloc-style selection on the
Index
of the specified axis.axis – 0 modifies the index by selecting columns with
depth_level
; 1 modifies the columns by selecting rows withdepth_level
.
- FrameGO.rename(name: Optional[Hashable] = <object object>, *, index: Optional[Hashable] = <object object>, columns: Optional[Hashable] = <object object>) static_frame.core.frame.Frame
Return a new Frame with an updated name attribute. Optionally update the name attribute of
index
andcolumns
.
- FrameGO.roll(index: int = 0, columns: int = 0, *, include_index: bool = False, include_columns: bool = False) static_frame.core.frame.Frame
Roll columns and/or rows by positive or negative integer counts, where columns and/or rows roll around the axis.
- Parameters
include_index – Determine if index is included in index-wise rotation.
include_columns – Determine if column index is included in index-wise rotation.
- FrameGO.sample(index: Optional[int] = None, columns: Optional[int] = None, *, seed: Optional[int] = None) static_frame.core.frame.Frame
Randomly (optionally made deterministic with a fixed seed) extract items from the container to return a subset of the container.
- Parameters
index. (Number of labels to select from the) –
columns. (Number of labels to select from the) –
selection. (Initial state of random) –
- FrameGO.set_index(column: Hashable, *, drop: bool = False, index_constructor: Optional[Callable[[...], static_frame.core.index_base.IndexBase]] = None) static_frame.core.frame.Frame
Return a new
Frame
produced by setting the given column as the index, optionally removing that column from the newFrame
.- Parameters
column –
*, –
drop –
index_constructor –
- FrameGO.set_index_hierarchy(columns: Union[int, numpy.integer, slice, List[Any], None, static_frame.core.index.Index, static_frame.core.series.Series, numpy.ndarray], *, drop: bool = False, index_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None, reorder_for_hierarchy: bool = False) static_frame.core.frame.Frame
Given an iterable of column labels, return a new
Frame
with those columns as anIndexHierarchy
on the index.- Parameters
columns – Iterable of column labels.
drop – Boolean to determine if selected columns should be removed from the data.
index_constructors – Optionally provide a sequence of
Index
constructors, of length equal to depth, to be used in converting columns Index components in theIndexHierarchy
.reorder_for_hierarchy – reorder the rows to produce a hierarchible Index from the selected columns, assuming hierarchability is possible.
- Returns
- FrameGO.shift(index: int = 0, columns: int = 0, *, fill_value: Any = nan) static_frame.core.frame.Frame
Shift columns and/or rows by positive or negative integer counts, where columns and/or rows fall of the axis and introduce missing values, filled by fill_value.
- FrameGO.sort_columns(*, ascending: Union[bool, Iterable[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.frame.Frame
Return a new
Frame
ordered by the sortedcolumns
.- Parameters
ascending – Boolean, or iterable of Booleans; if
True
, the lowest ranks correspond to the lowest values; if an iterable, apply per column or row. The default isTrue
.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.
- FrameGO.sort_index(*, ascending: Union[bool, Iterable[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.frame.Frame
Return a new
Frame
ordered by the sorted Index.- Parameters
ascending – Boolean, or iterable of Booleans; if
True
, the lowest ranks correspond to the lowest values; if an iterable, apply per column or row. The default isTrue
.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.
- FrameGO.sort_values(label: Union[Hashable, Iterable[Hashable]], *, ascending: Union[bool, Iterable[bool]] = True, axis: int = 1, kind: str = 'mergesort', key: Optional[Callable[[Union[static_frame.core.frame.Frame, static_frame.core.series.Series]], Union[numpy.ndarray, static_frame.core.series.Series, static_frame.core.frame.Frame]]] = None) static_frame.core.frame.Frame
Return a new
Frame
ordered by the sorted values, where values are given by single column or iterable of columns.- Parameters
label – A label or iterable of labels to select the columns (for axis 1) or rows (for axis 0) to sort.
* –
ascending – Boolean, or iterable of Booleans; if
True
, the lowest ranks correspond to the lowest values; if an iterable, apply per column or row. The default isTrue
.axis – Axis upon which to sort; 0 orders columns based on one or more rows; 1 orders rows based on one or more columns.
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.
- FrameGO.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.
- FrameGO.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.
- FrameGO.tail(count: int = 5) static_frame.core.frame.Frame
Return a
Frame
consisting only of the bottom elements as specified bycount
.- Parameters
count – Number of elements to be returned from the bottom of the
Frame
- FrameGO.transpose() static_frame.core.frame.Frame
Transpose. Return a
Frame
withindex
ascolumns
and vice versa.
- FrameGO.unique(*, axis: Optional[int] = None) numpy.ndarray
Return a NumPy array of unqiue values. If the axis argument is provied, uniqueness is determined by columns or row.
- FrameGO.unset_index(*, names: Iterable[Hashable] = (), consolidate_blocks: bool = False, columns_constructors: Union[Callable[[...], static_frame.core.index_base.IndexBase], None, Sequence[Optional[Callable[[...], static_frame.core.index_base.IndexBase]]]] = None) static_frame.core.frame.Frame
Return a new
Frame where the index is added to the front of the data, and an :obj:`IndexAutoFactory
is used to populate a new index. If theIndex
has aname
, that name will be used for the column name, otherwise a suitable default will be used. As underlying NumPy arrays are immutable, data is not copied.- Parameters
names – An iterable of hashables to be used to name the unset index. If an
Index
, a single hashable should be provided; if anIndexHierarchy
, as many hashables as the depth must be provided.consolidate_blocks –
columns_constructors –
- FrameGO.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.
FrameGO: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Fill Value | Accessor Regular Expression
FrameGO: Dictionary-Like¶
Overview: FrameGO: Dictionary-Like
- FrameGO.__contains__(value: Hashable) bool
Inclusion of value in column labels.
- FrameGO.__iter__() Iterable[Hashable]
Iterator of column labels, same as
Frame.keys()
.
- FrameGO.__reversed__() Iterator[Hashable]
Returns a reverse iterator on the frame’s columns.
- FrameGO.get(key: Hashable, default: Optional[static_frame.core.series.Series] = None) static_frame.core.series.Series
Return the value found at the columns key, else the default if the key is not found. This method is implemented to complete the dictionary-like interface.
- FrameGO.items() Iterator[Tuple[Hashable, static_frame.core.series.Series]]
Iterator of pairs of column label and corresponding column
Series
.
- FrameGO.keys() Iterable[Hashable]
Iterator of column labels.
- FrameGO.values: np.ndarray
A 2D NumPy array of all values in the
Frame
. As this is a single array, heterogenous columnar types might be coerced to a compatible type.
FrameGO: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Fill Value | Accessor Regular Expression
FrameGO: Display¶
Overview: FrameGO: Display
- FrameGO.interface¶
A Frame documenting the interface of this class.
>>> sf.FrameGO.interface.loc[sf.FrameGO.interface.index.via_str.startswith('drop')] <Frame: FrameGO> <Index> cls_name group doc <<U18> <Index: signature> drop_duplicated(*, axis, exclude_... FrameGO Method Return a Frame wi... dropfalsy(axis, condition) FrameGO Method Return a new Fram... dropna(axis, condition) FrameGO Method Return a new Fram... drop[key] FrameGO Selector Label-based selec... drop.iloc[key] FrameGO Selector drop.loc[key] FrameGO Selector <<U96> <<U7> <<U27> <<U83>
- FrameGO.__repr__() str
Return repr(self).
- FrameGO.__str__()
Return str(self).
- FrameGO.display(config: Optional[static_frame.core.display_config.DisplayConfig] = None, *, style_config: Optional[static_frame.core.style_config.StyleConfig] = None) static_frame.core.display.Display
Return a
static_frame.Display
, capable of providing a string representation.- Parameters
config – A
static_frame.DisplayConfig
instance. If not provided, thestatic_frame.DisplayActive
will be used.
- FrameGO.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, thestatic_frame.DisplayActive
will be used.
- FrameGO.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, thestatic_frame.DisplayActive
will be used.
FrameGO: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Fill Value | Accessor Regular Expression
FrameGO: Assignment¶
Overview: FrameGO: Assignment
- FrameGO.assign[key](value, *, fill_value)
- FrameGO.assign
- FrameAssign.__call__(value: Any, *, fill_value: Any = nan) static_frame.core.frame.Frame [source]
Assign the
value
in the position specified by the selector. The name attribute is propagated to the returned container.
- FrameGO.assign[key].apply(func, *, fill_value)
- FrameGO.assign
- FrameAssign.apply(func: Callable[[...], Any], *, fill_value: Any = nan) static_frame.core.frame.Frame [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.
- FrameGO.assign.iloc[key](value, *, fill_value)
- FrameGO.assign
- FrameAssign.__call__(value: Any, *, fill_value: Any = nan) static_frame.core.frame.Frame [source]
Assign the
value
in the position specified by the selector. The name attribute is propagated to the returned container.
- FrameGO.assign.iloc[key].apply(func, *, fill_value)
- FrameGO.assign
- FrameAssign.apply(func: Callable[[...], Any], *, fill_value: Any = nan) static_frame.core.frame.Frame [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.
- FrameGO.assign.loc[key](value, *, fill_value)
- FrameGO.assign
- FrameAssign.__call__(value: Any, *, fill_value: Any = nan) static_frame.core.frame.Frame [source]
Assign the
value
in the position specified by the selector. The name attribute is propagated to the returned container.
- FrameGO.assign.loc[key].apply(func, *, fill_value)
- FrameGO.assign
- FrameAssign.apply(func: Callable[[...], Any], *, fill_value: Any = nan) static_frame.core.frame.Frame [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.
- FrameGO.assign.bloc[key](value, *, fill_value)
- FrameGO.assign
- FrameAssign.__call__(value: Any, *, fill_value: Any = nan) static_frame.core.frame.Frame [source]
Assign the
value
in the position specified by the selector. The name attribute is propagated to the returned container.
- FrameGO.assign.bloc[key].apply(func, *, fill_value)
- FrameGO.assign
- FrameAssign.apply(func: Callable[[...], Any], *, fill_value: Any = nan) static_frame.core.frame.Frame [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.
FrameGO: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Fill Value | Accessor Regular Expression
FrameGO: Selector¶
Overview: FrameGO: Selector
- FrameGO.bloc[key]
- FrameGO.bloc
- FrameGO.drop[key]
- FrameGO.drop
- InterfaceSelectTrio.__getitem__(key: Union[int, numpy.integer, slice, List[Any], None, Index, Series, numpy.ndarray]) Any [source]
Label-based selection.
- FrameGO.drop.iloc[key]
- FrameGO.drop
- InterfaceSelectTrio.iloc
Integer-position based selection.
- FrameGO.drop.loc[key]
- FrameGO.drop
- InterfaceSelectTrio.loc
Label-based selection.
- FrameGO.mask[key]
- FrameGO.mask
- InterfaceSelectTrio.__getitem__(key: Union[int, numpy.integer, slice, List[Any], None, Index, Series, numpy.ndarray]) Any [source]
Label-based selection.
- FrameGO.mask.iloc[key]
- FrameGO.mask
- InterfaceSelectTrio.iloc
Integer-position based selection.
- FrameGO.mask.loc[key]
- FrameGO.mask
- InterfaceSelectTrio.loc
Label-based selection.
- FrameGO.masked_array[key]
- FrameGO.masked_array
- InterfaceSelectTrio.__getitem__(key: Union[int, numpy.integer, slice, List[Any], None, Index, Series, numpy.ndarray]) Any [source]
Label-based selection.
- FrameGO.masked_array.iloc[key]
- FrameGO.masked_array
- InterfaceSelectTrio.iloc
Integer-position based selection.
- FrameGO.masked_array.loc[key]
- FrameGO.masked_array
- InterfaceSelectTrio.loc
Label-based selection.
- FrameGO[key]
- FrameGO.__getitem__ = <function Frame.__getitem__>
- FrameGO.iloc[key]
- FrameGO.iloc
- FrameGO.loc[key]
- FrameGO.loc
FrameGO: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Fill Value | Accessor Regular Expression
FrameGO: Iterator¶
Overview: FrameGO: Iterator
- FrameGO.iter_array(*, axis)
- iter_array
Iterator of
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- FrameGO.iter_array(*, axis).apply(func, *, dtype, name, index_constructor)
- iter_array
Iterator of
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- IterNodeDelegate.apply(func: Callable[[...], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_array(*, axis).apply_iter(func)
- iter_array
Iterator of
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- 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.
- FrameGO.iter_array(*, axis).apply_iter_items(func)
- iter_array
Iterator of
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- 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.
- FrameGO.iter_array(*, axis).apply_pool(func, *, dtype, name, index_constructor, max_workers, chunksize, use_threads)
- iter_array
Iterator of
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- IterNodeDelegate.apply_pool(func: Callable[[...], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None, max_workers: Optional[int] = None, chunksize: int = 1, use_threads: bool = False) static_frame.core.node_iter.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.
- FrameGO.iter_array(*, axis).map_all(mapping, *, dtype, name, index_constructor)
- iter_array
Iterator of
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- IterNodeDelegate.map_all(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_array(*, axis).map_all_iter(mapping)
- iter_array
Iterator of
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- 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.
- FrameGO.iter_array(*, axis).map_all_iter_items(mapping)
- iter_array
Iterator of
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- 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.
- FrameGO.iter_array(*, axis).map_any(mapping, *, dtype, name, index_constructor)
- iter_array
Iterator of
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- IterNodeDelegate.map_any(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_array(*, axis).map_any_iter(mapping)
- iter_array
Iterator of
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- 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.
- FrameGO.iter_array(*, axis).map_any_iter_items(mapping)
- iter_array
Iterator of
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- 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.
- FrameGO.iter_array(*, axis).map_fill(mapping, *, fill_value, dtype, name, index_constructor)
- iter_array
Iterator of
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- 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, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_array(*, axis).map_fill_iter(mapping, *, fill_value)
- iter_array
Iterator of
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- 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.
- FrameGO.iter_array(*, axis).map_fill_iter_items(mapping, *, fill_value)
- iter_array
Iterator of
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- 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.
- FrameGO.iter_array_items(*, axis)
- iter_array_items
Iterator of pairs of label,
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- FrameGO.iter_array_items(*, axis).apply(func, *, dtype, name, index_constructor)
- iter_array_items
Iterator of pairs of label,
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- IterNodeDelegate.apply(func: Callable[[...], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_array_items(*, axis).apply_iter(func)
- iter_array_items
Iterator of pairs of label,
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- 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.
- FrameGO.iter_array_items(*, axis).apply_iter_items(func)
- iter_array_items
Iterator of pairs of label,
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- 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.
- FrameGO.iter_array_items(*, axis).apply_pool(func, *, dtype, name, index_constructor, max_workers, chunksize, use_threads)
- iter_array_items
Iterator of pairs of label,
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- IterNodeDelegate.apply_pool(func: Callable[[...], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None, max_workers: Optional[int] = None, chunksize: int = 1, use_threads: bool = False) static_frame.core.node_iter.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.
- FrameGO.iter_array_items(*, axis).map_all(mapping, *, dtype, name, index_constructor)
- iter_array_items
Iterator of pairs of label,
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- IterNodeDelegate.map_all(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_array_items(*, axis).map_all_iter(mapping)
- iter_array_items
Iterator of pairs of label,
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- 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.
- FrameGO.iter_array_items(*, axis).map_all_iter_items(mapping)
- iter_array_items
Iterator of pairs of label,
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- 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.
- FrameGO.iter_array_items(*, axis).map_any(mapping, *, dtype, name, index_constructor)
- iter_array_items
Iterator of pairs of label,
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- IterNodeDelegate.map_any(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_array_items(*, axis).map_any_iter(mapping)
- iter_array_items
Iterator of pairs of label,
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- 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.
- FrameGO.iter_array_items(*, axis).map_any_iter_items(mapping)
- iter_array_items
Iterator of pairs of label,
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- 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.
- FrameGO.iter_array_items(*, axis).map_fill(mapping, *, fill_value, dtype, name, index_constructor)
- iter_array_items
Iterator of pairs of label,
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- 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, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_array_items(*, axis).map_fill_iter(mapping, *, fill_value)
- iter_array_items
Iterator of pairs of label,
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- 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.
- FrameGO.iter_array_items(*, axis).map_fill_iter_items(mapping, *, fill_value)
- iter_array_items
Iterator of pairs of label,
np.array
, where arrays are drawn from columns (axis=0) or rows (axis=1)
- 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.
- FrameGO.iter_element(*, axis)
- iter_element
Iterator of elements, ordered by row then column.
- FrameGO.iter_element(*, axis).apply(func, *, dtype, name, index_constructor)
- iter_element
Iterator of elements, ordered by row then column.
- IterNodeDelegate.apply(func: Callable[[...], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_element(*, axis).apply_iter(func)
- iter_element
Iterator of elements, ordered by row then column.
- 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.
- FrameGO.iter_element(*, axis).apply_iter_items(func)
- iter_element
Iterator of elements, ordered by row then column.
- 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.
- FrameGO.iter_element(*, axis).apply_pool(func, *, dtype, name, index_constructor, max_workers, chunksize, use_threads)
- iter_element
Iterator of elements, ordered by row then column.
- IterNodeDelegate.apply_pool(func: Callable[[...], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None, max_workers: Optional[int] = None, chunksize: int = 1, use_threads: bool = False) static_frame.core.node_iter.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.
- FrameGO.iter_element(*, axis).map_all(mapping, *, dtype, name, index_constructor)
- iter_element
Iterator of elements, ordered by row then column.
- IterNodeDelegate.map_all(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_element(*, axis).map_all_iter(mapping)
- iter_element
Iterator of elements, ordered by row then column.
- 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.
- FrameGO.iter_element(*, axis).map_all_iter_items(mapping)
- iter_element
Iterator of elements, ordered by row then column.
- 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.
- FrameGO.iter_element(*, axis).map_any(mapping, *, dtype, name, index_constructor)
- iter_element
Iterator of elements, ordered by row then column.
- IterNodeDelegate.map_any(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_element(*, axis).map_any_iter(mapping)
- iter_element
Iterator of elements, ordered by row then column.
- 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.
- FrameGO.iter_element(*, axis).map_any_iter_items(mapping)
- iter_element
Iterator of elements, ordered by row then column.
- 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.
- FrameGO.iter_element(*, axis).map_fill(mapping, *, fill_value, dtype, name, index_constructor)
- iter_element
Iterator of elements, ordered by row then column.
- 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, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_element(*, axis).map_fill_iter(mapping, *, fill_value)
- iter_element
Iterator of elements, ordered by row then column.
- 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.
- FrameGO.iter_element(*, axis).map_fill_iter_items(mapping, *, fill_value)
- iter_element
Iterator of elements, ordered by row then column.
- 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.
- FrameGO.iter_element_items(*, axis)
- iter_element_items
Iterator of pairs of label, element, where labels are pairs of index, columns labels, ordered by row then column.
- FrameGO.iter_element_items(*, axis).apply(func, *, dtype, name, index_constructor)
- iter_element_items
Iterator of pairs of label, element, where labels are pairs of index, columns labels, ordered by row then column.
- IterNodeDelegate.apply(func: Callable[[...], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_element_items(*, axis).apply_iter(func)
- iter_element_items
Iterator of pairs of label, element, where labels are pairs of index, columns labels, ordered by row then column.
- 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.
- FrameGO.iter_element_items(*, axis).apply_iter_items(func)
- iter_element_items
Iterator of pairs of label, element, where labels are pairs of index, columns labels, ordered by row then column.
- 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.
- FrameGO.iter_element_items(*, axis).apply_pool(func, *, dtype, name, index_constructor, max_workers, chunksize, use_threads)
- iter_element_items
Iterator of pairs of label, element, where labels are pairs of index, columns labels, ordered by row then column.
- IterNodeDelegate.apply_pool(func: Callable[[...], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None, max_workers: Optional[int] = None, chunksize: int = 1, use_threads: bool = False) static_frame.core.node_iter.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.
- FrameGO.iter_element_items(*, axis).map_all(mapping, *, dtype, name, index_constructor)
- iter_element_items
Iterator of pairs of label, element, where labels are pairs of index, columns labels, ordered by row then column.
- IterNodeDelegate.map_all(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_element_items(*, axis).map_all_iter(mapping)
- iter_element_items
Iterator of pairs of label, element, where labels are pairs of index, columns labels, ordered by row then column.
- 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.
- FrameGO.iter_element_items(*, axis).map_all_iter_items(mapping)
- iter_element_items
Iterator of pairs of label, element, where labels are pairs of index, columns labels, ordered by row then column.
- 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.
- FrameGO.iter_element_items(*, axis).map_any(mapping, *, dtype, name, index_constructor)
- iter_element_items
Iterator of pairs of label, element, where labels are pairs of index, columns labels, ordered by row then column.
- IterNodeDelegate.map_any(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_element_items(*, axis).map_any_iter(mapping)
- iter_element_items
Iterator of pairs of label, element, where labels are pairs of index, columns labels, ordered by row then column.
- 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.
- FrameGO.iter_element_items(*, axis).map_any_iter_items(mapping)
- iter_element_items
Iterator of pairs of label, element, where labels are pairs of index, columns labels, ordered by row then column.
- 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.
- FrameGO.iter_element_items(*, axis).map_fill(mapping, *, fill_value, dtype, name, index_constructor)
- iter_element_items
Iterator of pairs of label, element, where labels are pairs of index, columns labels, ordered by row then column.
- 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, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_element_items(*, axis).map_fill_iter(mapping, *, fill_value)
- iter_element_items
Iterator of pairs of label, element, where labels are pairs of index, columns labels, ordered by row then column.
- 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.
- FrameGO.iter_element_items(*, axis).map_fill_iter_items(mapping, *, fill_value)
- iter_element_items
Iterator of pairs of label, element, where labels are pairs of index, columns labels, ordered by row then column.
- 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.
- FrameGO.iter_group(key, *, axis, drop)
- iter_group
Iterator of
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- FrameGO.iter_group(key, *, axis, drop).apply(func, *, dtype, name, index_constructor)
- iter_group
Iterator of
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- IterNodeDelegate.apply(func: Callable[[...], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_group(key, *, axis, drop).apply_iter(func)
- iter_group
Iterator of
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group(key, *, axis, drop).apply_iter_items(func)
- iter_group
Iterator of
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group(key, *, axis, drop).apply_pool(func, *, dtype, name, index_constructor, max_workers, chunksize, use_threads)
- iter_group
Iterator of
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- IterNodeDelegate.apply_pool(func: Callable[[...], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None, max_workers: Optional[int] = None, chunksize: int = 1, use_threads: bool = False) static_frame.core.node_iter.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.
- FrameGO.iter_group(key, *, axis, drop).map_all(mapping, *, dtype, name, index_constructor)
- iter_group
Iterator of
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- IterNodeDelegate.map_all(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_group(key, *, axis, drop).map_all_iter(mapping)
- iter_group
Iterator of
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group(key, *, axis, drop).map_all_iter_items(mapping)
- iter_group
Iterator of
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group(key, *, axis, drop).map_any(mapping, *, dtype, name, index_constructor)
- iter_group
Iterator of
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- IterNodeDelegate.map_any(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_group(key, *, axis, drop).map_any_iter(mapping)
- iter_group
Iterator of
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group(key, *, axis, drop).map_any_iter_items(mapping)
- iter_group
Iterator of
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group(key, *, axis, drop).map_fill(mapping, *, fill_value, dtype, name, index_constructor)
- iter_group
Iterator of
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_group(key, *, axis, drop).map_fill_iter(mapping, *, fill_value)
- iter_group
Iterator of
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group(key, *, axis, drop).map_fill_iter_items(mapping, *, fill_value)
- iter_group
Iterator of
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_array(key, *, axis, drop)
- iter_group_array
Iterator of
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- FrameGO.iter_group_array(key, *, axis, drop).apply(func, *, dtype, name, index_constructor)
- iter_group_array
Iterator of
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- IterNodeDelegate.apply(func: Callable[[...], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_group_array(key, *, axis, drop).apply_iter(func)
- iter_group_array
Iterator of
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_array(key, *, axis, drop).apply_iter_items(func)
- iter_group_array
Iterator of
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_array(key, *, axis, drop).apply_pool(func, *, dtype, name, index_constructor, max_workers, chunksize, use_threads)
- iter_group_array
Iterator of
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- IterNodeDelegate.apply_pool(func: Callable[[...], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None, max_workers: Optional[int] = None, chunksize: int = 1, use_threads: bool = False) static_frame.core.node_iter.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.
- FrameGO.iter_group_array(key, *, axis, drop).map_all(mapping, *, dtype, name, index_constructor)
- iter_group_array
Iterator of
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- IterNodeDelegate.map_all(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_group_array(key, *, axis, drop).map_all_iter(mapping)
- iter_group_array
Iterator of
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_array(key, *, axis, drop).map_all_iter_items(mapping)
- iter_group_array
Iterator of
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_array(key, *, axis, drop).map_any(mapping, *, dtype, name, index_constructor)
- iter_group_array
Iterator of
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- IterNodeDelegate.map_any(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_group_array(key, *, axis, drop).map_any_iter(mapping)
- iter_group_array
Iterator of
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_array(key, *, axis, drop).map_any_iter_items(mapping)
- iter_group_array
Iterator of
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_array(key, *, axis, drop).map_fill(mapping, *, fill_value, dtype, name, index_constructor)
- iter_group_array
Iterator of
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_group_array(key, *, axis, drop).map_fill_iter(mapping, *, fill_value)
- iter_group_array
Iterator of
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_array(key, *, axis, drop).map_fill_iter_items(mapping, *, fill_value)
- iter_group_array
Iterator of
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_array_items(key, *, axis, drop)
- iter_group_array_items
Iterator of pairs of label,
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- FrameGO.iter_group_array_items(key, *, axis, drop).apply(func, *, dtype, name, index_constructor)
- iter_group_array_items
Iterator of pairs of label,
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- IterNodeDelegate.apply(func: Callable[[...], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_group_array_items(key, *, axis, drop).apply_iter(func)
- iter_group_array_items
Iterator of pairs of label,
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_array_items(key, *, axis, drop).apply_iter_items(func)
- iter_group_array_items
Iterator of pairs of label,
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_array_items(key, *, axis, drop).apply_pool(func, *, dtype, name, index_constructor, max_workers, chunksize, use_threads)
- iter_group_array_items
Iterator of pairs of label,
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- IterNodeDelegate.apply_pool(func: Callable[[...], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None, max_workers: Optional[int] = None, chunksize: int = 1, use_threads: bool = False) static_frame.core.node_iter.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.
- FrameGO.iter_group_array_items(key, *, axis, drop).map_all(mapping, *, dtype, name, index_constructor)
- iter_group_array_items
Iterator of pairs of label,
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- IterNodeDelegate.map_all(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_group_array_items(key, *, axis, drop).map_all_iter(mapping)
- iter_group_array_items
Iterator of pairs of label,
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_array_items(key, *, axis, drop).map_all_iter_items(mapping)
- iter_group_array_items
Iterator of pairs of label,
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_array_items(key, *, axis, drop).map_any(mapping, *, dtype, name, index_constructor)
- iter_group_array_items
Iterator of pairs of label,
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- IterNodeDelegate.map_any(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_group_array_items(key, *, axis, drop).map_any_iter(mapping)
- iter_group_array_items
Iterator of pairs of label,
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_array_items(key, *, axis, drop).map_any_iter_items(mapping)
- iter_group_array_items
Iterator of pairs of label,
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_array_items(key, *, axis, drop).map_fill(mapping, *, fill_value, dtype, name, index_constructor)
- iter_group_array_items
Iterator of pairs of label,
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_group_array_items(key, *, axis, drop).map_fill_iter(mapping, *, fill_value)
- iter_group_array_items
Iterator of pairs of label,
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_array_items(key, *, axis, drop).map_fill_iter_items(mapping, *, fill_value)
- iter_group_array_items
Iterator of pairs of label,
np.ndarray
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_items(key, *, axis, drop)
- iter_group_items
Iterator of pairs of label,
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- FrameGO.iter_group_items(key, *, axis, drop).apply(func, *, dtype, name, index_constructor)
- iter_group_items
Iterator of pairs of label,
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- IterNodeDelegate.apply(func: Callable[[...], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_group_items(key, *, axis, drop).apply_iter(func)
- iter_group_items
Iterator of pairs of label,
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_items(key, *, axis, drop).apply_iter_items(func)
- iter_group_items
Iterator of pairs of label,
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_items(key, *, axis, drop).apply_pool(func, *, dtype, name, index_constructor, max_workers, chunksize, use_threads)
- iter_group_items
Iterator of pairs of label,
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- IterNodeDelegate.apply_pool(func: Callable[[...], Any], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None, max_workers: Optional[int] = None, chunksize: int = 1, use_threads: bool = False) static_frame.core.node_iter.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.
- FrameGO.iter_group_items(key, *, axis, drop).map_all(mapping, *, dtype, name, index_constructor)
- iter_group_items
Iterator of pairs of label,
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- IterNodeDelegate.map_all(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_group_items(key, *, axis, drop).map_all_iter(mapping)
- iter_group_items
Iterator of pairs of label,
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_items(key, *, axis, drop).map_all_iter_items(mapping)
- iter_group_items
Iterator of pairs of label,
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_items(key, *, axis, drop).map_any(mapping, *, dtype, name, index_constructor)
- iter_group_items
Iterator of pairs of label,
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- IterNodeDelegate.map_any(mapping: Union[Mapping[Hashable, Any], Series], *, dtype: Optional[Union[str, numpy.dtype, type]] = None, name: Optional[Hashable] = None, index_constructor: Optional[Callable[[...], IndexBase]] = None) static_frame.core.node_iter.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.
- FrameGO.iter_group_items(key, *, axis, drop).map_any_iter(mapping)
- iter_group_items
Iterator of pairs of label,
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_items(key, *, axis, drop).map_any_iter_items(mapping)
- iter_group_items
Iterator of pairs of label,
Frame
grouped by unique values found in one or more columns (axis=0) or rows (axis=1).
- 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.
- FrameGO.iter_group_items(key