Stay organized with collections Save and categorize content based on your preferences.
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.
Properties TReturn the transpose, which is by definition self.
dtypeReturn the dtype object of the underlying data.
dtypesReturn the dtypes as a Series for the underlying MultiIndex.
emptyReturns True if the Index is empty, otherwise returns False.
has_duplicatesCheck if the Index has duplicate values.
is_monotonic_decreasingReturn a boolean if the values are equal or decreasing.
is_monotonic_increasingReturn a boolean if the values are equal or increasing.
is_uniqueReturn if the index has unique values.
nameReturns Index name.
namesReturns the names of the Index.
ndimAPI documentation for ndim
property.
Number of levels.
query_jobBigQuery job metadata for the most recent query.
shapeReturn a tuple of the shape of the underlying data.
sizeReturns the size of the Index.
valuesReturn an array representing the data in the Index.
Methods allReturn whether all elements are Truthy.
Returns Type Descriptionbool
A single element array-like may be converted to bool. any
Return whether any element is Truthy.
Returns Type Descriptionbool
A single element array-like may be converted to bool. argmax
Return int position of the largest value in the Series.
If the maximum is achieved in multiple locations, the first row position is returned.
Returns Type Descriptionint
Row position of the maximum value. argmin
Return int position of the smallest value in the series.
If the minimum is achieved in multiple locations, the first row position is returned.
Returns Type Descriptionint
Row position of the minimum value. 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,
],
*,
errors: typing.Literal["raise", "null"] = "raise"
) -> 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.
Parameters Name Descriptiondtype
str or pandas.ExtensionDtype
A dtype supported by BigQuery DataFrame include 'boolean'
, 'Float64'
, 'Int64'
, 'int64[pyarrow]'
, 'string'
, 'string[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"))
.
errors
{'raise', 'null'}, default 'raise'
Control raising of exceptions on invalid data for provided dtype. If 'raise', allow exceptions to be raised if any value fails cast If 'null', will assign null value if value fails cast
Returns Type DescriptionIndex
Index with values cast to specified dtype. copy
copy(name: typing.Optional[typing.Hashable] = None)
Make a copy of this object.
Name is set on the new object.
Parameter Name Descriptionname
Label, optional
Set name for new object.
Returns Type DescriptionIndex
Index reference to new object, which is a copy of this object. drop
drop(labels: typing.Any) -> bigframes.core.indexes.base.Index
Make new Index with passed list of labels deleted.
Returns Type DescriptionIndex
Will be same type as self. drop_duplicates
drop_duplicates(*, keep: str = "first") -> bigframes.core.indexes.base.Index
Return Index with duplicate values removed.
Parameter Name Descriptionkeep
{'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(
how: typing.Literal["all", "any"] = "any"
) -> bigframes.core.indexes.base.Index
Return Index without NA/NaN values.
Parameter Name Descriptionhow
{'any', 'all'}, default 'any'
If the Index is a MultiIndex, drop the value when any or all levels are NaN.
fillnafillna(value=None) -> bigframes.core.indexes.base.Index
Fill NA/NaN values with the specified value.
Parameter Name Descriptionvalue
scalar
Scalar value to use to fill holes (e.g. 0). This value cannot be a list-likes.
from_framefrom_frame(
frame: typing.Union[bigframes.series.Series, bigframes.dataframe.DataFrame]
) -> bigframes.core.indexes.base.Index
API documentation for from_frame
method.
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.
Parameter Name Descriptionlevel
int or str
It is either the integer position or the name of the level.
Returns Type DescriptionIndex
Calling object, as there is only one level in the 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.
Parameter Name Descriptionvalues
set or list-like
Sought values.
Returns Type DescriptionSeries
Series of boolean values. max
Return the maximum value of the Index.
Returns Type Descriptionscalar
Maximum value. min
Return the minimum value of the Index.
Returns Type Descriptionscalar
Minimum value. nunique
Return number of unique elements in the object.
Excludes NA values by default.
renamerename(
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.
Parameter Name Descriptionname
label or list of labels
Name(s) to set.
Returns Type DescriptionIndex
The same type as the caller. 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.
Parameters Name Descriptionascending
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.
Returns Type Descriptionpandas.Index
Sorted copy of the index. to_numpy
to_numpy(dtype=None, **kwargs) -> numpy.ndarray
A NumPy ndarray representing the values in this Series or Index.
to_pandasto_pandas() -> pandas.core.indexes.base.Index
Gets the Index as a pandas Index.
Returns Type Descriptionpandas.Index
A pandas Index with all of the labels from this 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.
Parameters Name Descriptionindex
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.
Returns Type DescriptionSeries
The dtype will be based on the type of the Index values. transpose
transpose() -> bigframes.core.indexes.base.Index
Return the transpose, which is by definition self.
value_countsvalue_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.
Parameters Name Descriptionnormalize
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.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-12 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4