bigframes.streaming.StreamingDataFrame#
- class bigframes.streaming.StreamingDataFrame(df: DataFrame, *, create_key=0)[source]#
Two-dimensional, size-mutable, potentially heterogeneous tabular data.
Data structure also contains labeled axes (rows and columns). Arithmetic operations align on both row and column labels. Can be thought of as a dict-like container for Series objects. The primary pandas data structure.
Note
The bigframes.streaming module is a preview feature, and subject to change.
Currently only supports basic projection, filtering and preview operations.
- __getitem__(*args, **kwargs)[source]#
Gets the specified column(s) from the StreamingDataFrame.
- Parameters:
key (index) – Index or list of indices. It can be a column label, a list of column labels, a Series of booleans or a pandas Index of desired column labels
- Returns:
Value(s) at the requested index(es).
- Return type:
bigframes.pandas.Series or Any
- __repr__(*args, **kwargs)[source]#
Converts a StreamingDataFrame to a string. Calls to_pandas.
Only represents the first bigframes.options.display.max_rows.
- __setitem__(*args, **kwargs)[source]#
Modify or insert a column into the StreamingDataFrame.
Note
This does not modify the original table the StreamingDataFrame was derived from.
- Parameters:
key (column index) – It can be a new column to be inserted, or an existing column to be modified.
value (scalar, Sequence, StreamingDataFrame, or Series) – Value to be assigned to the column
- rename(*args, **kwargs)[source]#
Rename columns.
Dict values must be unique (1-to-1). Labels not contained in a dict will be left as-is. Extra labels listed don’t throw an error.
- Parameters:
columns (Mapping) – Dict-like from old column labels to new column labels.
inplace (bool) – Default False. Whether to modify the StreamingDataFrame rather than creating a new one.
- Returns:
StreamingDataFrame with the renamed axis labels or None if
inplace=True.- Return type:
bigframes.pandas.DataFrame | None
- Raises:
KeyError – If any of the labels is not found.