- 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
Index
(
data
=
None
,
dtype
=
None
,
*
,
name
=
None
,
session
=
None
)
Immutable sequence used for indexing and alignment.
The basic object storing axis labels for all objects.
Parameters
data
pandas.Series pandas.Index bigframes.series.Series
bigframes.core.indexes.base.Index
Labels (1-dimensional).
session
Optional[ bigframes.session.Session
]
BigQuery DataFrames session where queries are run. If not set, a default session is used.
Properties
T
Return the transpose, which is by definition self.
dtype
Return the dtype object of the underlying data.
dtypes
Return the dtypes as a Series for the underlying MultiIndex.
empty
Returns True if the Index is empty, otherwise returns False.
has_duplicates
Check if the Index has duplicate values.
is_monotonic_decreasing
Return a boolean if the values are equal or decreasing.
is_monotonic_increasing
Return a boolean if the values are equal or increasing.
is_unique
Return if the index has unique values.
name
Returns Index name.
names
Returns the names of the Index.
ndim
API documentation for ndim
property.
nlevels
Number of levels.
query_job
BigQuery job metadata for the most recent query.
shape
Return a tuple of the shape of the underlying data.
size
Returns the size of the Index.
values
Return an array representing the data in the Index.
Methods
all
all
()
-
> bool
Return whether all elements are Truthy.
bool
any
any
()
-
> bool
Return whether any element is Truthy.
bool
argmax
argmax
()
-
> int
Return int position of the largest value in the Series.
If the maximum is achieved in multiple locations, the first row position is returned.
int
argmin
argmin
()
-
> int
Return int position of the smallest value in the series.
If the minimum is achieved in multiple locations, the first row position is returned.
int
astype
astype
(
dtype
:
typing
.
Union
[
typing
.
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]"
,
],
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
,
geopandas
.
array
.
GeometryDtype
,
]
)
-
> bigframes
.
core
.
indexes
.
base
.
Index
Create an Index with values cast to dtypes.
The class of a new Index is determined by dtype. When conversion is impossible, a TypeError exception is raised.
Index
copy
copy
(
name
:
typing
.
Optional
[
typing
.
Hashable
]
=
None
)
Make a copy of this object.
Name is set on the new object.
name
Label, optional
Set name for new object.
Index
drop
drop
(
labels
:
typing
.
Any
)
-
> bigframes
.
core
.
indexes
.
base
.
Index
Make new Index with passed list of labels deleted.
Index
drop_duplicates
drop_duplicates
(
*
,
keep
:
str
=
"first"
)
-
> bigframes
.
core
.
indexes
.
base
.
Index
Return Index with duplicate values removed.
keep
{'first', 'last', False
}, default 'first'
One of: 'first' : Drop duplicates except for the first occurrence. 'last' : Drop duplicates except for the last occurrence. False
: Drop all duplicates.
dropna
dropna
(
how
:
typing
.
Literal
[
"all"
,
"any"
]
=
"any"
)
-
> bigframes
.
core
.
indexes
.
base
.
Index
Return Index without NA/NaN values.
how
{'any', 'all'}, default 'any'
If the Index is a MultiIndex, drop the value when any or all levels are NaN.
fillna
fillna
(
value
=
None
)
-
> bigframes
.
core
.
indexes
.
base
.
Index
Fill NA/NaN values with the specified value.
value
scalar
Scalar value to use to fill holes (e.g. 0). This value cannot be a list-likes.
from_frame
from_frame
(
frame
:
typing
.
Union
[
bigframes
.
series
.
Series
,
bigframes
.
dataframe
.
DataFrame
]
)
-
> bigframes
.
core
.
indexes
.
base
.
Index
API documentation for from_frame
method.
get_level_values
get_level_values
(
level
)
-
> bigframes
.
core
.
indexes
.
base
.
Index
Return an Index of values for requested level.
This is primarily useful to get an individual level of values from a MultiIndex, but is provided on Index as well for compatibility.
level
int or str
It is either the integer position or the name of the level.
Index
isin
isin
(
values
)
-
> bigframes
.
core
.
indexes
.
base
.
Index
Return a boolean array where the index values are in values
.
Compute boolean array to check whether each index value is found in the passed set of values. The length of the returned boolean array matches the length of the index.
values
set or list-like
Sought values.
Series
max
max
()
-
> typing
.
Any
Return the maximum value of the Index.
scalar
min
min
()
-
> typing
.
Any
Return the minimum value of the Index.
scalar
nunique
nunique
()
-
> int
Return number of unique elements in the object.
Excludes NA values by default.
rename
rename
(
name
:
typing
.
Union
[
str
,
typing
.
Sequence
[
str
]]
)
-
> bigframes
.
core
.
indexes
.
base
.
Index
Alter Index or MultiIndex name.
Able to set new names without level. Defaults to returning new index. Length of names must match number of levels in MultiIndex.
name
label or list of labels
Name(s) to set.
Index
sort_values
sort_values
(
*
,
ascending
:
bool
=
True
,
na_position
:
str
=
"last"
)
Return a sorted copy of the index.
Return a sorted copy of the index, and optionally return the indices that sorted the index itself.
ascending
bool, default True
Should the index values be sorted in an ascending order.
na_position
{'first' or 'last'}, default 'last'
Argument 'first' puts NaNs at the beginning, 'last' puts NaNs at the end.
pandas.Index
to_numpy
to_numpy
(
dtype
=
None
,
**
kwargs
)
-
> numpy
.
ndarray
A NumPy ndarray representing the values in this Series or Index.
to_pandas
to_pandas
()
-
> pandas
.
core
.
indexes
.
base
.
Index
Gets the Index as a pandas Index.
pandas.Index
to_series
to_series
(
index
:
typing
.
Optional
[
bigframes
.
core
.
indexes
.
base
.
Index
]
=
None
,
name
:
typing
.
Optional
[
typing
.
Hashable
]
=
None
,
)
-
> bigframes
.
series
.
Series
Create a Series with both index and values equal to the index keys.
Useful with map for returning an indexer based on an index.
index
Index, optional
Index of resulting Series. If None, defaults to original index.
name
str, optional
Name of resulting Series. If None, defaults to name of original index.
Series
transpose
transpose
()
-
> bigframes
.
core
.
indexes
.
base
.
Index
Return the transpose, which is by definition self.
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.