- 2.17.0 (latest)
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.0
- 2.0.0-dev0
- 1.36.0
- 1.35.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.24.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.1
- 1.10.0
- 1.9.0
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.1
- 0.19.2
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.1
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.0
- 0.9.0
- 0.8.0
- 0.7.0
- 0.6.0
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.0
Series
(
*
args
,
**
kwargs
)
N-dimensional analogue of DataFrame. Store multi-dimensional in a size-mutable, labeled data structure
Properties
dt
Accessor object for datetime-like properties of the Series values.
dtype
Return the dtype object of the underlying data.
dtypes
Return the dtype object of the underlying data.
empty
Indicates whether Series/DataFrame is empty.
True if Series/DataFrame is entirely empty (no items), meaning any of the axes are of length 0.
bool
iloc
Purely integer-location based indexing for selection by position.
.iloc[]
is primarily integer position based (from 0
to length-1
of the axis), but may also be used with a boolean
array.
Allowed inputs are:
- Not supported yetAn integer, e.g.
5
. - Not supported yetA list or array of integers, e.g.
[4, 3, 0]
. - A slice object with ints, e.g.
1:7
. - Not supported yetA boolean array.
- Not supported yetA
callable
function with one argument (the calling Series or DataFrame) that returns valid output for indexing (one of the above). This is useful in method chains, when you don't have a reference to the calling object, but would like to base your selection on some value. - Not supported yetA tuple of row and column indexes. The tuple
elements consist of one of the above inputs, e.g.
(0, 1)
.
.iloc
will raise IndexError
if a requested indexer is
out-of-bounds, except slice
indexers which allow out-of-bounds
indexing (this conforms with python/numpy slice
semantics).
index
The index (axis labels) of the Series.
is_monotonic_decreasing
Return boolean if values in the object are monotonically decreasing.
is_monotonic_increasing
Return boolean if values in the object are monotonically increasing.
loc
Access a group of rows and columns by label(s) or a boolean array.
.loc[]
is primarily label based, but may also be used with a
boolean array.
Allowed inputs are:
- A single label, e.g.
5
or'a'
, (note that5
is interpreted as a label of the index, and neveras an integer position along the index). - A list of labels, e.g.
['a', 'b', 'c']
. - A boolean series of the same length as the axis being sliced,
e.g.
[True, False, True]
. - An alignable Index. The index of the returned selection will be the input.
- Not supported yetAn alignable boolean Series. The index of the key will be aligned before masking.
- Not supported yetA slice object with labels, e.g.
'a':'f'
. Note: contrary to usual python slices, boththe start and the stop are included. - Not supported yetA
callable
function with one argument (the calling Series or DataFrame) that returns valid output for indexing (one of the above).
NotImplementError
name
Return the name of the Series.
The name of a Series becomes its index or column name if it is used to form a DataFrame. It is also used whenever displaying the Series using the interpreter.
hashable object
ndim
Return an int representing the number of axes / array dimensions.
int
query_job
BigQuery job metadata for the most recent query.
shape
Return a tuple of the shape of the underlying data.
size
Return an int representing the number of elements in this object.
int
str
Vectorized string functions for Series and Index.
NAs stay NA unless handled otherwise by a particular method. Patterned after Python’s string methods, with some inspiration from R’s stringr package.
values
API documentation for values
property.
Methods
__array_ufunc__
__array_ufunc__
(
ufunc
:
numpy
.
ufunc
,
method
:
str
,
*
inputs
,
**
kwargs
)
-
> bigframes
.
series
.
Series
Used to support numpy ufuncs. See: https://numpy.org/doc/stable/reference/ufuncs.html
__rmatmul__
__rmatmul__
(
other
)
Matrix multiplication using binary @
operator in Python>=3.5.
abs
abs
()
-
> bigframes
.
series
.
Series
Return a Series/DataFrame with absolute numeric value of each element.
This function only applies to elements that are all numeric.
add
add
(
other
:
float
|
int
|
Series
)
-
> Series
Return addition of Series and other, element-wise (binary operator add).
Equivalent to series + other
, but with support to substitute a fill_value for
missing data in either one of the inputs.
bigframes.series.Series
add_prefix
add_prefix
(
prefix
:
str
,
axis
:
int
|
str
|
None
=
None
)
-
> Series
Prefix labels with string prefix
.
For Series, the row labels are prefixed. For DataFrame, the column labels are prefixed.
prefix
str
The string to add before each label.
axis
int or str or None, default None
{{0 or 'index', 1 or 'columns', None}}
, default None. Axis to add prefix on.
add_suffix
add_suffix
(
suffix
:
str
,
axis
:
int
|
str
|
None
=
None
)
-
> Series
Suffix labels with string suffix
.
For Series, the row labels are suffixed. For DataFrame, the column labels are suffixed.
agg
agg
(
func
:
str
|
typing
.
Sequence
[
str
])
-
> scalars
.
Scalar
|
Series
Aggregate using one or more operations over the specified axis.
func
function
Function to use for aggregating the data. Accepted combinations are: string function name, list of function names, e.g. ['sum', 'mean']
.
scalar or Series
all
all
()
-
> bool
Return whether all elements are True, potentially over an axis.
Returns True unless there at least one element within a Series or along a DataFrame axis that is False or equivalent (e.g. zero or empty).
scalar or Series
any
any
()
-
> bool
Return whether any element is True, potentially over an axis.
Returns False unless there is at least one element within a series or along a Dataframe axis that is True or equivalent (e.g. non-zero or non-empty).
scalar or Series
apply
apply
(
func
)
-
> bigframes
.
series
.
Series
Invoke function on values of Series.
Can be ufunc (a NumPy function that applies to the entire Series) or a Python function that only works on single values.
func
function
Python function or NumPy ufunc to apply.
bigframes.series.Series
argmax
argmax
()
-
> typing
.
Any
Return int position of the smallest value in the Series.
If the minimum is achieved in multiple locations, the first row position is returned.
Series
argmin
argmin
()
-
> typing
.
Any
Return int position of the largest value in the Series.
If the maximum is achieved in multiple locations, the first row position is returned.
Series
astype
astype
(
dtype
:
typing
.
Union
[
typing
.
Literal
[
"boolean"
,
"Float64"
,
"Int64"
,
"string"
,
"string[pyarrow]"
,
"timestamp[us, tz=UTC][pyarrow]"
,
"timestamp[us][pyarrow]"
,
"date32[day][pyarrow]"
,
"time64[us][pyarrow]"
,
],
pandas
.
core
.
arrays
.
boolean
.
BooleanDtype
,
pandas
.
core
.
arrays
.
floating
.
Float64Dtype
,
pandas
.
core
.
arrays
.
integer
.
Int64Dtype
,
pandas
.
core
.
arrays
.
string_
.
StringDtype
,
pandas
.
core
.
dtypes
.
dtypes
.
ArrowDtype
,
]
)
-
> bigframes
.
series
.
Series
Cast a pandas object to a specified dtype dtype
.
dtype
str or pandas.ExtensionDtype
A dtype supported by BigQuery DataFrame include 'boolean','Float64','Int64', 'string', 'tring[pyarrow]','timestamp[us, tz=UTC][pyarrow]', 'timestamp us][pyarrow]
','date32 day][pyarrow]
','time64 us][pyarrow]
' A pandas.ExtensionDtype include pandas.BooleanDtype(), pandas.Float64Dtype(), pandas.Int64Dtype(), pandas.StringDtype(storage="pyarrow"), pd.ArrowDtype(pa.date32()), pd.ArrowDtype(pa.time64("us")), pd.ArrowDtype(pa.timestamp("us")), pd.ArrowDtype(pa.timestamp("us", tz="UTC")).
between
between
(
left
,
right
,
inclusive
=
"both"
)
Return boolean Series equivalent to left <= series <= right.
This function returns a boolean vector containing True
wherever the
corresponding Series element is between the boundary values left
and right
. NA values are treated as False
.
left
scalar or list-like
Left boundary.
right
scalar or list-like
Right boundary.
inclusive
{"both", "neither", "left", "right"}
Include boundaries. Whether to set each bound as closed or open.
Series
clip
clip
(
lower
,
upper
)
Trim values at input threshold(s).
Assigns values outside boundary to boundary values. Thresholds can be singular values or array like, and in the latter case the clipping is performed element-wise in the specified axis.
lower
float or array-like, default None
Minimum threshold value. All values below this threshold will be set to it. A missing threshold (e.g NA) will not clip the value.
upper
float or array-like, default None
Maximum threshold value. All values above this threshold will be set to it. A missing threshold (e.g NA) will not clip the value.
copy
copy
()
-
> bigframes
.
series
.
Series
Make a copy of this object's indices and data.
A new object will be created with a copy of the calling object's data and indices. Modifications to the data or indices of the copy will not be reflected in the original object.
corr
corr
(
other
:
bigframes
.
series
.
Series
,
method
=
"pearson"
,
min_periods
=
None
)
-
> float
Compute the correlation with the other Series. Non-number values are ignored in the computation.
Uses the "Pearson" method of correlation. Numbers are converted to float before calculation, so the result may be unstable.
other
Series
The series with which this is to be correlated.
method
string, default "pearson"
Correlation method to use - currently only "pearson" is supported.
min_periods
int, default None
The minimum number of observations needed to return a result. Non-default values are not yet supported, so a result will be returned for at least two observations.
count
count
()
-
> int
Return number of non-NA/null observations in the Series.
int or Series (if level specified)
cummax
cummax
()
-
> bigframes
.
series
.
Series
Return cumulative maximum over a DataFrame or Series axis.
Returns a DataFrame or Series of the same size containing the cumulative maximum.
axis
{{0 or 'index', 1 or 'columns'}}, default 0
The index or the name of the axis. 0 is equivalent to None or 'index'. For Series
this parameter is unused and defaults to 0.
bigframes.series.Series
cummin
cummin
()
-
> bigframes
.
series
.
Series
Return cumulative minimum over a DataFrame or Series axis.
Returns a DataFrame or Series of the same size containing the cumulative minimum.
axis
{0 or 'index', 1 or 'columns'}, default 0
The index or the name of the axis. 0 is equivalent to None or 'index'. For Series
this parameter is unused and defaults to 0.
skipna
bool, default True
Exclude NA/null values. If an entire row/column is NA, the result will be NA.
bigframes.series.Series
cumprod
cumprod
()
-
> bigframes
.
series
.
Series
Return cumulative product over a DataFrame or Series axis.
Returns a DataFrame or Series of the same size containing the cumulative product.
bigframes.series.Series
cumsum
cumsum
()
-
> bigframes
.
series
.
Series
Return cumulative sum over a DataFrame or Series axis.
Returns a DataFrame or Series of the same size containing the cumulative sum.
axis
{0 or 'index', 1 or 'columns'}, default 0
The index or the name of the axis. 0 is equivalent to None or 'index'. For Series
this parameter is unused and defaults to 0.
scalar or Series
diff
diff
(
periods
:
int
=
1
)
-
> bigframes
.
series
.
Series
First discrete difference of element.
Calculates the difference of a {klass} element compared with another element in the {klass} (default is element in previous row).
periods
int, default 1
Periods to shift for calculating difference, accepts negative values.
{klass}
div
div
(
other
:
float
|
int
|
Series
)
-
> Series
Return floating division of Series and other, element-wise (binary operator truediv).
Equivalent to series / other
, but with support to substitute a fill_value for
missing data in either one of the inputs.
bigframes.series.Series
divide
divide
(
other
:
float
|
int
|
Series
)
-
> Series
Return floating division of Series and other, element-wise (binary operator truediv).
Equivalent to series / other
, but with support to substitute a fill_value for
missing data in either one of the inputs.
bigframes.series.Series
divmod
divmod
(
other
)
-
> typing
.
Tuple
[
bigframes
.
series
.
Series
,
bigframes
.
series
.
Series
]
Return integer division and modulo of Series and other, element-wise (binary operator divmod).
Equivalent to divmod(series, other).
dot
dot
(
other
)
Compute the dot product between the Series and the columns of other.
This method computes the dot product between the Series and another one, or the Series and each columns of a DataFrame, or the Series and each columns of an array.
It can also be called using self @ other
in Python >= 3.5.
other
Series
The other object to compute the dot product with its columns.
scalar, Series or numpy.ndarray
drop
drop
(
labels
:
typing
.
Optional
[
typing
.
Any
]
=
None
,
*
,
axis
:
typing
.
Union
[
int
,
str
]
=
0
,
index
:
typing
.
Optional
[
typing
.
Any
]
=
None
,
columns
:
typing
.
Optional
[
typing
.
Union
[
typing
.
Hashable
,
typing
.
Iterable
[
typing
.
Hashable
]]
]
=
None
,
level
:
typing
.
Optional
[
typing
.
Union
[
str
,
int
]]
=
None
)
-
> bigframes
.
series
.
Series
Return Series with specified index labels removed.
Remove elements of a Series based on specifying the index labels. When using a multi-index, labels on different levels can be removed by specifying the level.
labels
single label or list-like
Index labels to drop.
KeyError
bigframes.series.Series
inplace=True
.drop_duplicates
drop_duplicates
(
*
,
keep
:
str
=
"first"
)
-
> bigframes
.
series
.
Series
Return Series with duplicate values removed.
keep
{'first', 'last', False
}, default 'first'
Method to handle dropping duplicates: 'first' : Drop duplicates except for the first occurrence. 'last' : Drop duplicates except for the last occurrence. False
: Drop all duplicates.
bigframes.series.Series
inplace=True
.droplevel
droplevel
(
level
:
typing
.
Union
[
str
,
int
,
typing
.
Sequence
[
typing
.
Union
[
str
,
int
]]])
Return Series with requested index / column level(s) removed.
level
int, str, or list-like
If a string is given, must be the name of a level If list-like, elements must be names or positional indexes of levels.
dropna
dropna
(
*
,
axis
:
int
=
0
,
inplace
:
bool
=
False
,
how
:
typing
.
Optional
[
str
]
=
None
,
ignore_index
:
bool
=
False
)
-
> bigframes
.
series
.
Series
Return a new Series with missing values removed.
axis
0 or 'index'
Unused. Parameter needed for compatibility with DataFrame.
inplace
bool, default False
Unsupported, do not set.
how
str, optional
Not in use. Kept for compatibility.
Series
duplicated
duplicated
(
keep
:
str
=
"first"
)
-
> bigframes
.
series
.
Series
Indicate duplicate Series values.
Duplicated values are indicated as True
values in the resulting
Series. Either all duplicates, all except the first or all except the
last occurrence of duplicates can be indicated.
keep
{'first', 'last', False}, default 'first'
Method to handle dropping duplicates: 'first' : Mark duplicates as True
except for the first occurrence. 'last' : Mark duplicates as True
except for the last occurrence. False
: Mark all duplicates as True
.
bigframes.series.Series
eq
eq
(
other
:
object
)
-
> bigframes
.
series
.
Series
Return equal of Series and other, element-wise (binary operator eq).
Equivalent to other == series
, but with support to substitute a fill_value for
missing data in either one of the inputs.
Series
expanding
expanding
(
min_periods
:
int
=
1
)
-
> bigframes
.
core
.
window
.
Window
Provide expanding window calculations.
min_periods
int, default 1
Minimum number of observations in window required to have a value; otherwise, result is np.nan
.
fillna
fillna
(
value
=
None
)
-
> bigframes
.
series
.
Series
Fill NA/NaN values using the specified method.
value
scalar, dict, Series, or DataFrame, default None
Value to use to fill holes (e.g. 0).
Series or None
floordiv
floordiv
(
other
:
float
|
int
|
Series
)
-
> Series
Return integer division of Series and other, element-wise (binary operator floordiv).
Equivalent to series // other
, but with support to substitute a fill_value for
missing data in either one of the inputs.
bigframes.series.Series
ge
ge
(
other
)
-
> bigframes
.
series
.
Series
Get 'greater than or equal to' of Series and other, element-wise (binary operator >=
).
Equivalent to series >= other
, but with support to substitute a fill_value for
missing data in either one of the inputs.
bigframes.series.Series
get
get
(
key
,
default
=
None
)
Get item from object for given key (ex: DataFrame column).
Returns default value if not found.
groupby
groupby
(
by
:
typing
.
Union
[
blocks
.
Label
,
Series
,
typing
.
Sequence
[
typing
.
Union
[
blocks
.
Label
,
Series
]]
]
=
None
,
axis
=
0
,
level
:
typing
.
Optional
[
int
|
str
|
typing
.
Sequence
[
int
]
|
typing
.
Sequence
[
str
]
]
=
None
,
as_index
:
bool
=
True
,
*
,
dropna
:
bool
=
True
)
-
> bigframes
.
core
.
groupby
.
SeriesGroupBy
Group Series using a mapper or by a Series of columns.
A groupby operation involves some combination of splitting the object, applying a function, and combining the results. This can be used to group large amounts of data and compute operations on these groups.
by
mapping, function, label, pd.Grouper or list of such, default None
Used to determine the groups for the groupby. If by
is a function, it's called on each value of the object's index. If a dict or Series is passed, the Series or dict VALUES will be used to determine the groups (the Series' values are first aligned; see .align()
method). If a list or ndarray of length equal to the selected axis is passed (see the groupby user guide https://pandas.pydata.org/pandas-docs/stable/user_guide/groupby.html#splitting-an-object-into-groups
_), the values are used as-is to determine the groups. A label or list of labels may be passed to group by the columns in self
. Notice that a tuple is interpreted as a (single) key.
axis
{0 or 'index', 1 or 'columns'}, default 0
Split along rows (0) or columns (1). For Series
this parameter is unused and defaults to 0.
level
int, level name, or sequence of such, default None
If the axis is a MultiIndex (hierarchical), group by a particular level or levels. Do not specify both by
and level
.
as_index
bool, default True
Return object with group labels as the index. Only relevant for DataFrame input. as_index=False is effectively "SQL-style" grouped output. This argument has no effect on filtrations (see the "filtrations in the user guide" https://pandas.pydata.org/docs/dev/user_guide/groupby.html#filtration
), such as head()
, tail()
, nth()
and in transformations (see the "transformations in the user guide" https://pandas.pydata.org/docs/dev/user_guide/groupby.html#transformation
).
gt
gt
(
other
)
-
> bigframes
.
series
.
Series
Get 'less than or equal to' of Series and other, element-wise (binary operator <=
).
Equivalent to series <= other
, but with support to substitute a fill_value for
missing data in either one of the inputs.
bigframes.series.Series
head
head
(
n
:
int
=
5
)
-
> bigframes
.
series
.
Series
Return the first n
rows.
This function returns the first n
rows for the object based
on position. It is useful for quickly testing if your object
has the right type of data in it.
Not yet supportedFor negative values of n
, this function returns
all rows except the last |n|
rows, equivalent to df[:n]
.
If n is larger than the number of rows, this function returns all rows.
n
int, default 5
Default 5. Number of rows to select.
isin
isin
(
values
)
-
> "Series"
|
None
Whether elements in Series are contained in values.
Return a boolean Series showing whether each element in the Series matches an element in the passed sequence of values exactly.
values
list-like
The sequence of values to test. Passing in a single string will raise a TypeError. Instead, turn a single string into a list of one element.
TypeError
bigframes.series.Series
isna
isna
()
-
> bigframes
.
series
.
Series
Detect missing values.
Return a boolean same-sized object indicating if the values are NA.
NA values get mapped to True values. Everything else gets mapped to
False values. Characters such as empty strings ''
or numpy.inf
are not considered NA values.
isnull
isnull
()
-
> bigframes
.
series
.
Series
Detect missing values.
Return a boolean same-sized object indicating if the values are NA.
NA values get mapped to True values. Everything else gets mapped to
False values. Characters such as empty strings ''
or numpy.inf
are not considered NA values.
kurt
kurt
()
Return unbiased kurtosis over requested axis.
Kurtosis obtained using Fisher’s definition of kurtosis (kurtosis of normal == 0.0). Normalized by N-1.
scalar or scalar
kurtosis
kurtosis
()
Return unbiased kurtosis over requested axis.
Kurtosis obtained using Fisher’s definition of kurtosis (kurtosis of normal == 0.0). Normalized by N-1.
scalar or scalar
le
le
(
other
)
-
> bigframes
.
series
.
Series
Get 'less than or equal to' of Series and other, element-wise (binary operator <=
).
Equivalent to series <= other
, but with support to substitute a fill_value for
missing data in either one of the inputs.
lt
lt
(
other
)
-
> bigframes
.
series
.
Series
Get 'less than' of Series and other, element-wise (binary operator <
).
Equivalent to series < other
, but with support to substitute a fill_value for
missing data in either one of the inputs.
map
map
(
arg
:
typing
.
Union
[
typing
.
Mapping
,
bigframes
.
series
.
Series
],
na_action
:
typing
.
Optional
[
str
]
=
None
,
*
,
verify_integrity
:
bool
=
False
)
-
> bigframes
.
series
.
Series
Map values of Series according to an input mapping or function.
Used for substituting each value in a Series with another value,
that may be derived from a remote function, dict
, or a Series
.
If arg is a remote function, the overhead for remote functions applies. If mapping with a dict, fully deferred computation is possible. If mapping with a Series, fully deferred computation is only possible if verify_integrity=False.
arg
function, Mapping, Series
remote function, collections.abc.Mapping subclass or Series Mapping correspondence.
Series
mask
mask
(
cond
,
other
=
None
)
-
> bigframes
.
series
.
Series
Replace values where the condition is True.
cond
bool Series/DataFrame, array-like, or callable
Where cond is False, keep the original value. Where True, replace with corresponding value from other. If cond is callable, it is computed on the Series/DataFrame and should return boolean Series/DataFrame or array. The callable must not change input Series/DataFrame (though pandas doesn’t check it).
other
scalar, Series/DataFrame, or callable
Entries where cond is True are replaced with corresponding value from other. If other is callable, it is computed on the Series/DataFrame and should return scalar or Series/DataFrame. The callable must not change input Series/DataFrame (though pandas doesn’t check it). If not specified, entries will be filled with the corresponding NULL value (np.nan for numpy dtypes, pd.NA for extension dtypes).
bigframes.series.Series
max
max
()
-
> typing
.
Any
Return the maximum of the values over the requested axis.
If you want the index of the maximum, use idxmax
. This is the equivalent
of the numpy.ndarray
method argmax
.
mean
mean
()
-
> float
Return the mean of the values over the requested axis.
median
median
(
*
,
exact
:
bool
=
False
)
-
> float
Return the median of the values over the requested axis.
exact
bool. default False
Default False. Get the exact median instead of an approximate one. Note: exact=True
not yet supported.
min
min
()
-
> typing
.
Any
Return the maximum of the values over the requested axis.
If you want the index of the minimum, use idxmin
. This is the equivalent
of the numpy.ndarray
method argmin
.
mod
mod
(
other
)
-
> bigframes
.
series
.
Series
Return modulo of Series and other, element-wise (binary operator mod).
Equivalent to series % other
, but with support to substitute a fill_value for
missing data in either one of the inputs.
bigframes.series.Series
mode
mode
()
-
> bigframes
.
series
.
Series
Return the mode(s) of the Series.
The mode is the value that appears most often. There can be multiple modes.
Always returns Series even if only one value is returned.
bigframes.series.Series
mul
mul
(
other
:
float
|
int
|
Series
)
-
> Series
Return multiplication of Series and other, element-wise (binary operator mul).
Equivalent to other * series
, but with support to substitute a fill_value for
missing data in either one of the inputs.
bigframes.series.Series
multiply
multiply
(
other
:
float
|
int
|
Series
)
-
> Series
Return multiplication of Series and other, element-wise (binary operator mul).
Equivalent to other * series
, but with support to substitute a fill_value for
missing data in either one of the inputs.
bigframes.series.Series
ne
ne
(
other
:
object
)
-
> bigframes
.
series
.
Series
Return not equal of Series and other, element-wise (binary operator ne).
Equivalent to other != series
, but with support to substitute a fill_value for
missing data in either one of the inputs.
bigframes.series.Series
nlargest
nlargest
(
n
:
int
=
5
,
keep
:
str
=
"first"
)
-
> bigframes
.
series
.
Series
Return the largest n
elements.
n
int, default 5
Return this many descending sorted values.
keep
{'first', 'last', 'all'}, default 'first'
When there are duplicate values that cannot all fit in a Series of n
elements: first
: return the first n
occurrences in order of appearance. last
: return the last n
occurrences in reverse order of appearance. all
: keep all occurrences. This can result in a Series of size larger than n
.
bigframes.series.Series
n
largest values in the Series, sorted in decreasing order.notna
notna
()
-
> bigframes
.
series
.
Series
Detect existing (non-missing) values.
Return a boolean same-sized object indicating if the values are not NA.
Non-missing values get mapped to True. Characters such as empty
strings ''
or numpy.inf
are not considered NA values.
NA values get mapped to False values.
NDFrame
notnull
notnull
()
-
> bigframes
.
series
.
Series
Detect existing (non-missing) values.
Return a boolean same-sized object indicating if the values are not NA.
Non-missing values get mapped to True. Characters such as empty
strings ''
or numpy.inf
are not considered NA values.
NA values get mapped to False values.
NDFrame
nsmallest
nsmallest
(
n
:
int
=
5
,
keep
:
str
=
"first"
)
-
> bigframes
.
series
.
Series
Return the smallest n
elements.
n
int, default 5
Return this many ascending sorted values.
keep
{'first', 'last', 'all'}, default 'first'
When there are duplicate values that cannot all fit in a Series of n
elements: first
: return the first n
occurrences in order of appearance. last
: return the last n
occurrences in reverse order of appearance. all
: keep all occurrences. This can result in a Series of size larger than n
.
bigframes.series.Series
n
smallest values in the Series, sorted in increasing order.nunique
nunique
()
-
> int
Return number of unique elements in the object.
Excludes NA values by default.
int
pow
pow
(
other
:
float
|
int
|
Series
)
-
> Series
Return Exponential power of series and other, element-wise (binary operator pow
).
Equivalent to series ** other
, but with support to substitute a fill_value for
missing data in either one of the inputs.
bigframes.series.Series
prod
prod
()
-
> float
Return the product of the values over the requested axis.
product
product
()
-
> float
Return the product of the values over the requested axis.
radd
radd
(
other
:
float
|
int
|
Series
)
-
> Series
Return addition of Series and other, element-wise (binary operator radd).
Equivalent to other + series
, but with support to substitute a fill_value for
missing data in either one of the inputs.
bigframes.series.Series
rank
rank
(
axis
=
0
,
method
:
str
=
"average"
,
numeric_only
=
False
,
na_option
:
str
=
"keep"
,
ascending
:
bool
=
True
,
)
-
> bigframes
.
series
.
Series
Compute numerical data ranks (1 through n) along axis.
By default, equal values are assigned a rank that is the average of the ranks of those values.
method
{'average', 'min', 'max', 'first', 'dense'}, default 'average'
How to rank the group of records that have the same value (i.e. ties): average
: average rank of the group, min
: lowest rank in the group max : highest rank in the group,
first : ranks assigned in order they appear in the array,
dense`: like 'min', but rank always increases by 1 between groups.
numeric_only
bool, default False
For DataFrame objects, rank only numeric columns if set to True.
na_option
{'keep', 'top', 'bottom'}, default 'keep'
How to rank NaN values: keep
: assign NaN rank to NaN values, , top
: assign lowest rank to NaN values, bottom
: assign highest rank to NaN values.
ascending
bool, default True
Whether or not the elements should be ranked in ascending order.
same type as caller
rdiv
rdiv
(
other
:
float
|
int
|
Series
)
-
> Series
Return floating division of Series and other, element-wise (binary operator rtruediv).
Equivalent to other / series
, but with support to substitute a fill_value for
missing data in either one of the inputs.
bigframes.series.Series
rdivmod
rdivmod
(
other
)
-
> typing
.
Tuple
[
bigframes
.
series
.
Series
,
bigframes
.
series
.
Series
]
Return integer division and modulo of Series and other, element-wise (binary operator rdivmod).
Equivalent to other divmod series.
rename
rename
(
index
:
typing
.
Optional
[
typing
.
Union
[
typing
.
Hashable
,
typing
.
Mapping
[
typing
.
Any
,
typing
.
Any
]]
]
=
None
,
**
kwargs
)
-
> bigframes
.
series
.
Series
Alter Series index labels or name.
Function / dict values must be unique (1-to-1). Labels not contained in a dict / Series will be left as-is. Extra labels listed don't throw an error.
Alternatively, change Series.name
with a scalar value.
index
scalar, hashable sequence, dict-like or function optional
Functions or dict-like are transformations to apply to the index. Scalar or hashable sequence-like will alter the Series.name
attribute.
bigframes.series.Series
rename_axis
rename_axis
(
mapper
:
typing
.
Union
[
typing
.
Hashable
,
typing
.
Sequence
[
typing
.
Hashable
]],
**
kwargs
)
-
> bigframes
.
series
.
Series
Set the name of the axis for the index or columns.
mapper
scalar, list-like, optional
Value to set the axis name attribute.
bigframes.series.Series
reorder_levels
reorder_levels
(
order
:
typing
.
Union
[
str
,
int
,
typing
.
Sequence
[
typing
.
Union
[
str
,
int
]]]
)
Rearrange index levels using input order.
May not drop or duplicate levels.
order
list of int representing new level order
Reference level by number or key.
reset_index
reset_index
(
*
,
name
:
typing
.
Optional
[
str
]
=
None
,
drop
:
bool
=
False
)
-
> bigframes
.
dataframe
.
DataFrame
|
Series
Generate a new DataFrame or Series with the index reset.
This is useful when the index needs to be treated as a column, or when the index is meaningless and needs to be reset to the default before another operation.
drop
bool, default False
Just reset the index, without inserting it as a column in the new DataFrame.
name
object, optional
The name to use for the column containing the original Series values. Uses self.name
by default. This argument is ignored when drop
is True.
rfloordiv
rfloordiv
(
other
:
float
|
int
|
Series
)
-
> Series
Return integer division of Series and other, element-wise (binary operator rfloordiv).
Equivalent to other // series
, but with support to substitute a fill_value for
missing data in either one of the inputs.
bigframes.series.Series
rmod
rmod
(
other
)
-
> bigframes
.
series
.
Series
Return modulo of Series and other, element-wise (binary operator mod).
Equivalent to series % other
, but with support to substitute a fill_value for
missing data in either one of the inputs.
bigframes.series.Series
rmul
rmul
(
other
:
float
|
int
|
Series
)
-
> Series
Return multiplication of Series and other, element-wise (binary operator mul).
Equivalent to series * others
, but with support to substitute a fill_value for
missing data in either one of the inputs.
Series
rolling
rolling
(
window
:
int
,
min_periods
=
None
)
-
> bigframes
.
core
.
window
.
Window
Provide rolling window calculations.
window
int, timedelta, str, offset, or BaseIndexer subclass
Size of the moving window. If an integer, the fixed number of observations used for each window. If a timedelta, str, or offset, the time period of each window. Each window will be a variable sized based on the observations included in the time-period. This is only valid for datetime-like indexes. To learn more about the offsets & frequency strings, please see this link https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases
__. If a BaseIndexer subclass, the window boundaries based on the defined get_window_bounds
method. Additional rolling keyword arguments, namely min_periods
, center
, closed
and step
will be passed to get_window_bounds
.
min_periods
int, default None
Minimum number of observations in window required to have a value; otherwise, result is np.nan
. For a window that is specified by an offset, min_periods
will default to 1. For a window that is specified by an integer, min_periods
will default to the size of the window.
Window
subclass if a win_type
is passed. Rolling
subclass if win_type
is not passed.round
round
(
decimals
=
0
)
-
> bigframes
.
series
.
Series
Round each value in a Series to the given number of decimals.
decimals
int, default 0
Number of decimal places to round to. If decimals is negative, it specifies the number of positions to the left of the decimal point.
bigframes.series.Series
rpow
rpow
(
other
:
float
|
int
|
Series
)
-
> Series
Return Exponential power of series and other, element-wise (binary operator rpow
).
Equivalent to other ** series
, but with support to substitute a fill_value for
missing data in either one of the inputs.
bigframes.series.Series
rsub
rsub
(
other
:
float
|
int
|
Series
)
-
> Series
Return subtraction of Series and other, element-wise (binary operator rsub).
Equivalent to other - series
, but with support to substitute a fill_value for
missing data in either one of the inputs.
bigframes.series.Series
rtruediv
rtruediv
(
other
:
float
|
int
|
Series
)
-
> Series
Return floating division of Series and other, element-wise (binary operator rtruediv).
Equivalent to other / series
, but with support to substitute a fill_value for
missing data in either one of the inputs.
bigframes.series.Series
sample
sample
(
n
:
typing
.
Optional
[
int
]
=
None
,
frac
:
typing
.
Optional
[
float
]
=
None
,
*
,
random_state
:
typing
.
Optional
[
int
]
=
None
)
Return a random sample of items from an axis of object.
You can use random_state
for reproducibility.
n
Optional[int], default None
Number of items from axis to return. Cannot be used with frac
. Default = 1 if frac
= None.
frac
Optional[float], default None
Fraction of axis items to return. Cannot be used with n
.
random_state
Optional[int], default None
Seed for random number generator.
shift
shift
(
periods
:
int
=
1
)
-
> bigframes
.
series
.
Series
Shift index by desired number of periods.
Shifts the index without realigning the data.
NDFrame
skew
skew
()
Return unbiased skew over requested axis.
Normalized by N-1.
sort_index
sort_index
(
*
,
axis
=
0
,
ascending
=
True
,
na_position
=
"last"
)
-
> bigframes
.
series
.
Series
Sort Series by index labels.
Returns a new Series sorted by label if inplace
argument is False
, otherwise updates the original series and returns None.
axis
{0 or 'index'}
Unused. Parameter needed for compatibility with DataFrame.
ascending
bool or list-like of bools, default True
Sort ascending vs. descending. When the index is a MultiIndex the sort direction can be controlled for each level individually.
na_position
{'first', 'last'}, default 'last'
If 'first' puts NaNs at the beginning, 'last' puts NaNs at the end. Not implemented for MultiIndex.
bigframes.series.Series
inplace=True
.sort_values
sort_values
(
*
,
axis
=
0
,
ascending
=
True
,
kind
:
str
=
"quicksort"
,
na_position
=
"last"
)
-
> bigframes
.
series
.
Series
Sort by the values.
Sort a Series in ascending or descending order by some criterion.
axis
0 or 'index'
Unused. Parameter needed for compatibility with DataFrame.
ascending
bool or list of bools, default True
If True, sort values in ascending order, otherwise descending.
kind
str, default to 'quicksort'
Choice of sorting algorithm. Accepts 'quicksort’, ‘mergesort’, ‘heapsort’, ‘stable’. Ignored except when determining whether to sort stably. 'mergesort' or 'stable' will result in stable reorder
na_position
{'first' or 'last'}, default 'last'
Argument 'first' puts NaNs at the beginning, 'last' puts NaNs at the end.
bigframes.series.Series
inplace=True
.std
std
()
-
> float
Return sample standard deviation over requested axis.
Normalized by N-1 by default.
sub
sub
(
other
:
float
|
int
|
Series
)
-
> Series
Return subtraction of Series and other, element-wise (binary operator sub).
Equivalent to series - other
, but with support to substitute a fill_value for
missing data in either one of the inputs.
bigframes.series.Series
subtract
subtract
(
other
:
float
|
int
|
Series
)
-
> Series
Return subtraction of Series and other, element-wise (binary operator sub).
Equivalent to series - other
, but with support to substitute a fill_value for
missing data in either one of the inputs.
bigframes.series.Series
sum
sum
()
-
> float
Return the sum of the values over the requested axis.
This is equivalent to the method numpy.sum
.
tail
tail
(
n
:
int
=
5
)
-
> bigframes
.
series
.
Series
Return the last n
rows.
This function returns last n
rows from the object based on
position. It is useful for quickly verifying data, for example,
after sorting or appending rows.
For negative values of n
, this function returns all rows except
the first |n|
rows, equivalent to df[|n|:]
.
If n is larger than the number of rows, this function returns all rows.
n
int, default 5
Number of rows to select.
to_csv
to_csv
(
path_or_buf
=
None
,
**
kwargs
)
-
> typing
.
Optional
[
str
]
Write object to a comma-separated values (csv) file.
path_or_buf
str, path object, file-like object, or None, default None
String, path object (implementing os.PathLike[str]), or file-like object implementing a write() function. If None, the result is returned as a string. If a non-binary file object is passed, it should be opened with newline=''
, disabling universal newlines. If a binary file object is passed, mode
might need to contain a 'b'
.
None or str
to_dict
to_dict
(
into
:
type
[
dict
]
=
< class
'
dict
'>) -> typing.Mapping
Convert Series to {label -> value} dict or dict-like object.
into
class, default dict
The collections.abc.Mapping subclass to use as the return object. Can be the actual class or an empty instance of the mapping type you want. If you want a collections.defaultdict, you must pass it initialized.
collections.abc.Mapping
to_excel
to_excel
(
excel_writer
,
sheet_name
=
"Sheet1"
,
**
kwargs
)
-
> None
Write Series to an Excel sheet.
To write a single Series to an Excel .xlsx file it is only necessary to
specify a target file name. To write to multiple sheets it is necessary to
create an ExcelWriter
object with a target file name, and specify a sheet
in the file to write to.
Multiple sheets may be written to by specifying unique sheet_name
.
With all data written to the file it is necessary to save the changes.
Note that creating an ExcelWriter
object with a file name that already
exists will result in the contents of the existing file being erased.
excel_writer
path-like, file-like, or ExcelWriter object
File path or existing ExcelWriter.
sheet_name
str, default 'Sheet1'
Name of sheet to contain Series.
to_frame
to_frame
(
name
:
typing
.
Optional
[
typing
.
Hashable
]
=
None
,
)
-
> bigframes
.
dataframe
.
DataFrame
Convert Series to DataFrame.
The column in the new dataframe will be named name (the keyword parameter) if the name parameter is provided and not None.
to_json
to_json
(
path_or_buf
=
None
,
orient
:
typing
.
Literal
[
"split"
,
"records"
,
"index"
,
"columns"
,
"values"
,
"table"
]
=
"columns"
,
**
kwargs
)
-
> typing
.
Optional
[
str
]
Convert the object to a JSON string.
Note NaN's and None will be converted to null and datetime objects will be converted to UNIX timestamps.
path_or_buf
str, path object, file-like object, or None, default None
String, path object (implementing os.PathLike[str]), or file-like object implementing a write() function. If None, the result is returned as a string.
orient
{"split", "records", "index", "columns", "values", "table"}, default "columns"
Indication of expected JSON string format. 'split' : dict like {{'index' -> [index], 'columns' -> [columns],'data' -> [values]}} 'records' : list like [{{column -> value}}, ... , {{column -> value}}] 'index' : dict like {{index -> {{column -> value}}}} 'columns' : dict like {{column -> {{index -> value}}}} 'values' : just the values array 'table' : dict like {{'schema': {{schema}}, 'data': {{data}}}} Describing the data, where data component is like orient='records'
.
None or str
to_latex
to_latex
(
buf
=
None
,
columns
=
None
,
header
=
True
,
index
=
True
,
**
kwargs
)
-
> typing
.
Optional
[
str
]
Render object to a LaTeX tabular, longtable, or nested table.
buf
str, Path or StringIO-like, optional, default None
Buffer to write to. If None, the output is returned as a string.
columns
list of label, optional
The subset of columns to write. Writes all columns by default.
header
bool or list of str, default True
Write out the column names. If a list of strings is given, it is assumed to be aliases for the column names.
index
bool, default True
Write row names (index).
str or None
to_list
to_list
()
-
> list
Return a list of the values.
These are each a scalar type, which is a Python scalar (for str, int, float) or a pandas scalar (for Timestamp/Timedelta/Interval/Period).
list
to_markdown
to_markdown
(
buf
:
typing
.
IO
[
str
]
|
None
=
None
,
mode
:
str
=
"wt"
,
index
:
bool
=
True
,
**
kwargs
)
-
> typing
.
Optional
[
str
]
Print {klass} in Markdown-friendly format.
buf
str, Path or StringIO-like, optional, default None
Buffer to write to. If None, the output is returned as a string.
mode
str, optional
Mode in which file is opened, "wt" by default.
index
bool, optional, default True
Add index (row) labels.
str
to_numpy
to_numpy
(
dtype
=
None
,
copy
=
False
,
na_value
=
None
,
**
kwargs
)
-
> numpy
.
ndarray
A NumPy ndarray representing the values in this Series or Index.
dtype
str or numpy.dtype, optional
The dtype to pass to numpy.asarray
.
copy
bool, default False
Whether to ensure that the returned value is not a view on another array. Note that copy=False
does not ensure
that to_numpy()
is no-copy. Rather, copy=True
ensure that a copy is made, even if not strictly necessary.
na_value
Any, optional
The value to use for missing values. The default value depends on dtype
and the type of the array.
numpy.ndarray
to_pandas
to_pandas
(
max_download_size
:
typing
.
Optional
[
int
]
=
None
,
sampling_method
:
typing
.
Optional
[
str
]
=
None
,
random_state
:
typing
.
Optional
[
int
]
=
None
,
)
-
> pandas
.
core
.
series
.
Series
Writes Series to pandas Series.
max_download_size
int, default None
Download size threshold in MB. If max_download_size is exceeded when downloading data (e.g., to_pandas()), the data will be downsampled if bigframes.options .sampling.enable_downsampling is True, otherwise, an error will be raised. If set to a value other than None, this will supersede the global config.
sampling_method
str, default None
Downsampling algorithms to be chosen from, the choices are: "head": This algorithm returns a portion of the data from the beginning. It is fast and requires minimal computations to perform the downsampling; "uniform": This algorithm returns uniform random samples of the data. If set to a value other than None, this will supersede the global config.
random_state
int, default None
The seed for the uniform downsampling algorithm. If provided, the uniform method may take longer to execute and require more computation. If set to a value other than None, this will supersede the global config.
pandas.Series
to_pickle
to_pickle
(
path
,
**
kwargs
)
-
> None
Pickle (serialize) object to file.
path
str, path object, or file-like object
String, path object (implementing os.PathLike[str]
), or file-like object implementing a binary write()
function. File path where the pickled object will be stored.
to_string
to_string
(
buf
=
None
,
na_rep
=
"NaN"
,
float_format
=
None
,
header
=
True
,
index
=
True
,
length
=
False
,
dtype
=
False
,
name
=
False
,
max_rows
=
None
,
min_rows
=
None
,
)
-
> typing
.
Optional
[
str
]
Render a string representation of the Series.
buf
StringIO-like, optional
Buffer to write to.
na_rep
str, optional
String representation of NaN to use, default 'NaN'.
float_format
one-parameter function, optional
Formatter function to apply to columns' elements if they are floats, default None.
header
bool, default True
Add the Series header (index name).
index
bool, optional
Add index (row) labels, default True.
length
bool, default False
Add the Series length.
dtype
bool, default False
Add the Series dtype.
name
bool, default False
Add the Series name if not None.
max_rows
int, optional
Maximum number of rows to show before truncating. If None, show all.
min_rows
int, optional
The number of rows to display in a truncated repr (when number of rows is above max_rows
).
str or None
buf=None
, otherwise None.to_xarray
to_xarray
()
Return an xarray object from the pandas object.
xarray.DataArray or xarray.Dataset
tolist
tolist
()
-
> list
Return a list of the values.
These are each a scalar type, which is a Python scalar (for str, int, float) or a pandas scalar (for Timestamp/Timedelta/Interval/Period).
list
truediv
truediv
(
other
:
float
|
int
|
Series
)
-
> Series
Return floating division of Series and other, element-wise (binary operator truediv).
Equivalent to series / other
, but with support to substitute a fill_value for
missing data in either one of the inputs.
bigframes.series.Series
unique
unique
()
-
> bigframes
.
series
.
Series
API documentation for unique
method.
value_counts
value_counts
(
normalize
:
bool
=
False
,
sort
:
bool
=
True
,
ascending
:
bool
=
False
,
*
,
dropna
:
bool
=
True
)
Return a Series containing counts of unique values.
The resulting object will be in descending order so that the first element is the most frequently-occurring element. Excludes NA values by default.
normalize
bool, default False
If True then the object returned will contain the relative frequencies of the unique values.
sort
bool, default True
Sort by frequencies.
ascending
bool, default False
Sort in ascending order.
dropna
bool, default True
Don't include counts of NaN.
Series
var
var
()
-
> float
Return unbiased variance over requested axis.
Normalized by N-1 by default.
where
where
(
cond
,
other
=
None
)
Replace values where the condition is False.
cond
bool Series/DataFrame, array-like, or callable
Where cond is True, keep the original value. Where False, replace with corresponding value from other. If cond is callable, it is computed on the Series/DataFrame and returns boolean Series/DataFrame or array. The callable must not change input Series/DataFrame (though pandas doesn’t check it).
other
scalar, Series/DataFrame, or callable
Entries where cond is False are replaced with corresponding value from other. If other is callable, it is computed on the Series/DataFrame and returns scalar or Series/DataFrame. The callable must not change input Series/DataFrame (though pandas doesn’t check it). If not specified, entries will be filled with the corresponding NULL value (np.nan for numpy dtypes, pd.NA for extension dtypes).
bigframes.series.Series