pandas API reference
400 public APIs from pandas (pandas-dev/pandas) — 59 classes, 121 functions, 220 methods. Signatures extracted by static analysis of the actual source.
Repository: pandas-dev/pandas
| Kind | Count |
|---|---|
| Classes | 59 |
| Functions | 121 |
| Methods | 220 |
API list
class
pandas._config.config.DictWrapperprovide attribute-style access to a nested dict
class
pandas._config.config.OptionErrorException raised for pandas.options.
func
pandas._config.config.describe_option(pat:str='', _print_desc:bool=True) -> str | NonePrint the description for one or more registered options.
func
pandas._config.config.get_option(pat:str) -> AnyRetrieve the value of the specified option.
func
pandas._config.config.is_nonnegative_int(value:object) -> NoneVerify that value is None or a positive int.
func
pandas._config.config.option_context(*args:Any) -> Generator[None]Context manager to temporarily set options in a ``with`` statement.
func
pandas._config.config.reset_option(pat:str) -> NoneReset one or more options to their default value.
func
pandas._config.config.set_option(*args:Any) -> NoneSet the value of the specified option or options.
func
pandas._config.localization.get_locales(prefix:str | None=None, normalize:bool=True) -> list[str]Get all the locales that are available on the system.
func
pandas._config.localization.set_locale(new_locale:str | tuple[str, str], lc_var:int=locale.LC_ALL) -> Generator[str | tuple[str, str]]Context manager for temporarily setting a locale.
class
pandas._typing.ArrowArrayExportableAn object with an ``__arrow_c_array__`` method.
class
pandas._typing.ArrowStreamExportableAn object with an ``__arrow_c_stream__`` method.
func
pandas.compat.is_platform_arm() -> boolChecking if the running platform use ARM architecture.
func
pandas.compat.is_platform_linux() -> boolChecking if the running platform is linux.
func
pandas.compat.is_platform_little_endian() -> boolChecking if the running platform is little endian.
func
pandas.compat.is_platform_mac() -> boolChecking if the running platform is mac.
func
pandas.compat.is_platform_power() -> boolChecking if the running platform use Power architecture.
func
pandas.compat.is_platform_riscv64() -> boolChecking if the running platform use riscv64 architecture.
func
pandas.compat.is_platform_windows() -> boolChecking if the running platform is windows.
func
pandas.compat.pickle_compat.loads(bytes_object:bytes, *fix_imports:bool=True, *encoding:str='ASCII', *errors:str='strict') -> AnyAnalogous to pickle._loads.
func
pandas.compat.pickle_compat.patch_pickle() -> Generator[None]Temporarily patch pickle to use our unpickler.
func
pandas.compat.set_function_name(f:F, name:str, cls:type) -> FBind the name/qualname attributes of the function.
class
pandas.core._numba.extensions.IndexTypeThe type class for Index objects.
class
pandas.core._numba.extensions.SeriesTypeThe type class for Series objects.
func
pandas.core._numba.kernels.shared.is_monotonic_increasing(bounds:np.ndarray) -> boolCheck if int64 values are monotonically increasing.
class
pandas.core.accessor.AccessorCustom property-like object.
class
pandas.core.accessor.PandasDelegateAbstract base class for delegating methods/properties.
func
pandas.core.accessor.register_dataframe_accessor(name:str) -> Callable[[TypeT], TypeT]Register a custom accessor on DataFrame objects.
func
pandas.core.accessor.register_index_accessor(name:str) -> Callable[[TypeT], TypeT]Register a custom accessor on Index objects.
func
pandas.core.accessor.register_series_accessor(name:str) -> Callable[[TypeT], TypeT]Register a custom accessor on Series objects.
func
pandas.core.algorithms.is_monotonic(values:ArrayLike) -> tuple[bool, bool, bool]Determine whether values are monotonic increasing/decreasing.
func
pandas.core.algorithms.isin(comps:ListLike, values:ListLike) -> npt.NDArray[np.bool_]Compute the isin boolean array.
func
pandas.core.algorithms.map_array(arr:ArrayLike, mapper, na_action:Literal['ignore'] | None=None) -> np.ndarray | ExtensionArray | IndexMap values using an input mapping or function.
func
pandas.core.algorithms.mode(values:ArrayLike, dropna:bool=True, mask:npt.NDArray[np.bool_] | None=None) -> tuple[np.ndarray, npt.NDArray[np.bool_]] | ExtensionArrayReturns the mode(s) of an array.
func
pandas.core.algorithms.nunique_ints(values:ArrayLike) -> intReturn the number of unique values for integer array-likes.
func
pandas.core.algorithms.take(arr, indices:TakeIndexer, axis:AxisInt=0, allow_fill:bool=False, fill_value=None)Take elements from an array.
func
pandas.core.algorithms.unique_with_mask(values, mask:npt.NDArray[np.bool_] | None=None)See algorithms.unique for docs.
method
pandas.core.apply.Apply.agg() -> DataFrame | Series | NoneProvide an implementation for the aggregators.
method
pandas.core.apply.Apply.apply_list_or_dict_like() -> DataFrame | SeriesCompute apply in case of a list-like or dict-like.
method
pandas.core.apply.Apply.apply_str() -> DataFrame | SeriesCompute apply in case of a string.
method
pandas.core.apply.Apply.normalize_dictlike_arg(how:str, obj:DataFrame | Series, func:AggFuncTypeDict) -> AggFuncTypeDictHandler for dict-like argument.
method
pandas.core.apply.Apply.transform() -> DataFrame | SeriesTransform a DataFrame or Series.
method
pandas.core.apply.Apply.transform_dict_like(func) -> DataFrameCompute transform in the case of a dict-like func
class
pandas.core.apply.BaseExecutionEngineBase class for execution engines for map and apply methods.
func
pandas.core.apply.maybe_mangle_lambdas(agg_spec:Any) -> AnyMake new lambdas with unique names.
func
pandas.core.array_algos.putmask.putmask_inplace(values:ArrayLike, mask:npt.NDArray[np.bool_], value:Any) -> NoneExtensionArray-compatible implementation of np.putmask.
func
pandas.core.array_algos.replace.should_use_regex(regex:bool, to_replace:Any) -> boolDecide whether to treat `to_replace` as a regular expression.
func
pandas.core.arraylike.array_ufunc(self, ufunc:np.ufunc, method:str, *inputs:Any, **kwargs:Any)Compatibility with numpy ufuncs.
method
pandas.core.arrays._mixins.NDArrayBackedExtensionArray.fillna(value, limit:int | None=None, copy:bool=True) -> SelfFill NA/NaN values using the specified method.
method
pandas.core.arrays._mixins.NDArrayBackedExtensionArray.insert(loc:int, item) -> SelfMake new ExtensionArray inserting new item at location.
method
pandas.core.arrays._mixins.NDArrayBackedExtensionArray.shift(periods:int=1, fill_value=None) -> SelfShift values by desired number.
method
pandas.core.arrays._mixins.NDArrayBackedExtensionArray.value_counts(dropna:bool=True) -> SeriesReturn a Series containing counts of unique values.
class
pandas.core.arrays.arrow.array.ArrowExtensionArrayPandas ExtensionArray backed by a PyArrow ChunkedArray.
method
pandas.core.arrays.arrow.array.ArrowExtensionArray.copy() -> SelfReturn a shallow copy of the array.
method
pandas.core.arrays.arrow.array.ArrowExtensionArray.dropna() -> SelfReturn ArrowExtensionArray without NA values.
method
pandas.core.arrays.arrow.array.ArrowExtensionArray.dtype() -> ArrowDtypeAn instance of 'ExtensionDtype'.
method
pandas.core.arrays.arrow.array.ArrowExtensionArray.factorize(use_na_sentinel:bool=True) -> tuple[np.ndarray, ExtensionArray]Encode the arrow array as an enumerated type.
method
pandas.core.arrays.arrow.array.ArrowExtensionArray.fillna(value:object | ArrayLike, limit:int | None=None, copy:bool=True) -> SelfFill NA/NaN values using the specified method.
method
pandas.core.arrays.arrow.array.ArrowExtensionArray.interpolate(*method:InterpolateOptions, *axis:int, *index, *limit, *limit_direction, *limit_area, *copy:bool, **kwargs) -> SelfSee NDFrame.interpolate.__doc__.
method
pandas.core.arrays.arrow.array.ArrowExtensionArray.isna() -> npt.NDArray[np.bool_]Boolean NumPy array indicating if each value is missing.
method
pandas.core.arrays.arrow.array.ArrowExtensionArray.take(indices:TakeIndexer, allow_fill:bool=False, fill_value:Any=None) -> ArrowExtensionArrayTake elements from an array.
method
pandas.core.arrays.arrow.array.ArrowExtensionArray.to_numpy(dtype:npt.DTypeLike | None=None, copy:bool=False, na_value:object=lib.no_default) -> np.ndarrayConvert to a NumPy ndarray.
method
pandas.core.arrays.arrow.array.ArrowExtensionArray.unique() -> SelfCompute the ArrowExtensionArray of unique values.
method
pandas.core.arrays.arrow.array.ArrowExtensionArray.value_counts(dropna:bool=True) -> SeriesReturn a Series containing counts of each unique value.
func
pandas.core.arrays.arrow.array.to_pyarrow_type(dtype:ArrowDtype | pa.DataType | Dtype | None) -> pa.DataType | NoneConvert dtype to a pyarrow type instance.
class
pandas.core.arrays.base.ExtensionArrayAbstract base class for custom 1-D array types.
method
pandas.core.arrays.base.ExtensionArray.argmax(skipna:bool=True) -> intReturn the index of maximum value.
method
pandas.core.arrays.base.ExtensionArray.argmin(skipna:bool=True) -> intReturn the index of minimum value.
method
pandas.core.arrays.base.ExtensionArray.argsort(*ascending:bool=True, *kind:SortKind='quicksort', *na_position:str='last', **kwargs) -> np.ndarrayReturn the indices that would sort this array.
method
pandas.core.arrays.base.ExtensionArray.copy() -> SelfReturn a copy of the array.
method
pandas.core.arrays.base.ExtensionArray.dropna() -> SelfReturn ExtensionArray without NA values.
method
pandas.core.arrays.base.ExtensionArray.dtype() -> ExtensionDtypeAn instance of ExtensionDtype.
method
pandas.core.arrays.base.ExtensionArray.duplicated(keep:Literal['first', 'last', False]='first') -> npt.NDArray[np.bool_]Return boolean ndarray denoting duplicate values.
method
pandas.core.arrays.base.ExtensionArray.equals(other:object) -> boolReturn if another array is equivalent to this array.
method
pandas.core.arrays.base.ExtensionArray.factorize(use_na_sentinel:bool=True) -> tuple[np.ndarray, ExtensionArray]Encode the extension array as an enumerated type.
method
pandas.core.arrays.base.ExtensionArray.fillna(value:object | ArrayLike, limit:int | None=None, copy:bool=True) -> SelfFill NA/NaN values using the specified method.
method
pandas.core.arrays.base.ExtensionArray.insert(loc:int, item) -> SelfInsert an item at the given position.
method
pandas.core.arrays.base.ExtensionArray.isna() -> np.ndarray | ExtensionArrayNaResultA 1-D array indicating if each value is missing.
method
pandas.core.arrays.base.ExtensionArray.item(index:int | None=None)Return the array element at the specified position as a Python scalar.
method
pandas.core.arrays.base.ExtensionArray.ndim() -> intExtension Arrays are only allowed to be 1-dimensional.
method
pandas.core.arrays.base.ExtensionArray.ravel(order:Literal['C', 'F', 'A', 'K'] | None='C') -> SelfReturn a flattened view on this array.
method
pandas.core.arrays.base.ExtensionArray.repeat(repeats:int | Sequence[int], axis:AxisInt | None=None) -> SelfRepeat elements of an ExtensionArray.
method
pandas.core.arrays.base.ExtensionArray.round(decimals:int=0) -> SelfRound each value in the array to the given number of decimals.
method
pandas.core.arrays.base.ExtensionArray.shape() -> ShapeReturn a tuple of the array dimensions.
method
pandas.core.arrays.base.ExtensionArray.shift(periods:int=1, fill_value:object=None) -> ExtensionArrayShift values by desired number.
method
pandas.core.arrays.base.ExtensionArray.size() -> intThe number of elements in the array.
method
pandas.core.arrays.base.ExtensionArray.sort(*ascending:bool=True, *kind:SortKind='quicksort', *na_position:str='last') -> NoneSort the array in-place.
method
pandas.core.arrays.base.ExtensionArray.take(indices:TakeIndexer, *allow_fill:bool=False, *fill_value:Any=None) -> SelfTake elements from an array.
method
pandas.core.arrays.base.ExtensionArray.to_numpy(dtype:npt.DTypeLike | None=None, copy:bool=False, na_value:object=lib.no_default) -> np.ndarrayConvert to a NumPy ndarray.
method
pandas.core.arrays.base.ExtensionArray.tolist() -> listReturn a list of the values.
method
pandas.core.arrays.base.ExtensionArray.transpose(*axes:int) -> SelfReturn a transposed view on this array.
method
pandas.core.arrays.base.ExtensionArray.unique() -> SelfCompute the ExtensionArray of unique values.
method
pandas.core.arrays.base.ExtensionArray.value_counts(dropna:bool=True) -> SeriesReturn a Series containing counts of unique values.
class
pandas.core.arrays.base.ExtensionScalarOpsMixinA mixin for defining ops on an ExtensionArray.
class
pandas.core.arrays.boolean.BooleanArrayArray of boolean (True/False) data with missing values.
class
pandas.core.arrays.boolean.BooleanDtypeExtension dtype for boolean data.
method
pandas.core.arrays.boolean.BooleanDtype.construct_array_type() -> type_t[BooleanArray]Return the array type associated with this dtype.
method
pandas.core.arrays.categorical.Categorical.add_categories(new_categories) -> SelfAdd new categories.
method
pandas.core.arrays.categorical.Categorical.as_ordered() -> SelfSet the Categorical to be ordered.
method
pandas.core.arrays.categorical.Categorical.as_unordered() -> SelfSet the Categorical to be unordered.
method
pandas.core.arrays.categorical.Categorical.categories() -> IndexThe categories of this categorical.
method
pandas.core.arrays.categorical.Categorical.check_for_ordered(op) -> Noneassert that we are ordered
method
pandas.core.arrays.categorical.Categorical.codes() -> np.ndarrayThe category codes of this categorical index.
method
pandas.core.arrays.categorical.Categorical.equals(other:object) -> boolReturns True if categorical arrays are equal.
method
pandas.core.arrays.categorical.Categorical.isin(values:ArrayLike) -> npt.NDArray[np.bool_]Check whether `values` are contained in Categorical.
method
pandas.core.arrays.categorical.Categorical.max(*skipna:bool=True, **kwargs)The maximum value of the object.
method
pandas.core.arrays.categorical.Categorical.min(*skipna:bool=True, **kwargs)The minimum value of the object.
method
pandas.core.arrays.categorical.Categorical.ordered() -> OrderedWhether the categories have an ordered relationship.
method
pandas.core.arrays.categorical.Categorical.remove_categories(removals) -> SelfRemove the specified categories.
method
pandas.core.arrays.categorical.Categorical.remove_unused_categories() -> SelfRemove categories which are not used.
method
pandas.core.arrays.categorical.Categorical.rename_categories(new_categories) -> SelfRename categories.
method
pandas.core.arrays.categorical.Categorical.set_categories(new_categories, ordered=None, rename:bool=False) -> SelfSet the categories to the specified new categories.
method
pandas.core.arrays.categorical.Categorical.set_ordered(value:bool) -> SelfSet the ordered attribute to the boolean value.
method
pandas.core.arrays.categorical.Categorical.value_counts(dropna:bool=True) -> SeriesReturn a Series containing counts of each category.
func
pandas.core.arrays.categorical.contains(cat, key, container) -> boolHelper for membership check for ``key`` in ``cat``.
class
pandas.core.arrays.floating.FloatingArrayArray of floating (optional missing) values.
class
pandas.core.arrays.floating.FloatingDtypeAn ExtensionDtype to hold a single size of floating dtype.
class
pandas.core.arrays.integer.IntegerArrayArray of integer (optional missing) values.
func
pandas.core.arrays.masked.transpose_homogeneous_masked_arrays(masked_arrays:Sequence[BaseMaskedArray]) -> list[BaseMaskedArray]Transpose masked arrays in a list, but faster.
class
pandas.core.arrays.numeric.NumericArrayBase class for IntegerArray and FloatingArray.
class
pandas.core.arrays.numpy_.NumpyExtensionArrayA pandas ExtensionArray for NumPy data.
method
pandas.core.arrays.numpy_.NumpyExtensionArray.interpolate(*method:InterpolateOptions, *axis:int, *index:Index, *limit, *limit_direction, *limit_area, *copy:bool, **kwargs) -> SelfSee NDFrame.interpolate.__doc__.
class
pandas.core.arrays.period.PeriodArrayPandas ExtensionArray for storing Period data.
method
pandas.core.arrays.period.PeriodArray.asfreq(freq=None, how:str='E') -> SelfConvert the PeriodArray to the specified frequency `freq`.
method
pandas.core.arrays.period.PeriodArray.dayofyear()The ordinal day of the year.
method
pandas.core.arrays.period.PeriodArray.daysinmonth()The number of days in the month.
method
pandas.core.arrays.period.PeriodArray.freq() -> BaseOffsetReturn the frequency object for this PeriodArray.
method
pandas.core.arrays.period.PeriodArray.to_timestamp(freq=None, how:str='start') -> DatetimeArrayCast to DatetimeArray/Index.
class
pandas.core.arrays.sparse.accessor.SparseFrameAccessorDataFrame accessor for sparse data.
class
pandas.core.arrays.sparse.array.SparseArrayAn ExtensionArray for storing sparse data.
method
pandas.core.arrays.sparse.array.SparseArray.astype(dtype:AstypeArg | None=None, copy:bool=True)Change the dtype of a SparseArray.
method
pandas.core.arrays.sparse.array.SparseArray.cumsum(axis:AxisInt=0, *args, **kwargs) -> SparseArrayCumulative sum of non-NA/null values.
method
pandas.core.arrays.sparse.array.SparseArray.duplicated(keep:Literal['first', 'last', False]='first') -> npt.NDArray[np.bool_]Return boolean ndarray denoting duplicate values.
method
pandas.core.arrays.sparse.array.SparseArray.fillna(value, limit:int | None=None, copy:bool=True) -> SelfFill missing values with `value`.
method
pandas.core.arrays.sparse.array.SparseArray.from_spmatrix(data:_SparseMatrixLike) -> SelfCreate a SparseArray from a scipy.sparse matrix.
method
pandas.core.arrays.sparse.array.SparseArray.kind() -> SparseIndexKindThe kind of sparse index for this array.
method
pandas.core.arrays.sparse.array.SparseArray.map(mapper, na_action:Literal['ignore'] | None=None) -> SelfMap categories using an input mapping or function.
method
pandas.core.arrays.sparse.array.SparseArray.mean(axis:Axis=0, *skipna:bool=True, *args, **kwargs)Mean of non-NA/null values.
method
pandas.core.arrays.sparse.array.SparseArray.npoints() -> intThe number of non- ``fill_value`` points.
method
pandas.core.arrays.sparse.array.SparseArray.to_dense() -> np.ndarrayConvert SparseArray to a NumPy array.
method
pandas.core.arrays.sparse.array.SparseArray.value_counts(dropna:bool=True) -> SeriesReturns a Series containing counts of unique values.
class
pandas.core.arrays.string_.BaseStringArrayMixin class for StringArray, ArrowStringArray.
method
pandas.core.arrays.string_.BaseStringArray.tolist() -> listReturn a list of the value.
class
pandas.core.arrays.string_.StringArrayExtension array for string data.
class
pandas.core.arrays.string_.StringDtypeExtension dtype for string data.
method
pandas.core.arrays.string_.StringDtype.construct_from_string(string) -> SelfConstruct a StringDtype from a string.
method
pandas.core.arrays.string_.StringDtype.na_value() -> libmissing.NAType | floatThe missing value representation for this dtype.
method
pandas.core.arrays.string_.StringDtype.storage() -> strThe storage backend for this dtype.
class
pandas.core.arrays.timedeltas.TimedeltaArrayPandas ExtensionArray for timedelta data.
method
pandas.core.arrays.timedeltas.TimedeltaArray.dtype() -> np.dtype[np.timedelta64]The dtype for the TimedeltaArray.
class
pandas.core.base.NoNewAttributesMixinMixin which prevents adding new attributes.
class
pandas.core.base.PandasObjectBase class for various pandas objects.
class
pandas.core.col.ExpressionClass representing a deferred column.
func
pandas.core.col.col(col_name:Hashable) -> ExpressionGenerate deferred object representing a column of a DataFrame.
func
pandas.core.common.all_none(*args:object) -> boolReturns a boolean indicating if all arguments are None.
func
pandas.core.common.all_not_none(*args:object) -> boolReturns a boolean indicating if all arguments are not None.
func
pandas.core.common.any_none(*args:object) -> boolReturns a boolean indicating if any argument is None.
func
pandas.core.common.any_not_none(*args:object) -> boolReturns a boolean indicating if any argument is not None.
func
pandas.core.common.cast_scalar_indexer(val:Any) -> AnyDisallow indexing with a float key, even if that key is a round number.
func
pandas.core.common.convert_to_list_like(values:Hashable | Iterable | AnyArrayLike) -> list | AnyArrayLikeConvert list-like or scalar input to list-like.
func
pandas.core.common.count_not_none(*args:object) -> intReturns the count of arguments that are not None.
func
pandas.core.common.flatten(line:Iterable) -> Generator[Any]Flatten an arbitrarily nested sequence.
func
pandas.core.common.get_cython_func(arg:Callable) -> str | Noneif we define an internal function for this argument, return it
func
pandas.core.common.is_bool_indexer(key:Any) -> boolCheck whether `key` is a valid boolean indexer.
func
pandas.core.common.is_empty_slice(obj:object) -> boolWe have an empty slice, e.g.
func
pandas.core.common.is_full_slice(obj:object, line:int) -> boolWe have a full length slice.
func
pandas.core.common.is_local_in_caller_frame(obj:NDFrame) -> boolHelper function used in detecting chained assignment.
func
pandas.core.common.is_null_slice(obj:object) -> boolWe have a null slice.
func
pandas.core.common.is_true_slices(line:abc.Iterable) -> abc.Generator[bool, None, None]Find non-trivial slices in "line": yields a bool.
func
pandas.core.common.maybe_iterable_to_list(obj:Iterable[T] | T) -> Collection[T] | TIf obj is Iterable but not list-like, consume into list.
func
pandas.core.common.not_none(*args:object) -> Generator[object]Returns a generator consisting of the arguments that are not None.
func
pandas.core.common.require_length_match(data:Any, index:Index) -> NoneCheck the length of data matches the length of the index.
func
pandas.core.common.standardize_mapping(into:type | abc.Mapping) -> type | partialHelper function to standardize a supplied mapping.
func
pandas.core.common.temp_setattr(obj:Any, attr:str, value:Any, condition:bool=True) -> Generator[Any]Temporarily set attribute on an object.
func
pandas.core.computation.align.align_terms(terms)Align a set of terms.
func
pandas.core.computation.common.ensure_decoded(s:str | bytes) -> strIf we have bytes, decode them to unicode.
class
pandas.core.computation.engines.AbstractEngineObject serving as a base class for all engines.
method
pandas.core.computation.engines.AbstractEngine.convert() -> strConvert an expression for evaluation.
method
pandas.core.computation.engines.AbstractEngine.evaluate() -> objectRun the engine on the expression.
class
pandas.core.computation.engines.NumExprEngineNumExpr engine class
class
pandas.core.computation.engines.PythonEngineEvaluate an expression in Python space.
class
pandas.core.computation.expr.BaseExprVisitorCustom ast walker.
method
pandas.core.computation.expr.BaseExprVisitor.visit_Index(node, **kwargs)df.index[4]
method
pandas.core.computation.expr.BaseExprVisitor.visit_Slice(node, **kwargs) -> slicedf.index[slice(4,6)]
class
pandas.core.computation.expr.ExprObject encapsulating an expression.
method
pandas.core.computation.expr.Expr.names()Get the names in an expression.
method
pandas.core.computation.expr.Expr.parse()Parse an expression.
func
pandas.core.computation.expr.disallow(nodes:set[str]) -> Callable[[type[_T]], type[_T]]Decorator to disallow certain nodes from parsing.
func
pandas.core.computation.expressions.get_test_result() -> list[bool]Get test result and reset test_results.
func
pandas.core.computation.expressions.set_test_mode(v:bool=True) -> NoneKeeps track of whether numexpr was used.
class
pandas.core.computation.ops.BinOpHold a binary operator and its operands.
class
pandas.core.computation.ops.OpHold an operator of arbitrary arity.
class
pandas.core.computation.ops.UnaryOpHold a unary operator and its operands.
func
pandas.core.computation.parsing.clean_backtick_quoted_toks(tok:tuple[int, str]) -> tuple[int, str]Clean up a column name if surrounded by backticks.
func
pandas.core.computation.parsing.clean_column_name(name:Hashable) -> HashableFunction to emulate the cleaning of a backtick quoted name.
func
pandas.core.computation.parsing.create_valid_python_identifier(name:str) -> strCreate valid Python identifiers from any string.
func
pandas.core.computation.parsing.tokenize_string(source:str) -> Iterator[tuple[int, str]]Tokenize a Python source code string.
method
pandas.core.computation.pytables.BinOp.conform(rhs)inplace conform rhs
method
pandas.core.computation.pytables.BinOp.generate(v) -> strcreate and return the op string for this TermValue
method
pandas.core.computation.pytables.BinOp.is_valid() -> boolreturn True if this is a valid field
method
pandas.core.computation.pytables.BinOp.kind()the kind of my field
method
pandas.core.computation.pytables.BinOp.meta()the meta of my field
method
pandas.core.computation.pytables.BinOp.metadata()the metadata of my field
method
pandas.core.computation.scope.Scope.add_tmp(value) -> strAdd a temporary variable to the scope.
method
pandas.core.computation.scope.Scope.has_resolvers() -> boolReturn whether we have any extra scope.
method
pandas.core.computation.scope.Scope.ntemps() -> intThe number of temporary variables in this scope
method
pandas.core.computation.scope.Scope.swapkey(old_key:str, new_key:str, new_value=None) -> NoneReplace a variable name, with a potentially new value.
func
pandas.core.computation.scope.ensure_scope(level:int, global_dict=None, local_dict=None, resolvers=(), target=None) -> ScopeEnsure that we are grabbing the correct scope.
func
pandas.core.config_init.is_terminal() -> boolDetect if Python is running in a terminal.
func
pandas.core.construction.array(data:Sequence[object] | AnyArrayLike, dtype:Dtype | None=None, copy:bool=True) -> ExtensionArrayCreate an array.
func
pandas.core.construction.range_to_ndarray(rng:range) -> np.ndarrayCast a range object to ndarray.
func
pandas.core.construction.sanitize_masked_array(data:ma.MaskedArray) -> np.ndarrayConvert numpy MaskedArray to ensure mask is softened.
func
pandas.core.dtypes.astype.astype_array(values:ArrayLike, dtype:DtypeObj, copy:bool=False) -> ArrayLikeCast array (ndarray or ExtensionArray) to the new dtype.
func
pandas.core.dtypes.astype.astype_is_view(dtype:DtypeObj, new_dtype:DtypeObj) -> boolChecks if astype avoided copying the data.
class
pandas.core.dtypes.base.ExtensionDtypeA custom data type, to be paired with an ExtensionArray.
method
pandas.core.dtypes.base.ExtensionDtype.construct_array_type() -> type_t[ExtensionArray]Return the array type associated with this dtype.
method
pandas.core.dtypes.base.ExtensionDtype.construct_from_string(string:str) -> SelfConstruct this type from a string.
method
pandas.core.dtypes.base.ExtensionDtype.empty(shape:Shape) -> ExtensionArrayConstruct an ExtensionArray of this dtype with the given shape.
method
pandas.core.dtypes.base.ExtensionDtype.is_dtype(dtype:object) -> boolCheck if we match 'dtype'.
method
pandas.core.dtypes.base.ExtensionDtype.na_value() -> objectDefault NA value to use for this type.
method
pandas.core.dtypes.base.ExtensionDtype.name() -> strA string identifying the data type.
method
pandas.core.dtypes.base.ExtensionDtype.type() -> type_t[Any]The scalar type for the array, e.g.
class
pandas.core.dtypes.base.RegistryRegistry for dtype inference.
method
pandas.core.dtypes.base.Registry.register(dtype:type_t[ExtensionDtype]) -> NoneParameters ---------- dtype : ExtensionDtype class
func
pandas.core.dtypes.cast.coerce_indexer_dtype(indexer:np.ndarray, categories:Index) -> np.ndarraycoerce the indexer input array to the smallest dtype possible
func
pandas.core.dtypes.cast.dict_compat(d:dict[Scalar, Scalar]) -> dict[Scalar, Scalar]Convert datetimelike-keyed dicts to a Timestamp-keyed dict.
func
pandas.core.dtypes.cast.infer_dtype_from(val:object) -> tuple[DtypeObj, Any]Interpret the dtype from a scalar or array.
func
pandas.core.dtypes.cast.infer_dtype_from_array(arr:Any) -> tuple[DtypeObj, ArrayLike]Infer the dtype from an array.
func
pandas.core.dtypes.cast.infer_dtype_from_scalar(val:object) -> tuple[DtypeObj, Any]Interpret the dtype from a scalar.
func
pandas.core.dtypes.cast.is_nested_object(obj:object) -> boolreturn a boolean if we have a nested object, e.g.
func
pandas.core.dtypes.cast.maybe_box_native(value:Scalar | None | NAType) -> Scalar | None | NATypeIf passed a scalar cast the scalar to a python native type.
func
pandas.core.dtypes.cast.maybe_unbox_numpy_scalar(value:Any, *dtype:DtypeObj | None=None) -> AnyMaybe convert a NumPy scalar to its Python equivalent.
func
pandas.core.dtypes.common.classes(*klasses) -> CallableEvaluate if the tipo is a subclass of the klasses.
func
pandas.core.dtypes.common.ensure_python_int(value:int | np.integer) -> intEnsure that a value is a python int.
func
pandas.core.dtypes.common.ensure_str(value:bytes | Any) -> strEnsure that bytes and non-strings get converted into ``str`` objects.
func
pandas.core.dtypes.common.is_1d_only_ea_dtype(dtype:DtypeObj | None) -> boolAnalogue to is_extension_array_dtype but excluding DatetimeTZDtype.
func
pandas.core.dtypes.common.is_all_strings(value:ArrayLike) -> boolCheck if this is an array of strings that we should try parsing.
func
pandas.core.dtypes.common.is_bool_dtype(arr_or_dtype) -> boolCheck whether the provided array or dtype is of a boolean dtype.
func
pandas.core.dtypes.common.is_dtype_equal(source, target) -> boolCheck if two dtypes are equal.
func
pandas.core.dtypes.common.is_object_dtype(arr_or_dtype) -> boolCheck whether an array-like or dtype is of the object dtype.
func
pandas.core.dtypes.common.is_sparse(arr) -> boolCheck whether an array-like is a 1-D pandas sparse array.
func
pandas.core.dtypes.common.needs_i8_conversion(dtype:DtypeObj | None) -> boolCheck whether the dtype should be converted to int64.
func
pandas.core.dtypes.common.validate_all_hashable(*error_name:str | None=None, *args) -> NoneReturn None if all args are hashable, else raise a TypeError.
func
pandas.core.dtypes.concat.union_categories_compat(to_union:Sequence[Categorical]) -> Categoricalunion_categoricals for concat(union_categories=True).
class
pandas.core.dtypes.dtypes.ArrowDtypeAn ExtensionDtype for PyArrow data types.
method
pandas.core.dtypes.dtypes.ArrowDtype.construct_from_string(string:str) -> ArrowDtypeConstruct this type from a string.
method
pandas.core.dtypes.dtypes.ArrowDtype.itemsize() -> intReturn the number of bytes in this dtype.
method
pandas.core.dtypes.dtypes.ArrowDtype.name() -> strA string identifying the data type.
method
pandas.core.dtypes.dtypes.ArrowDtype.numpy_dtype() -> np.dtypeReturn an instance of the related numpy dtype
method
pandas.core.dtypes.dtypes.ArrowDtype.type()Returns associated scalar type.
class
pandas.core.dtypes.dtypes.BaseMaskedDtypeBase class for dtypes for BaseMaskedArray subclasses.
method
pandas.core.dtypes.dtypes.BaseMaskedDtype.itemsize() -> intReturn the number of bytes in this dtype
method
pandas.core.dtypes.dtypes.BaseMaskedDtype.numpy_dtype() -> np.dtypeReturn an instance of our numpy dtype
class
pandas.core.dtypes.dtypes.CategoricalDtypeType for categorical data with the categories and orderedness.
method
pandas.core.dtypes.dtypes.CategoricalDtype.construct_from_string(string:str_type) -> CategoricalDtypeConstruct a CategoricalDtype from a string.
method
pandas.core.dtypes.dtypes.CategoricalDtype.ordered() -> OrderedWhether the categories have an ordered relationship.
method
pandas.core.dtypes.dtypes.CategoricalDtype.validate_ordered(ordered:Ordered) -> NoneValidates that we have a valid ordered parameter.
class
pandas.core.dtypes.dtypes.DatetimeTZDtypeAn ExtensionDtype for timezone-aware datetime data.
method
pandas.core.dtypes.dtypes.DatetimeTZDtype.construct_from_string(string:str_type) -> DatetimeTZDtypeConstruct a DatetimeTZDtype from a string.
method
pandas.core.dtypes.dtypes.DatetimeTZDtype.name() -> str_typeA string representation of the dtype.
method
pandas.core.dtypes.dtypes.DatetimeTZDtype.tz() -> tzinfoThe timezone.
method
pandas.core.dtypes.dtypes.DatetimeTZDtype.unit() -> TimeUnitThe precision of the datetime data.
class
pandas.core.dtypes.dtypes.IntervalDtypeAn ExtensionDtype for Interval data.
method
pandas.core.dtypes.dtypes.IntervalDtype.subtype()The dtype of the Interval bounds.
class
pandas.core.dtypes.dtypes.NumpyEADtypeA Pandas ExtensionDtype for NumPy dtypes.
method
pandas.core.dtypes.dtypes.NumpyEADtype.itemsize() -> intThe element size of this data-type object.
method
pandas.core.dtypes.dtypes.NumpyEADtype.name() -> strA bit-width name for this data-type.
method
pandas.core.dtypes.dtypes.NumpyEADtype.numpy_dtype() -> np.dtypeThe NumPy dtype this NumpyEADtype wraps.
class
pandas.core.dtypes.dtypes.PeriodDtypeAn ExtensionDtype for Period data.
method
pandas.core.dtypes.dtypes.PeriodDtype.freq() -> BaseOffsetThe frequency object of this PeriodDtype.
class
pandas.core.dtypes.dtypes.SparseDtypeDtype for data stored in :class:`SparseArray`.
method
pandas.core.dtypes.dtypes.SparseDtype.construct_from_string(string:str) -> SparseDtypeConstruct a SparseDtype from a string form.
method
pandas.core.dtypes.dtypes.SparseDtype.fill_value()The fill value of the array.
method
pandas.core.dtypes.dtypes.SparseDtype.kind() -> strThe sparse kind.
method
pandas.core.dtypes.dtypes.SparseDtype.update_dtype(dtype) -> SparseDtypeConvert the SparseDtype to a new dtype.
func
pandas.core.dtypes.inference.is_array_like(obj:object) -> boolCheck if the object is array-like.
func
pandas.core.dtypes.inference.is_dict_like(obj:object) -> boolCheck if the object is dict-like.
func
pandas.core.dtypes.inference.is_file_like(obj:object) -> boolCheck if the object is a file-like object.
func
pandas.core.dtypes.inference.is_hashable(obj:object, allow_slice:bool=True) -> TypeGuard[Hashable]Return True if hash(obj) will succeed, False otherwise.
func
pandas.core.dtypes.inference.is_named_tuple(obj:object) -> boolCheck if the object is a named tuple.
func
pandas.core.dtypes.inference.is_number(obj:object) -> TypeGuard[Number | np.number]Check if the object is a number.
func
pandas.core.dtypes.inference.is_re(obj:object) -> TypeGuard[Pattern]Check if the object is a regex pattern instance.
func
pandas.core.dtypes.inference.is_re_compilable(obj:object) -> boolCheck if the object can be compiled into a regex pattern instance.
func
pandas.core.dtypes.inference.is_sequence(obj:object) -> boolCheck if the object is a sequence of objects.
func
pandas.core.dtypes.inference.iterable_not_string(obj:object) -> boolCheck if the object is an iterable but not a string.
func
pandas.core.dtypes.missing.array_equals(left:ArrayLike, right:ArrayLike) -> boolExtensionArray-compatible implementation of array_equivalent.
func
pandas.core.dtypes.missing.isna_all(arr:ArrayLike) -> boolOptimized equivalent to isna(arr).all()
class
pandas.core.flags.FlagsFlags that apply to pandas objects.
method
pandas.core.flags.Flags.allows_duplicate_labels() -> boolWhether this object allows duplicate labels.
class
pandas.core.groupby.groupby.GroupByClass for grouping and aggregating relational data.
method
pandas.core.groupby.groupby.GroupBy.all(skipna:bool=True) -> NDFrameTReturn True if all values in the group are truthful, else False.
method
pandas.core.groupby.groupby.GroupBy.any(skipna:bool=True) -> NDFrameTReturn True if any value in the group is truthful, else False.
method
pandas.core.groupby.groupby.GroupBy.bfill(limit:int | None=None)Backward fill the values.
method
pandas.core.groupby.groupby.GroupBy.count() -> NDFrameTCompute count of group, excluding missing values.
method
pandas.core.groupby.groupby.GroupBy.cummax(numeric_only:bool=False, skipna:bool=True, **kwargs) -> NDFrameTCumulative max for each group.
method
pandas.core.groupby.groupby.GroupBy.cummin(numeric_only:bool=False, skipna:bool=True, **kwargs) -> NDFrameTCumulative min for each group.
method
pandas.core.groupby.groupby.GroupBy.cumprod(numeric_only:bool=False, skipna:bool=True, *args, **kwargs) -> NDFrameTCumulative product for each group.
method
pandas.core.groupby.groupby.GroupBy.cumsum(numeric_only:bool=False, skipna:bool=True, *args, **kwargs) -> NDFrameTCumulative sum for each group.
method
pandas.core.groupby.groupby.GroupBy.diff(periods:int=1) -> NDFrameTFirst discrete difference of element.
method
pandas.core.groupby.groupby.GroupBy.ffill(limit:int | None=None)Forward fill the values.
func
pandas.core.groupby.groupby.GroupBy.first(x:Series)Helper function for first item that isn't NA.
method
pandas.core.groupby.groupby.GroupBy.head(n:int=5) -> NDFrameTReturn first n rows of each group.
method
pandas.core.groupby.groupby.GroupBy.last(numeric_only:bool=False, min_count:int=-1, skipna:bool=True) -> NDFrameTCompute the last entry of each column within each group.
func
pandas.core.groupby.groupby.GroupBy.last(x:Series)Helper function for last item that isn't NA.
method
pandas.core.groupby.groupby.GroupBy.median(numeric_only:bool=False, skipna:bool=True) -> NDFrameTCompute median of groups, excluding missing values.
method
pandas.core.groupby.groupby.GroupBy.prod(numeric_only:bool=False, min_count:int=0, skipna:bool=True) -> NDFrameTCompute prod of group values.
method
pandas.core.groupby.groupby.GroupBy.rank(method:RankMethod='average', ascending:bool=True, na_option:RankNaOption='keep', pct:bool=False) -> NDFrameTProvide the rank of values within each group.
method
pandas.core.groupby.groupby.GroupBy.size() -> DataFrame | SeriesCompute group sizes.
method
pandas.core.groupby.groupby.GroupBy.tail(n:int=5) -> NDFrameTReturn last n rows of each group.
class
pandas.core.groupby.indexing.GroupByIndexingMixinMixin for adding ._positional_selector to GroupBy.
class
pandas.core.groupby.indexing.GroupByPositionalSelectorReturn positional selection for each group.
method
pandas.core.groupby.ops.BinGrouper.groups()dict {group name -> group labels}
class
pandas.core.indexers.objects.BaseIndexerBase class for window bounds calculations.
class
pandas.core.indexers.objects.ExponentialMovingWindowIndexerCalculate ewm window bounds (the entire window)
class
pandas.core.indexers.objects.FixedWindowIndexerCreates window boundaries that are of fixed length.
func
pandas.core.indexers.utils.check_array_indexer(array:AnyArrayLike, indexer:Any) -> AnyCheck if `indexer` is a valid array indexer for `array`.
func
pandas.core.indexers.utils.is_empty_indexer(indexer) -> boolCheck if we have an empty indexer.
func
pandas.core.indexers.utils.is_scalar_indexer(indexer, ndim:int) -> boolReturn True if we are all scalar indexers.
func
pandas.core.indexers.utils.maybe_convert_indices(indices, n:int, verify:bool=True) -> np.ndarrayAttempt to convert indices into valid, positive indices.
func
pandas.core.indexers.utils.unpack_tuple_and_ellipses(item:tuple)Possibly unpack arr[..., n] to arr[n]
func
pandas.core.indexers.utils.validate_indices(indices:np.ndarray, n:int) -> NonePerform bounds-checking for an indexer.
func
pandas.core.indexes.api.all_indexes_same(indexes) -> boolDetermine if all indexes contain the same elements.
func
pandas.core.indexes.api.safe_sort_index(index:Index) -> IndexReturns the sorted index We keep the dtypes and the name attributes.
func
pandas.core.indexes.api.union_indexes(indexes, sort:bool | lib.NoDefault=True) -> tuple[Index, bool]Return the union of indexes.
class
pandas.core.indexes.base.IndexImmutable sequence used for indexing and alignment.
method
pandas.core.indexes.base.Index.all(*args:Any, **kwargs:Any) -> AnyReturn whether all elements are Truthy.
method
pandas.core.indexes.base.Index.any(*args:Any, **kwargs:Any) -> AnyReturn whether any element is Truthy.
method
pandas.core.indexes.base.Index.append(other:Index | Sequence[Index]) -> IndexAppend a collection of Index options together.
method
pandas.core.indexes.base.Index.argmax(axis:AxisInt | None=None, skipna:bool=True, *args:Any, **kwargs:Any) -> intReturn int position of the largest value in the Index.
method
pandas.core.indexes.base.Index.argmin(axis:AxisInt | None=None, skipna:bool=True, *args:Any, **kwargs:Any) -> intReturn int position of the smallest value in the Index.
method
pandas.core.indexes.base.Index.argsort(*args:Any, **kwargs:Any) -> npt.NDArray[np.intp]Return the integer indices that would sort the index.
method
pandas.core.indexes.base.Index.array() -> ExtensionArrayThe ExtensionArray of the data backing this Index.
method
pandas.core.indexes.base.Index.asof_locs(where:Index, mask:npt.NDArray[np.bool_]) -> npt.NDArray[np.intp]Return the locations (indices) of labels in the index.
method
pandas.core.indexes.base.Index.astype(dtype:Dtype, copy:bool=True) -> IndexCreate an Index with values cast to dtypes.
method
pandas.core.indexes.base.Index.copy(name:Hashable | None=None, deep:bool=False) -> SelfMake a copy of this object.
method
pandas.core.indexes.base.Index.delete(loc:int | np.integer | list[int] | npt.NDArray[np.integer]) -> SelfMake new Index with passed location(-s) deleted.
method
pandas.core.indexes.base.Index.difference(other:Axes, sort:bool | None=None) -> IndexReturn a new Index with elements of index not in `other`.
method
pandas.core.indexes.base.Index.drop(labels:Index | np.ndarray | Iterable[Hashable], errors:IgnoreRaise='raise') -> IndexMake new Index with passed list of labels deleted.
method
pandas.core.indexes.base.Index.drop_duplicates(*keep:DropKeep='first') -> SelfReturn Index with duplicate values removed.
method
pandas.core.indexes.base.Index.droplevel(level:IndexLabel=0) -> IndexReturn index with requested level(s) removed.
method
pandas.core.indexes.base.Index.dropna(how:AnyAll='any') -> SelfReturn Index without NA/NaN values.
method
pandas.core.indexes.base.Index.dtype() -> DtypeObjReturn the dtype object of the underlying data.
method
pandas.core.indexes.base.Index.duplicated(keep:DropKeep='first') -> npt.NDArray[np.bool_]Indicate duplicate index values.
method
pandas.core.indexes.base.Index.equals(other:Any) -> boolDetermine if two Index object are equal.
method
pandas.core.indexes.base.Index.fillna(value:object) -> IndexFill NA/NaN values with the specified value.
method
pandas.core.indexes.base.Index.get_indexer_for(target:Axes) -> npt.NDArray[np.intp]Guaranteed return of an indexer even when non-unique.
method
pandas.core.indexes.base.Index.get_loc(key:Hashable) -> int | slice | npt.NDArray[np.bool_]Get integer location, slice or boolean mask for requested label.
method
pandas.core.indexes.base.Index.get_slice_bound(label:Hashable, side:Literal['left', 'right']) -> intCalculate slice bound that corresponds to given label.
method
pandas.core.indexes.base.Index.groupby(values:Axes) -> PrettyDict[Hashable, Index]Group the index labels by a given array of values.
method
pandas.core.indexes.base.Index.has_duplicates() -> boolCheck if the Index has duplicate values.
method
pandas.core.indexes.base.Index.hasnans() -> boolReturn True if there are any NaNs.
method
pandas.core.indexes.base.Index.infer_objects(copy:bool=True) -> IndexIf we have an object dtype, try to infer a non-object dtype.
method
pandas.core.indexes.base.Index.inferred_type() -> str_tReturn a string of the type inferred from the values.
method
pandas.core.indexes.base.Index.insert(loc:int, item:Hashable) -> IndexMake new Index inserting new item at location.
method
pandas.core.indexes.base.Index.intersection(other:Axes, sort:bool=False) -> IndexForm the intersection of two Index objects.
method
pandas.core.indexes.base.Index.is_(other:Index) -> boolMore flexible, faster check like ``is`` but that works through views.
method
pandas.core.indexes.base.Index.is_unique() -> boolReturn if the index has unique values.
method
pandas.core.indexes.base.Index.isna() -> npt.NDArray[np.bool_]Detect missing values.
method
pandas.core.indexes.base.Index.map(mapper:Callable | dict | Series, na_action:Literal['ignore'] | None=None) -> IndexMap values using an input mapping or function.
method
pandas.core.indexes.base.Index.max(axis:AxisInt | None=None, skipna:bool=True, *args:Any, **kwargs:Any) -> objectReturn the maximum value of the Index.
method
pandas.core.indexes.base.Index.memory_usage(deep:bool=False) -> intMemory usage of the values.
method
pandas.core.indexes.base.Index.min(axis:AxisInt | None=None, skipna:bool=True, *args:Any, **kwargs:Any) -> objectReturn the minimum value of the Index.
method
pandas.core.indexes.base.Index.name() -> HashableReturn Index or MultiIndex name.
method
pandas.core.indexes.base.Index.nlevels() -> intNumber of levels.
method
pandas.core.indexes.base.Index.notna() -> npt.NDArray[np.bool_]Detect existing (non-missing) values.
method
pandas.core.indexes.base.Index.putmask(mask:npt.NDArray[np.bool_], value:object) -> IndexReturn a new Index of the values set with the mask.
method
pandas.core.indexes.base.Index.ravel(order:str_t='C') -> SelfReturn a view on self.
method
pandas.core.indexes.base.Index.reindex(target:Axes, method:ReindexMethod | None=None, level:Level | None=None, limit:int | None=None, tolerance:float | None=None) -> tuple[Index, npt.NDArray[np.intp] | None]Create index with target's values.
method
pandas.core.indexes.base.Index.repeat(repeats:int | Sequence[int], axis:None=None) -> SelfRepeat elements of an Index.
method
pandas.core.indexes.base.Index.replace(to_replace:Any=None, value:Any=lib.no_default, regex:bool=False) -> IndexReplace values in the Index.
method
pandas.core.indexes.base.Index.round(decimals:int=0) -> SelfRound each value in the Index to the given number of decimals.
method
pandas.core.indexes.base.Index.shape() -> ShapeReturn a tuple of the shape of the underlying data.
method
pandas.core.indexes.base.Index.shift(periods:int=1, freq:Frequency | None=None) -> SelfShift index by desired number of time frequency increments.
method
pandas.core.indexes.base.Index.slice_indexer(start:Hashable | None=None, end:Hashable | None=None, step:int | None=None) -> sliceCompute the slice indexer for input labels and step.
method
pandas.core.indexes.base.Index.slice_locs(start:SliceType=None, end:SliceType=None, step:int | None=None) -> tuple[int, int]Compute slice locations for input labels.
method
pandas.core.indexes.base.Index.to_flat_index() -> SelfIdentity method.
method
pandas.core.indexes.base.Index.to_frame(index:bool=True, name:Hashable=lib.no_default) -> DataFrameCreate a DataFrame with a column containing the Index.
method
pandas.core.indexes.base.Index.to_series(index:Axes | None=None, name:Hashable | None=None) -> SeriesCreate a Series with both index and values equal to the index keys.
method
pandas.core.indexes.base.Index.union(other:Axes, sort:bool | None=None) -> IndexForm the union of two Index objects.
method
pandas.core.indexes.base.Index.unique(level:Hashable | None=None) -> SelfReturn unique values in the index.
method
pandas.core.indexes.base.Index.values() -> ArrayLikeReturn an array representing the data in the Index.
method
pandas.core.indexes.base.Index.where(cond:np.ndarray, other:object=None) -> IndexReplace values where the condition is False.
func
pandas.core.indexes.base.ensure_index(index_like:Axes, copy:bool=False) -> IndexEnsure that we have an index from some index-like object.
func
pandas.core.indexes.base.ensure_index_from_sequences(sequences:Sequence[Axes], names:Sequence[Hashable] | None=None) -> IndexConstruct an index from sequences of data.
func
pandas.core.indexes.base.maybe_sequence_to_range(sequence:Axes) -> AxesConvert a 1D, non-pandas sequence to a range if possible.
func
pandas.core.indexes.base.trim_front(strings:list[str]) -> list[str]Trims leading spaces evenly among all strings.
class
pandas.core.indexes.category.CategoricalIndexIndex based on an underlying :class:`Categorical`.
class
pandas.core.indexes.datetimes.DatetimeIndexImmutable ndarray-like of datetime64 data.
method
pandas.core.indexes.datetimes.DatetimeIndex.normalize() -> SelfConvert times to midnight.
method
pandas.core.indexes.datetimes.DatetimeIndex.snap(freq:Frequency='S') -> DatetimeIndexSnap time stamps to nearest occurring frequency.
method
pandas.core.indexes.datetimes.DatetimeIndex.strftime(date_format) -> IndexConvert to Index using specified date_format.
method
pandas.core.indexes.datetimes.DatetimeIndex.to_julian_date() -> IndexConvert Timestamp to a Julian Date.
class
pandas.core.indexes.extension.ExtensionIndexIndex subclass for indexes backed by ExtensionArray.
func
pandas.core.indexes.interval.interval_range(start=None, end=None, periods=None, freq=None, name:Hashable | None=None, closed:IntervalClosedType='right') -> IntervalIndexReturn a fixed frequency IntervalIndex.
class
pandas.core.indexes.multi.MultiIndexA multi-level, or hierarchical, index object for pandas objects.
method
pandas.core.indexes.multi.MultiIndex.argsort(*na_position:NaPosition='last', *args, **kwargs) -> npt.NDArray[np.intp]Return the integer indices that would sort the index.
method
pandas.core.indexes.multi.MultiIndex.codes() -> FrozenListCodes of the MultiIndex.
method
pandas.core.indexes.multi.MultiIndex.copy(names=None, deep:bool=False, name=None) -> SelfMake a copy of this object.
method
pandas.core.indexes.multi.MultiIndex.dropna(how:AnyAll='any') -> MultiIndexReturn MultiIndex without NA/NaN values.
method
pandas.core.indexes.multi.MultiIndex.duplicated(keep:DropKeep='first') -> npt.NDArray[np.bool_]Indicate duplicate index values.
About this data
These signatures were extracted from the public source of pandas-dev/pandas
using Python's ast module. Argument names, default values,
type annotations and return types are taken verbatim from the code.
Implementation bodies are never stored. See
how it works for details.