bigframes.pandas.Series#

class bigframes.pandas.Series(data=None, index=None, dtype: BooleanDtype | Float64Dtype | Int64Dtype | StringDtype | ArrowDtype | GeometryDtype | Literal['boolean', 'Float64', 'Int64', 'int64[pyarrow]', 'string', 'string[pyarrow]', 'timestamp[us, tz=UTC][pyarrow]', 'timestamp[us][pyarrow]', 'date32[day][pyarrow]', 'time64[us][pyarrow]', 'decimal128(38, 9)[pyarrow]', 'decimal256(76, 38)[pyarrow]', 'binary[pyarrow]', 'duration[us][pyarrow]'] | None = None, name: str | None = None, copy: bool | None = None, *, session: Session | None = None)[source]#

One-dimensional ndarray with axis labels (including time series).

Attributes

AlignedExprT

T

at

blob

Accessor for Blob operations.

dt

dtype

dtypes

empty

geo

Accessor object for geography properties of the Series values.

hasnans

iat

iloc

index

is_monotonic_decreasing

is_monotonic_increasing

list

loc

name

ndim

plot

query_job

BigQuery job metadata for the most recent query.

shape

size

str

struct

values

Methods

__init__([data, index, dtype, name, copy, ...])

abs()

add(other)

Return addition of Series and other, element-wise (binary operator add).

add_prefix(prefix[, axis])

add_suffix(suffix[, axis])

agg(func)

Aggregate using one or more operations over the specified axis.

aggregate(func)

Aggregate using one or more operations over the specified axis.

all()

Return whether all elements are True, potentially over an axis.

any()

Return whether any element is True, potentially over an axis.

apply(func[, by_row, args])

Invoke function on values of a Series.

area([x, y, stacked])

argmax()

Return int position of the largest value in the series.

argmin()

Return int position of the smallest value in the Series.

astype(dtype, *[, errors])

autocorr([lag])

Compute the lag-N autocorrelation.

bar([x, y])

between(left, right[, inclusive])

Return boolean Series equivalent to left <= series <= right.

bfill(*[, limit])

cache()

Materializes the Series to a temporary table.

case_when(caselist)

Replace values where the conditions are True.

clip([lower, upper])

Trim values at input threshold(s).

combine(other, func)

Combine the Series with a Series or scalar according to func.

combine_first(other)

Update null elements with value in the same location in 'other'.

copy()

corr(other[, method, min_periods])

Compute the correlation with the other Series.

count()

Return number of non-NA/null observations in the Series.

cov(other)

Compute covariance with Series, excluding missing values.

cummax()

Return cumulative maximum over a DataFrame or Series axis.

cummin()

Return cumulative minimum over a DataFrame or Series axis.

cumprod()

Return cumulative product over a DataFrame or Series axis.

cumsum()

Return cumulative sum over a DataFrame or Series axis.

describe()

Generate descriptive statistics.

diff([periods])

First discrete difference of element.

div(other)

Return floating division of Series and other, element-wise (binary operator truediv).

divide(other)

Return floating division of Series and other, element-wise (binary operator truediv).

divmod(other)

Return integer division and modulo of Series and other, element-wise (binary operator divmod).

dot(other)

Compute the dot product between the Series and the columns of other.

drop([labels, axis, index, columns, level])

Return Series with specified index labels removed.

drop_duplicates(*[, keep])

Return Series with duplicate values removed.

droplevel(level[, axis])

Return Series with requested index / column level(s) removed.

dropna(*[, axis, inplace, how, ignore_index])

Return a new Series with missing values removed.

duplicated([keep])

Indicate duplicate Series values.

eq(other)

Return equal of Series and other, element-wise (binary operator eq).

equals(other)

expanding([min_periods])

explode(*[, ignore_index])

Transform each element of a list-like to a row.

ffill(*[, limit])

fillna([value])

Fill NA (NULL in BigQuery) values using the specified method.

filter([items, like, regex, axis])

floordiv(other)

Return integer division of Series and other, element-wise (binary operator floordiv).

ge(other)

Get 'greater than or equal to' of Series and other, element-wise (binary operator ge).

get(key[, default])

groupby([by, axis, level, as_index, dropna])

Group Series using a mapper or by a Series of columns.

gt(other)

Return Greater than of series and other, element-wise (binary operator gt).

head([n])

hist([by, bins])

idxmax()

Return the row label of the maximum value.

idxmin()

Return the row label of the minimum value.

interpolate([method])

Fill NaN values using an interpolation method.

isin(values)

Whether elements in Series are contained in values.

isna()

isnull()

item()

Return the first element of the underlying data as a Python scalar.

items()

Lazily iterate over (index, value) tuples.

keys()

Return alias for index.

kurt()

Return unbiased kurtosis over requested axis.

kurtosis()

Return unbiased kurtosis over requested axis.

le(other)

Get 'less than or equal to' of Series and other, element-wise (binary operator le).

line([x, y])

lt(other)

Get 'less than' of Series and other, element-wise (binary operator lt).

map(arg[, na_action, verify_integrity])

Map values of Series according to an input mapping or function.

mask(cond[, other])

Replace values where the condition is True.

max()

Return the maximum of the values over the requested axis.

mean()

Return the mean of the values over the requested axis.

median(*[, exact])

Return the median of the values over the requested axis.

min()

Return the maximum of the values over the requested axis.

mod(other)

Return modulo of Series and other, element-wise (binary operator mod).

mode()

Return the mode(s) of the Series.

mul(other)

Return multiplication of Series and other, element-wise (binary operator mul).

multiply(other)

Return multiplication of Series and other, element-wise (binary operator mul).

ne(other)

Return not equal of Series and other, element-wise (binary operator ne).

nlargest([n, keep])

Return the largest n elements.

notna()

notnull()

nsmallest([n, keep])

Return the smallest n elements.

nunique()

Return number of unique elements in the object.

pad(*[, limit])

pct_change([periods])

peek([n, force, allow_large_results])

Preview n arbitrary elements from the series without guarantees about row selection or ordering.

pipe(func, *args, **kwargs)

pow(other)

Return Exponential power of series and other, element-wise (binary operator pow).

prod()

Return the product of the values over the requested axis.

product()

Return the product of the values over the requested axis.

quantile([q])

Return value at the given quantile.

radd(other)

Return addition of Series and other, element-wise (binary operator radd).

rank([axis, method, numeric_only, ...])

rdiv(other)

Return floating division of Series and other, element-wise (binary operator rtruediv).

rdivmod(other)

Return integer division and modulo of Series and other, element-wise (binary operator rdivmod).

reindex([index, validate])

Conform Series to new index with optional filling logic.

reindex_like(other, *[, validate])

Return an object with matching indices as other object.

rename()

Alter Series index labels or name.

rename_axis()

Set the name of the axis for the index or columns.

reorder_levels(order[, axis])

Rearrange index levels using input order.

replace(to_replace[, value, regex])

Replace values given in to_replace with value.

resample(rule, *[, closed, label, level, origin])

Resample time-series data.

reset_index()

Generate a new DataFrame or Series with the index reset.

rfloordiv(other)

Return integer division of Series and other, element-wise (binary operator rfloordiv).

rmod(other)

Return modulo of Series and other, element-wise (binary operator mod).

rmul(other)

Return multiplication of Series and other, element-wise (binary operator mul).

rolling(window[, min_periods, closed])

round([decimals])

Round each value in a Series to the given number of decimals.

rpow(other)

Return Exponential power of series and other, element-wise (binary operator rpow).

rsub(other)

Return subtraction of Series and other, element-wise (binary operator rsub).

rtruediv(other)

Return floating division of Series and other, element-wise (binary operator rtruediv).

sample([n, frac, random_state, sort])

shift([periods])

skew()

Return unbiased skew over requested axis.

sort_index()

Sort Series by index labels.

sort_values()

Sort by the values.

std()

Return sample standard deviation over requested axis.

sub(other)

Return subtraction of Series and other, element-wise (binary operator sub).

subtract(other)

Return subtraction of Series and other, element-wise (binary operator sub).

sum()

Return the sum of the values over the requested axis.

swaplevel([i, j])

Swap levels i and j in a MultiIndex.

tail([n])

take(indices[, axis])

to_csv([path_or_buf, sep, header, index, ...])

to_dict([into, allow_large_results])

Convert Series to {label -> value} dict or dict-like object.

to_excel(excel_writer[, sheet_name, ...])

Write Series to an Excel sheet.

to_frame([name])

Convert Series to DataFrame.

to_json([path_or_buf, orient, lines, index, ...])

to_latex([buf, columns, header, index, ...])

Render object to a LaTeX tabular, longtable, or nested table.

to_list(*[, allow_large_results])

Return a list of the values.

to_markdown([buf, mode, index, ...])

Print Series in Markdown-friendly format.

to_numpy([dtype, copy, na_value, ...])

A NumPy ndarray representing the values in this Series or Index.

to_pandas([max_download_size, ...])

Writes Series to pandas Series.

to_pandas_batches([page_size, max_results, ...])

Stream Series results to an iterable of pandas Series.

to_pickle(path, *[, allow_large_results])

Pickle (serialize) object to file.

to_string([buf, na_rep, float_format, ...])

Render a string representation of the Series.

to_xarray(*[, allow_large_results])

Return an xarray object from the pandas object.

tolist(*[, allow_large_results])

Return a list of the values.

transpose()

Return the transpose, which is by definition self.

truediv(other)

Return floating division of Series and other, element-wise (binary operator truediv).

unique([keep_order])

Return unique values of Series object.

unstack([level])

Unstack, also known as pivot, Series with MultiIndex to produce DataFrame.

update(other)

Modify Series in place using values from passed Series.

value_counts([normalize, sort, ascending, ...])

Return a Series containing counts of unique values.

var()

Return unbiased variance over requested axis.

where(cond[, other])

Replace values where the condition is False.