brk-code

pandas の API リファレンス

pandas (pandas-dev/pandas) の公開 API 400 件 —— クラス 59、関数 121、メソッド 220。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。

リポジトリ: pandas-dev/pandas

種別件数
クラス59
関数121
メソッド220

API 一覧

classpandas._config.config.DictWrapper
provide attribute-style access to a nested dict
classpandas._config.config.OptionError
Exception raised for pandas.options.
funcpandas._config.config.describe_option(pat:str='', _print_desc:bool=True) -> str | None
Print the description for one or more registered options.
funcpandas._config.config.get_option(pat:str) -> Any
Retrieve the value of the specified option.
funcpandas._config.config.is_nonnegative_int(value:object) -> None
Verify that value is None or a positive int.
funcpandas._config.config.option_context(*args:Any) -> Generator[None]
Context manager to temporarily set options in a ``with`` statement.
funcpandas._config.config.reset_option(pat:str) -> None
Reset one or more options to their default value.
funcpandas._config.config.set_option(*args:Any) -> None
Set the value of the specified option or options.
funcpandas._config.localization.get_locales(prefix:str | None=None, normalize:bool=True) -> list[str]
Get all the locales that are available on the system.
funcpandas._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.
classpandas._typing.ArrowArrayExportable
An object with an ``__arrow_c_array__`` method.
classpandas._typing.ArrowStreamExportable
An object with an ``__arrow_c_stream__`` method.
funcpandas.compat.is_platform_arm() -> bool
Checking if the running platform use ARM architecture.
funcpandas.compat.is_platform_linux() -> bool
Checking if the running platform is linux.
funcpandas.compat.is_platform_little_endian() -> bool
Checking if the running platform is little endian.
funcpandas.compat.is_platform_mac() -> bool
Checking if the running platform is mac.
funcpandas.compat.is_platform_power() -> bool
Checking if the running platform use Power architecture.
funcpandas.compat.is_platform_riscv64() -> bool
Checking if the running platform use riscv64 architecture.
funcpandas.compat.is_platform_windows() -> bool
Checking if the running platform is windows.
funcpandas.compat.pickle_compat.loads(bytes_object:bytes, *fix_imports:bool=True, *encoding:str='ASCII', *errors:str='strict') -> Any
Analogous to pickle._loads.
funcpandas.compat.pickle_compat.patch_pickle() -> Generator[None]
Temporarily patch pickle to use our unpickler.
funcpandas.compat.set_function_name(f:F, name:str, cls:type) -> F
Bind the name/qualname attributes of the function.
classpandas.core._numba.extensions.IndexType
The type class for Index objects.
classpandas.core._numba.extensions.SeriesType
The type class for Series objects.
funcpandas.core._numba.kernels.shared.is_monotonic_increasing(bounds:np.ndarray) -> bool
Check if int64 values are monotonically increasing.
classpandas.core.accessor.Accessor
Custom property-like object.
classpandas.core.accessor.PandasDelegate
Abstract base class for delegating methods/properties.
funcpandas.core.accessor.register_dataframe_accessor(name:str) -> Callable[[TypeT], TypeT]
Register a custom accessor on DataFrame objects.
funcpandas.core.accessor.register_index_accessor(name:str) -> Callable[[TypeT], TypeT]
Register a custom accessor on Index objects.
funcpandas.core.accessor.register_series_accessor(name:str) -> Callable[[TypeT], TypeT]
Register a custom accessor on Series objects.
funcpandas.core.algorithms.is_monotonic(values:ArrayLike) -> tuple[bool, bool, bool]
Determine whether values are monotonic increasing/decreasing.
funcpandas.core.algorithms.isin(comps:ListLike, values:ListLike) -> npt.NDArray[np.bool_]
Compute the isin boolean array.
funcpandas.core.algorithms.map_array(arr:ArrayLike, mapper, na_action:Literal['ignore'] | None=None) -> np.ndarray | ExtensionArray | Index
Map values using an input mapping or function.
funcpandas.core.algorithms.mode(values:ArrayLike, dropna:bool=True, mask:npt.NDArray[np.bool_] | None=None) -> tuple[np.ndarray, npt.NDArray[np.bool_]] | ExtensionArray
Returns the mode(s) of an array.
funcpandas.core.algorithms.nunique_ints(values:ArrayLike) -> int
Return the number of unique values for integer array-likes.
funcpandas.core.algorithms.take(arr, indices:TakeIndexer, axis:AxisInt=0, allow_fill:bool=False, fill_value=None)
Take elements from an array.
funcpandas.core.algorithms.unique_with_mask(values, mask:npt.NDArray[np.bool_] | None=None)
See algorithms.unique for docs.
methodpandas.core.apply.Apply.agg() -> DataFrame | Series | None
Provide an implementation for the aggregators.
methodpandas.core.apply.Apply.apply_list_or_dict_like() -> DataFrame | Series
Compute apply in case of a list-like or dict-like.
methodpandas.core.apply.Apply.apply_str() -> DataFrame | Series
Compute apply in case of a string.
methodpandas.core.apply.Apply.normalize_dictlike_arg(how:str, obj:DataFrame | Series, func:AggFuncTypeDict) -> AggFuncTypeDict
Handler for dict-like argument.
methodpandas.core.apply.Apply.transform() -> DataFrame | Series
Transform a DataFrame or Series.
methodpandas.core.apply.Apply.transform_dict_like(func) -> DataFrame
Compute transform in the case of a dict-like func
classpandas.core.apply.BaseExecutionEngine
Base class for execution engines for map and apply methods.
funcpandas.core.apply.maybe_mangle_lambdas(agg_spec:Any) -> Any
Make new lambdas with unique names.
funcpandas.core.array_algos.putmask.putmask_inplace(values:ArrayLike, mask:npt.NDArray[np.bool_], value:Any) -> None
ExtensionArray-compatible implementation of np.putmask.
funcpandas.core.array_algos.replace.should_use_regex(regex:bool, to_replace:Any) -> bool
Decide whether to treat `to_replace` as a regular expression.
funcpandas.core.arraylike.array_ufunc(self, ufunc:np.ufunc, method:str, *inputs:Any, **kwargs:Any)
Compatibility with numpy ufuncs.
methodpandas.core.arrays._mixins.NDArrayBackedExtensionArray.fillna(value, limit:int | None=None, copy:bool=True) -> Self
Fill NA/NaN values using the specified method.
methodpandas.core.arrays._mixins.NDArrayBackedExtensionArray.insert(loc:int, item) -> Self
Make new ExtensionArray inserting new item at location.
methodpandas.core.arrays._mixins.NDArrayBackedExtensionArray.shift(periods:int=1, fill_value=None) -> Self
Shift values by desired number.
methodpandas.core.arrays._mixins.NDArrayBackedExtensionArray.value_counts(dropna:bool=True) -> Series
Return a Series containing counts of unique values.
classpandas.core.arrays.arrow.array.ArrowExtensionArray
Pandas ExtensionArray backed by a PyArrow ChunkedArray.
methodpandas.core.arrays.arrow.array.ArrowExtensionArray.copy() -> Self
Return a shallow copy of the array.
methodpandas.core.arrays.arrow.array.ArrowExtensionArray.dropna() -> Self
Return ArrowExtensionArray without NA values.
methodpandas.core.arrays.arrow.array.ArrowExtensionArray.dtype() -> ArrowDtype
An instance of 'ExtensionDtype'.
methodpandas.core.arrays.arrow.array.ArrowExtensionArray.factorize(use_na_sentinel:bool=True) -> tuple[np.ndarray, ExtensionArray]
Encode the arrow array as an enumerated type.
methodpandas.core.arrays.arrow.array.ArrowExtensionArray.fillna(value:object | ArrayLike, limit:int | None=None, copy:bool=True) -> Self
Fill NA/NaN values using the specified method.
methodpandas.core.arrays.arrow.array.ArrowExtensionArray.interpolate(*method:InterpolateOptions, *axis:int, *index, *limit, *limit_direction, *limit_area, *copy:bool, **kwargs) -> Self
See NDFrame.interpolate.__doc__.
methodpandas.core.arrays.arrow.array.ArrowExtensionArray.isna() -> npt.NDArray[np.bool_]
Boolean NumPy array indicating if each value is missing.
methodpandas.core.arrays.arrow.array.ArrowExtensionArray.take(indices:TakeIndexer, allow_fill:bool=False, fill_value:Any=None) -> ArrowExtensionArray
Take elements from an array.
methodpandas.core.arrays.arrow.array.ArrowExtensionArray.to_numpy(dtype:npt.DTypeLike | None=None, copy:bool=False, na_value:object=lib.no_default) -> np.ndarray
Convert to a NumPy ndarray.
methodpandas.core.arrays.arrow.array.ArrowExtensionArray.unique() -> Self
Compute the ArrowExtensionArray of unique values.
methodpandas.core.arrays.arrow.array.ArrowExtensionArray.value_counts(dropna:bool=True) -> Series
Return a Series containing counts of each unique value.
funcpandas.core.arrays.arrow.array.to_pyarrow_type(dtype:ArrowDtype | pa.DataType | Dtype | None) -> pa.DataType | None
Convert dtype to a pyarrow type instance.
classpandas.core.arrays.base.ExtensionArray
Abstract base class for custom 1-D array types.
methodpandas.core.arrays.base.ExtensionArray.argmax(skipna:bool=True) -> int
Return the index of maximum value.
methodpandas.core.arrays.base.ExtensionArray.argmin(skipna:bool=True) -> int
Return the index of minimum value.
methodpandas.core.arrays.base.ExtensionArray.argsort(*ascending:bool=True, *kind:SortKind='quicksort', *na_position:str='last', **kwargs) -> np.ndarray
Return the indices that would sort this array.
methodpandas.core.arrays.base.ExtensionArray.copy() -> Self
Return a copy of the array.
methodpandas.core.arrays.base.ExtensionArray.dropna() -> Self
Return ExtensionArray without NA values.
methodpandas.core.arrays.base.ExtensionArray.dtype() -> ExtensionDtype
An instance of ExtensionDtype.
methodpandas.core.arrays.base.ExtensionArray.duplicated(keep:Literal['first', 'last', False]='first') -> npt.NDArray[np.bool_]
Return boolean ndarray denoting duplicate values.
methodpandas.core.arrays.base.ExtensionArray.equals(other:object) -> bool
Return if another array is equivalent to this array.
methodpandas.core.arrays.base.ExtensionArray.factorize(use_na_sentinel:bool=True) -> tuple[np.ndarray, ExtensionArray]
Encode the extension array as an enumerated type.
methodpandas.core.arrays.base.ExtensionArray.fillna(value:object | ArrayLike, limit:int | None=None, copy:bool=True) -> Self
Fill NA/NaN values using the specified method.
methodpandas.core.arrays.base.ExtensionArray.insert(loc:int, item) -> Self
Insert an item at the given position.
methodpandas.core.arrays.base.ExtensionArray.isna() -> np.ndarray | ExtensionArrayNaResult
A 1-D array indicating if each value is missing.
methodpandas.core.arrays.base.ExtensionArray.item(index:int | None=None)
Return the array element at the specified position as a Python scalar.
methodpandas.core.arrays.base.ExtensionArray.ndim() -> int
Extension Arrays are only allowed to be 1-dimensional.
methodpandas.core.arrays.base.ExtensionArray.ravel(order:Literal['C', 'F', 'A', 'K'] | None='C') -> Self
Return a flattened view on this array.
methodpandas.core.arrays.base.ExtensionArray.repeat(repeats:int | Sequence[int], axis:AxisInt | None=None) -> Self
Repeat elements of an ExtensionArray.
methodpandas.core.arrays.base.ExtensionArray.round(decimals:int=0) -> Self
Round each value in the array to the given number of decimals.
methodpandas.core.arrays.base.ExtensionArray.shape() -> Shape
Return a tuple of the array dimensions.
methodpandas.core.arrays.base.ExtensionArray.shift(periods:int=1, fill_value:object=None) -> ExtensionArray
Shift values by desired number.
methodpandas.core.arrays.base.ExtensionArray.size() -> int
The number of elements in the array.
methodpandas.core.arrays.base.ExtensionArray.sort(*ascending:bool=True, *kind:SortKind='quicksort', *na_position:str='last') -> None
Sort the array in-place.
methodpandas.core.arrays.base.ExtensionArray.take(indices:TakeIndexer, *allow_fill:bool=False, *fill_value:Any=None) -> Self
Take elements from an array.
methodpandas.core.arrays.base.ExtensionArray.to_numpy(dtype:npt.DTypeLike | None=None, copy:bool=False, na_value:object=lib.no_default) -> np.ndarray
Convert to a NumPy ndarray.
methodpandas.core.arrays.base.ExtensionArray.tolist() -> list
Return a list of the values.
methodpandas.core.arrays.base.ExtensionArray.transpose(*axes:int) -> Self
Return a transposed view on this array.
methodpandas.core.arrays.base.ExtensionArray.unique() -> Self
Compute the ExtensionArray of unique values.
methodpandas.core.arrays.base.ExtensionArray.value_counts(dropna:bool=True) -> Series
Return a Series containing counts of unique values.
classpandas.core.arrays.base.ExtensionScalarOpsMixin
A mixin for defining ops on an ExtensionArray.
classpandas.core.arrays.boolean.BooleanArray
Array of boolean (True/False) data with missing values.
classpandas.core.arrays.boolean.BooleanDtype
Extension dtype for boolean data.
methodpandas.core.arrays.boolean.BooleanDtype.construct_array_type() -> type_t[BooleanArray]
Return the array type associated with this dtype.
methodpandas.core.arrays.categorical.Categorical.add_categories(new_categories) -> Self
Add new categories.
methodpandas.core.arrays.categorical.Categorical.as_ordered() -> Self
Set the Categorical to be ordered.
methodpandas.core.arrays.categorical.Categorical.as_unordered() -> Self
Set the Categorical to be unordered.
methodpandas.core.arrays.categorical.Categorical.categories() -> Index
The categories of this categorical.
methodpandas.core.arrays.categorical.Categorical.check_for_ordered(op) -> None
assert that we are ordered
methodpandas.core.arrays.categorical.Categorical.codes() -> np.ndarray
The category codes of this categorical index.
methodpandas.core.arrays.categorical.Categorical.equals(other:object) -> bool
Returns True if categorical arrays are equal.
methodpandas.core.arrays.categorical.Categorical.isin(values:ArrayLike) -> npt.NDArray[np.bool_]
Check whether `values` are contained in Categorical.
methodpandas.core.arrays.categorical.Categorical.max(*skipna:bool=True, **kwargs)
The maximum value of the object.
methodpandas.core.arrays.categorical.Categorical.min(*skipna:bool=True, **kwargs)
The minimum value of the object.
methodpandas.core.arrays.categorical.Categorical.ordered() -> Ordered
Whether the categories have an ordered relationship.
methodpandas.core.arrays.categorical.Categorical.remove_categories(removals) -> Self
Remove the specified categories.
methodpandas.core.arrays.categorical.Categorical.remove_unused_categories() -> Self
Remove categories which are not used.
methodpandas.core.arrays.categorical.Categorical.rename_categories(new_categories) -> Self
Rename categories.
methodpandas.core.arrays.categorical.Categorical.set_categories(new_categories, ordered=None, rename:bool=False) -> Self
Set the categories to the specified new categories.
methodpandas.core.arrays.categorical.Categorical.set_ordered(value:bool) -> Self
Set the ordered attribute to the boolean value.
methodpandas.core.arrays.categorical.Categorical.value_counts(dropna:bool=True) -> Series
Return a Series containing counts of each category.
funcpandas.core.arrays.categorical.contains(cat, key, container) -> bool
Helper for membership check for ``key`` in ``cat``.
classpandas.core.arrays.floating.FloatingArray
Array of floating (optional missing) values.
classpandas.core.arrays.floating.FloatingDtype
An ExtensionDtype to hold a single size of floating dtype.
classpandas.core.arrays.integer.IntegerArray
Array of integer (optional missing) values.
funcpandas.core.arrays.masked.transpose_homogeneous_masked_arrays(masked_arrays:Sequence[BaseMaskedArray]) -> list[BaseMaskedArray]
Transpose masked arrays in a list, but faster.
classpandas.core.arrays.numeric.NumericArray
Base class for IntegerArray and FloatingArray.
classpandas.core.arrays.numpy_.NumpyExtensionArray
A pandas ExtensionArray for NumPy data.
methodpandas.core.arrays.numpy_.NumpyExtensionArray.interpolate(*method:InterpolateOptions, *axis:int, *index:Index, *limit, *limit_direction, *limit_area, *copy:bool, **kwargs) -> Self
See NDFrame.interpolate.__doc__.
classpandas.core.arrays.period.PeriodArray
Pandas ExtensionArray for storing Period data.
methodpandas.core.arrays.period.PeriodArray.asfreq(freq=None, how:str='E') -> Self
Convert the PeriodArray to the specified frequency `freq`.
methodpandas.core.arrays.period.PeriodArray.dayofyear()
The ordinal day of the year.
methodpandas.core.arrays.period.PeriodArray.daysinmonth()
The number of days in the month.
methodpandas.core.arrays.period.PeriodArray.freq() -> BaseOffset
Return the frequency object for this PeriodArray.
methodpandas.core.arrays.period.PeriodArray.to_timestamp(freq=None, how:str='start') -> DatetimeArray
Cast to DatetimeArray/Index.
classpandas.core.arrays.sparse.accessor.SparseFrameAccessor
DataFrame accessor for sparse data.
classpandas.core.arrays.sparse.array.SparseArray
An ExtensionArray for storing sparse data.
methodpandas.core.arrays.sparse.array.SparseArray.astype(dtype:AstypeArg | None=None, copy:bool=True)
Change the dtype of a SparseArray.
methodpandas.core.arrays.sparse.array.SparseArray.cumsum(axis:AxisInt=0, *args, **kwargs) -> SparseArray
Cumulative sum of non-NA/null values.
methodpandas.core.arrays.sparse.array.SparseArray.duplicated(keep:Literal['first', 'last', False]='first') -> npt.NDArray[np.bool_]
Return boolean ndarray denoting duplicate values.
methodpandas.core.arrays.sparse.array.SparseArray.fillna(value, limit:int | None=None, copy:bool=True) -> Self
Fill missing values with `value`.
methodpandas.core.arrays.sparse.array.SparseArray.from_spmatrix(data:_SparseMatrixLike) -> Self
Create a SparseArray from a scipy.sparse matrix.
methodpandas.core.arrays.sparse.array.SparseArray.kind() -> SparseIndexKind
The kind of sparse index for this array.
methodpandas.core.arrays.sparse.array.SparseArray.map(mapper, na_action:Literal['ignore'] | None=None) -> Self
Map categories using an input mapping or function.
methodpandas.core.arrays.sparse.array.SparseArray.mean(axis:Axis=0, *skipna:bool=True, *args, **kwargs)
Mean of non-NA/null values.
methodpandas.core.arrays.sparse.array.SparseArray.npoints() -> int
The number of non- ``fill_value`` points.
methodpandas.core.arrays.sparse.array.SparseArray.to_dense() -> np.ndarray
Convert SparseArray to a NumPy array.
methodpandas.core.arrays.sparse.array.SparseArray.value_counts(dropna:bool=True) -> Series
Returns a Series containing counts of unique values.
classpandas.core.arrays.string_.BaseStringArray
Mixin class for StringArray, ArrowStringArray.
methodpandas.core.arrays.string_.BaseStringArray.tolist() -> list
Return a list of the value.
classpandas.core.arrays.string_.StringArray
Extension array for string data.
classpandas.core.arrays.string_.StringDtype
Extension dtype for string data.
methodpandas.core.arrays.string_.StringDtype.construct_from_string(string) -> Self
Construct a StringDtype from a string.
methodpandas.core.arrays.string_.StringDtype.na_value() -> libmissing.NAType | float
The missing value representation for this dtype.
methodpandas.core.arrays.string_.StringDtype.storage() -> str
The storage backend for this dtype.
classpandas.core.arrays.timedeltas.TimedeltaArray
Pandas ExtensionArray for timedelta data.
methodpandas.core.arrays.timedeltas.TimedeltaArray.dtype() -> np.dtype[np.timedelta64]
The dtype for the TimedeltaArray.
classpandas.core.base.NoNewAttributesMixin
Mixin which prevents adding new attributes.
classpandas.core.base.PandasObject
Base class for various pandas objects.
classpandas.core.col.Expression
Class representing a deferred column.
funcpandas.core.col.col(col_name:Hashable) -> Expression
Generate deferred object representing a column of a DataFrame.
funcpandas.core.common.all_none(*args:object) -> bool
Returns a boolean indicating if all arguments are None.
funcpandas.core.common.all_not_none(*args:object) -> bool
Returns a boolean indicating if all arguments are not None.
funcpandas.core.common.any_none(*args:object) -> bool
Returns a boolean indicating if any argument is None.
funcpandas.core.common.any_not_none(*args:object) -> bool
Returns a boolean indicating if any argument is not None.
funcpandas.core.common.cast_scalar_indexer(val:Any) -> Any
Disallow indexing with a float key, even if that key is a round number.
funcpandas.core.common.convert_to_list_like(values:Hashable | Iterable | AnyArrayLike) -> list | AnyArrayLike
Convert list-like or scalar input to list-like.
funcpandas.core.common.count_not_none(*args:object) -> int
Returns the count of arguments that are not None.
funcpandas.core.common.flatten(line:Iterable) -> Generator[Any]
Flatten an arbitrarily nested sequence.
funcpandas.core.common.get_cython_func(arg:Callable) -> str | None
if we define an internal function for this argument, return it
funcpandas.core.common.is_bool_indexer(key:Any) -> bool
Check whether `key` is a valid boolean indexer.
funcpandas.core.common.is_empty_slice(obj:object) -> bool
We have an empty slice, e.g.
funcpandas.core.common.is_full_slice(obj:object, line:int) -> bool
We have a full length slice.
funcpandas.core.common.is_local_in_caller_frame(obj:NDFrame) -> bool
Helper function used in detecting chained assignment.
funcpandas.core.common.is_null_slice(obj:object) -> bool
We have a null slice.
funcpandas.core.common.is_true_slices(line:abc.Iterable) -> abc.Generator[bool, None, None]
Find non-trivial slices in "line": yields a bool.
funcpandas.core.common.maybe_iterable_to_list(obj:Iterable[T] | T) -> Collection[T] | T
If obj is Iterable but not list-like, consume into list.
funcpandas.core.common.not_none(*args:object) -> Generator[object]
Returns a generator consisting of the arguments that are not None.
funcpandas.core.common.require_length_match(data:Any, index:Index) -> None
Check the length of data matches the length of the index.
funcpandas.core.common.standardize_mapping(into:type | abc.Mapping) -> type | partial
Helper function to standardize a supplied mapping.
funcpandas.core.common.temp_setattr(obj:Any, attr:str, value:Any, condition:bool=True) -> Generator[Any]
Temporarily set attribute on an object.
funcpandas.core.computation.align.align_terms(terms)
Align a set of terms.
funcpandas.core.computation.common.ensure_decoded(s:str | bytes) -> str
If we have bytes, decode them to unicode.
classpandas.core.computation.engines.AbstractEngine
Object serving as a base class for all engines.
methodpandas.core.computation.engines.AbstractEngine.convert() -> str
Convert an expression for evaluation.
methodpandas.core.computation.engines.AbstractEngine.evaluate() -> object
Run the engine on the expression.
classpandas.core.computation.engines.NumExprEngine
NumExpr engine class
classpandas.core.computation.engines.PythonEngine
Evaluate an expression in Python space.
classpandas.core.computation.expr.BaseExprVisitor
Custom ast walker.
methodpandas.core.computation.expr.BaseExprVisitor.visit_Index(node, **kwargs)
df.index[4]
methodpandas.core.computation.expr.BaseExprVisitor.visit_Slice(node, **kwargs) -> slice
df.index[slice(4,6)]
classpandas.core.computation.expr.Expr
Object encapsulating an expression.
methodpandas.core.computation.expr.Expr.names()
Get the names in an expression.
methodpandas.core.computation.expr.Expr.parse()
Parse an expression.
funcpandas.core.computation.expr.disallow(nodes:set[str]) -> Callable[[type[_T]], type[_T]]
Decorator to disallow certain nodes from parsing.
funcpandas.core.computation.expressions.get_test_result() -> list[bool]
Get test result and reset test_results.
funcpandas.core.computation.expressions.set_test_mode(v:bool=True) -> None
Keeps track of whether numexpr was used.
classpandas.core.computation.ops.BinOp
Hold a binary operator and its operands.
classpandas.core.computation.ops.Op
Hold an operator of arbitrary arity.
classpandas.core.computation.ops.UnaryOp
Hold a unary operator and its operands.
funcpandas.core.computation.parsing.clean_backtick_quoted_toks(tok:tuple[int, str]) -> tuple[int, str]
Clean up a column name if surrounded by backticks.
funcpandas.core.computation.parsing.clean_column_name(name:Hashable) -> Hashable
Function to emulate the cleaning of a backtick quoted name.
funcpandas.core.computation.parsing.create_valid_python_identifier(name:str) -> str
Create valid Python identifiers from any string.
funcpandas.core.computation.parsing.tokenize_string(source:str) -> Iterator[tuple[int, str]]
Tokenize a Python source code string.
methodpandas.core.computation.pytables.BinOp.conform(rhs)
inplace conform rhs
methodpandas.core.computation.pytables.BinOp.generate(v) -> str
create and return the op string for this TermValue
methodpandas.core.computation.pytables.BinOp.is_valid() -> bool
return True if this is a valid field
methodpandas.core.computation.pytables.BinOp.kind()
the kind of my field
methodpandas.core.computation.pytables.BinOp.meta()
the meta of my field
methodpandas.core.computation.pytables.BinOp.metadata()
the metadata of my field
methodpandas.core.computation.scope.Scope.add_tmp(value) -> str
Add a temporary variable to the scope.
methodpandas.core.computation.scope.Scope.has_resolvers() -> bool
Return whether we have any extra scope.
methodpandas.core.computation.scope.Scope.ntemps() -> int
The number of temporary variables in this scope
methodpandas.core.computation.scope.Scope.swapkey(old_key:str, new_key:str, new_value=None) -> None
Replace a variable name, with a potentially new value.
funcpandas.core.computation.scope.ensure_scope(level:int, global_dict=None, local_dict=None, resolvers=(), target=None) -> Scope
Ensure that we are grabbing the correct scope.
funcpandas.core.config_init.is_terminal() -> bool
Detect if Python is running in a terminal.
funcpandas.core.construction.array(data:Sequence[object] | AnyArrayLike, dtype:Dtype | None=None, copy:bool=True) -> ExtensionArray
Create an array.
funcpandas.core.construction.range_to_ndarray(rng:range) -> np.ndarray
Cast a range object to ndarray.
funcpandas.core.construction.sanitize_masked_array(data:ma.MaskedArray) -> np.ndarray
Convert numpy MaskedArray to ensure mask is softened.
funcpandas.core.dtypes.astype.astype_array(values:ArrayLike, dtype:DtypeObj, copy:bool=False) -> ArrayLike
Cast array (ndarray or ExtensionArray) to the new dtype.
funcpandas.core.dtypes.astype.astype_is_view(dtype:DtypeObj, new_dtype:DtypeObj) -> bool
Checks if astype avoided copying the data.
classpandas.core.dtypes.base.ExtensionDtype
A custom data type, to be paired with an ExtensionArray.
methodpandas.core.dtypes.base.ExtensionDtype.construct_array_type() -> type_t[ExtensionArray]
Return the array type associated with this dtype.
methodpandas.core.dtypes.base.ExtensionDtype.construct_from_string(string:str) -> Self
Construct this type from a string.
methodpandas.core.dtypes.base.ExtensionDtype.empty(shape:Shape) -> ExtensionArray
Construct an ExtensionArray of this dtype with the given shape.
methodpandas.core.dtypes.base.ExtensionDtype.is_dtype(dtype:object) -> bool
Check if we match 'dtype'.
methodpandas.core.dtypes.base.ExtensionDtype.na_value() -> object
Default NA value to use for this type.
methodpandas.core.dtypes.base.ExtensionDtype.name() -> str
A string identifying the data type.
methodpandas.core.dtypes.base.ExtensionDtype.type() -> type_t[Any]
The scalar type for the array, e.g.
classpandas.core.dtypes.base.Registry
Registry for dtype inference.
methodpandas.core.dtypes.base.Registry.register(dtype:type_t[ExtensionDtype]) -> None
Parameters ---------- dtype : ExtensionDtype class
funcpandas.core.dtypes.cast.coerce_indexer_dtype(indexer:np.ndarray, categories:Index) -> np.ndarray
coerce the indexer input array to the smallest dtype possible
funcpandas.core.dtypes.cast.dict_compat(d:dict[Scalar, Scalar]) -> dict[Scalar, Scalar]
Convert datetimelike-keyed dicts to a Timestamp-keyed dict.
funcpandas.core.dtypes.cast.infer_dtype_from(val:object) -> tuple[DtypeObj, Any]
Interpret the dtype from a scalar or array.
funcpandas.core.dtypes.cast.infer_dtype_from_array(arr:Any) -> tuple[DtypeObj, ArrayLike]
Infer the dtype from an array.
funcpandas.core.dtypes.cast.infer_dtype_from_scalar(val:object) -> tuple[DtypeObj, Any]
Interpret the dtype from a scalar.
funcpandas.core.dtypes.cast.is_nested_object(obj:object) -> bool
return a boolean if we have a nested object, e.g.
funcpandas.core.dtypes.cast.maybe_box_native(value:Scalar | None | NAType) -> Scalar | None | NAType
If passed a scalar cast the scalar to a python native type.
funcpandas.core.dtypes.cast.maybe_unbox_numpy_scalar(value:Any, *dtype:DtypeObj | None=None) -> Any
Maybe convert a NumPy scalar to its Python equivalent.
funcpandas.core.dtypes.common.classes(*klasses) -> Callable
Evaluate if the tipo is a subclass of the klasses.
funcpandas.core.dtypes.common.ensure_python_int(value:int | np.integer) -> int
Ensure that a value is a python int.
funcpandas.core.dtypes.common.ensure_str(value:bytes | Any) -> str
Ensure that bytes and non-strings get converted into ``str`` objects.
funcpandas.core.dtypes.common.is_1d_only_ea_dtype(dtype:DtypeObj | None) -> bool
Analogue to is_extension_array_dtype but excluding DatetimeTZDtype.
funcpandas.core.dtypes.common.is_all_strings(value:ArrayLike) -> bool
Check if this is an array of strings that we should try parsing.
funcpandas.core.dtypes.common.is_bool_dtype(arr_or_dtype) -> bool
Check whether the provided array or dtype is of a boolean dtype.
funcpandas.core.dtypes.common.is_dtype_equal(source, target) -> bool
Check if two dtypes are equal.
funcpandas.core.dtypes.common.is_object_dtype(arr_or_dtype) -> bool
Check whether an array-like or dtype is of the object dtype.
funcpandas.core.dtypes.common.is_sparse(arr) -> bool
Check whether an array-like is a 1-D pandas sparse array.
funcpandas.core.dtypes.common.needs_i8_conversion(dtype:DtypeObj | None) -> bool
Check whether the dtype should be converted to int64.
funcpandas.core.dtypes.common.validate_all_hashable(*error_name:str | None=None, *args) -> None
Return None if all args are hashable, else raise a TypeError.
funcpandas.core.dtypes.concat.union_categories_compat(to_union:Sequence[Categorical]) -> Categorical
union_categoricals for concat(union_categories=True).
classpandas.core.dtypes.dtypes.ArrowDtype
An ExtensionDtype for PyArrow data types.
methodpandas.core.dtypes.dtypes.ArrowDtype.construct_from_string(string:str) -> ArrowDtype
Construct this type from a string.
methodpandas.core.dtypes.dtypes.ArrowDtype.itemsize() -> int
Return the number of bytes in this dtype.
methodpandas.core.dtypes.dtypes.ArrowDtype.name() -> str
A string identifying the data type.
methodpandas.core.dtypes.dtypes.ArrowDtype.numpy_dtype() -> np.dtype
Return an instance of the related numpy dtype
methodpandas.core.dtypes.dtypes.ArrowDtype.type()
Returns associated scalar type.
classpandas.core.dtypes.dtypes.BaseMaskedDtype
Base class for dtypes for BaseMaskedArray subclasses.
methodpandas.core.dtypes.dtypes.BaseMaskedDtype.itemsize() -> int
Return the number of bytes in this dtype
methodpandas.core.dtypes.dtypes.BaseMaskedDtype.numpy_dtype() -> np.dtype
Return an instance of our numpy dtype
classpandas.core.dtypes.dtypes.CategoricalDtype
Type for categorical data with the categories and orderedness.
methodpandas.core.dtypes.dtypes.CategoricalDtype.construct_from_string(string:str_type) -> CategoricalDtype
Construct a CategoricalDtype from a string.
methodpandas.core.dtypes.dtypes.CategoricalDtype.ordered() -> Ordered
Whether the categories have an ordered relationship.
methodpandas.core.dtypes.dtypes.CategoricalDtype.validate_ordered(ordered:Ordered) -> None
Validates that we have a valid ordered parameter.
classpandas.core.dtypes.dtypes.DatetimeTZDtype
An ExtensionDtype for timezone-aware datetime data.
methodpandas.core.dtypes.dtypes.DatetimeTZDtype.construct_from_string(string:str_type) -> DatetimeTZDtype
Construct a DatetimeTZDtype from a string.
methodpandas.core.dtypes.dtypes.DatetimeTZDtype.name() -> str_type
A string representation of the dtype.
methodpandas.core.dtypes.dtypes.DatetimeTZDtype.tz() -> tzinfo
The timezone.
methodpandas.core.dtypes.dtypes.DatetimeTZDtype.unit() -> TimeUnit
The precision of the datetime data.
classpandas.core.dtypes.dtypes.IntervalDtype
An ExtensionDtype for Interval data.
methodpandas.core.dtypes.dtypes.IntervalDtype.subtype()
The dtype of the Interval bounds.
classpandas.core.dtypes.dtypes.NumpyEADtype
A Pandas ExtensionDtype for NumPy dtypes.
methodpandas.core.dtypes.dtypes.NumpyEADtype.itemsize() -> int
The element size of this data-type object.
methodpandas.core.dtypes.dtypes.NumpyEADtype.name() -> str
A bit-width name for this data-type.
methodpandas.core.dtypes.dtypes.NumpyEADtype.numpy_dtype() -> np.dtype
The NumPy dtype this NumpyEADtype wraps.
classpandas.core.dtypes.dtypes.PeriodDtype
An ExtensionDtype for Period data.
methodpandas.core.dtypes.dtypes.PeriodDtype.freq() -> BaseOffset
The frequency object of this PeriodDtype.
classpandas.core.dtypes.dtypes.SparseDtype
Dtype for data stored in :class:`SparseArray`.
methodpandas.core.dtypes.dtypes.SparseDtype.construct_from_string(string:str) -> SparseDtype
Construct a SparseDtype from a string form.
methodpandas.core.dtypes.dtypes.SparseDtype.fill_value()
The fill value of the array.
methodpandas.core.dtypes.dtypes.SparseDtype.kind() -> str
The sparse kind.
methodpandas.core.dtypes.dtypes.SparseDtype.update_dtype(dtype) -> SparseDtype
Convert the SparseDtype to a new dtype.
funcpandas.core.dtypes.inference.is_array_like(obj:object) -> bool
Check if the object is array-like.
funcpandas.core.dtypes.inference.is_dict_like(obj:object) -> bool
Check if the object is dict-like.
funcpandas.core.dtypes.inference.is_file_like(obj:object) -> bool
Check if the object is a file-like object.
funcpandas.core.dtypes.inference.is_hashable(obj:object, allow_slice:bool=True) -> TypeGuard[Hashable]
Return True if hash(obj) will succeed, False otherwise.
funcpandas.core.dtypes.inference.is_named_tuple(obj:object) -> bool
Check if the object is a named tuple.
funcpandas.core.dtypes.inference.is_number(obj:object) -> TypeGuard[Number | np.number]
Check if the object is a number.
funcpandas.core.dtypes.inference.is_re(obj:object) -> TypeGuard[Pattern]
Check if the object is a regex pattern instance.
funcpandas.core.dtypes.inference.is_re_compilable(obj:object) -> bool
Check if the object can be compiled into a regex pattern instance.
funcpandas.core.dtypes.inference.is_sequence(obj:object) -> bool
Check if the object is a sequence of objects.
funcpandas.core.dtypes.inference.iterable_not_string(obj:object) -> bool
Check if the object is an iterable but not a string.
funcpandas.core.dtypes.missing.array_equals(left:ArrayLike, right:ArrayLike) -> bool
ExtensionArray-compatible implementation of array_equivalent.
funcpandas.core.dtypes.missing.isna_all(arr:ArrayLike) -> bool
Optimized equivalent to isna(arr).all()
classpandas.core.flags.Flags
Flags that apply to pandas objects.
methodpandas.core.flags.Flags.allows_duplicate_labels() -> bool
Whether this object allows duplicate labels.
classpandas.core.groupby.groupby.GroupBy
Class for grouping and aggregating relational data.
methodpandas.core.groupby.groupby.GroupBy.all(skipna:bool=True) -> NDFrameT
Return True if all values in the group are truthful, else False.
methodpandas.core.groupby.groupby.GroupBy.any(skipna:bool=True) -> NDFrameT
Return True if any value in the group is truthful, else False.
methodpandas.core.groupby.groupby.GroupBy.bfill(limit:int | None=None)
Backward fill the values.
methodpandas.core.groupby.groupby.GroupBy.count() -> NDFrameT
Compute count of group, excluding missing values.
methodpandas.core.groupby.groupby.GroupBy.cummax(numeric_only:bool=False, skipna:bool=True, **kwargs) -> NDFrameT
Cumulative max for each group.
methodpandas.core.groupby.groupby.GroupBy.cummin(numeric_only:bool=False, skipna:bool=True, **kwargs) -> NDFrameT
Cumulative min for each group.
methodpandas.core.groupby.groupby.GroupBy.cumprod(numeric_only:bool=False, skipna:bool=True, *args, **kwargs) -> NDFrameT
Cumulative product for each group.
methodpandas.core.groupby.groupby.GroupBy.cumsum(numeric_only:bool=False, skipna:bool=True, *args, **kwargs) -> NDFrameT
Cumulative sum for each group.
methodpandas.core.groupby.groupby.GroupBy.diff(periods:int=1) -> NDFrameT
First discrete difference of element.
methodpandas.core.groupby.groupby.GroupBy.ffill(limit:int | None=None)
Forward fill the values.
funcpandas.core.groupby.groupby.GroupBy.first(x:Series)
Helper function for first item that isn't NA.
methodpandas.core.groupby.groupby.GroupBy.head(n:int=5) -> NDFrameT
Return first n rows of each group.
methodpandas.core.groupby.groupby.GroupBy.last(numeric_only:bool=False, min_count:int=-1, skipna:bool=True) -> NDFrameT
Compute the last entry of each column within each group.
funcpandas.core.groupby.groupby.GroupBy.last(x:Series)
Helper function for last item that isn't NA.
methodpandas.core.groupby.groupby.GroupBy.median(numeric_only:bool=False, skipna:bool=True) -> NDFrameT
Compute median of groups, excluding missing values.
methodpandas.core.groupby.groupby.GroupBy.prod(numeric_only:bool=False, min_count:int=0, skipna:bool=True) -> NDFrameT
Compute prod of group values.
methodpandas.core.groupby.groupby.GroupBy.rank(method:RankMethod='average', ascending:bool=True, na_option:RankNaOption='keep', pct:bool=False) -> NDFrameT
Provide the rank of values within each group.
methodpandas.core.groupby.groupby.GroupBy.size() -> DataFrame | Series
Compute group sizes.
methodpandas.core.groupby.groupby.GroupBy.tail(n:int=5) -> NDFrameT
Return last n rows of each group.
classpandas.core.groupby.indexing.GroupByIndexingMixin
Mixin for adding ._positional_selector to GroupBy.
classpandas.core.groupby.indexing.GroupByPositionalSelector
Return positional selection for each group.
methodpandas.core.groupby.ops.BinGrouper.groups()
dict {group name -> group labels}
classpandas.core.indexers.objects.BaseIndexer
Base class for window bounds calculations.
classpandas.core.indexers.objects.ExponentialMovingWindowIndexer
Calculate ewm window bounds (the entire window)
classpandas.core.indexers.objects.FixedWindowIndexer
Creates window boundaries that are of fixed length.
funcpandas.core.indexers.utils.check_array_indexer(array:AnyArrayLike, indexer:Any) -> Any
Check if `indexer` is a valid array indexer for `array`.
funcpandas.core.indexers.utils.is_empty_indexer(indexer) -> bool
Check if we have an empty indexer.
funcpandas.core.indexers.utils.is_scalar_indexer(indexer, ndim:int) -> bool
Return True if we are all scalar indexers.
funcpandas.core.indexers.utils.maybe_convert_indices(indices, n:int, verify:bool=True) -> np.ndarray
Attempt to convert indices into valid, positive indices.
funcpandas.core.indexers.utils.unpack_tuple_and_ellipses(item:tuple)
Possibly unpack arr[..., n] to arr[n]
funcpandas.core.indexers.utils.validate_indices(indices:np.ndarray, n:int) -> None
Perform bounds-checking for an indexer.
funcpandas.core.indexes.api.all_indexes_same(indexes) -> bool
Determine if all indexes contain the same elements.
funcpandas.core.indexes.api.safe_sort_index(index:Index) -> Index
Returns the sorted index We keep the dtypes and the name attributes.
funcpandas.core.indexes.api.union_indexes(indexes, sort:bool | lib.NoDefault=True) -> tuple[Index, bool]
Return the union of indexes.
classpandas.core.indexes.base.Index
Immutable sequence used for indexing and alignment.
methodpandas.core.indexes.base.Index.all(*args:Any, **kwargs:Any) -> Any
Return whether all elements are Truthy.
methodpandas.core.indexes.base.Index.any(*args:Any, **kwargs:Any) -> Any
Return whether any element is Truthy.
methodpandas.core.indexes.base.Index.append(other:Index | Sequence[Index]) -> Index
Append a collection of Index options together.
methodpandas.core.indexes.base.Index.argmax(axis:AxisInt | None=None, skipna:bool=True, *args:Any, **kwargs:Any) -> int
Return int position of the largest value in the Index.
methodpandas.core.indexes.base.Index.argmin(axis:AxisInt | None=None, skipna:bool=True, *args:Any, **kwargs:Any) -> int
Return int position of the smallest value in the Index.
methodpandas.core.indexes.base.Index.argsort(*args:Any, **kwargs:Any) -> npt.NDArray[np.intp]
Return the integer indices that would sort the index.
methodpandas.core.indexes.base.Index.array() -> ExtensionArray
The ExtensionArray of the data backing this Index.
methodpandas.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.
methodpandas.core.indexes.base.Index.astype(dtype:Dtype, copy:bool=True) -> Index
Create an Index with values cast to dtypes.
methodpandas.core.indexes.base.Index.copy(name:Hashable | None=None, deep:bool=False) -> Self
Make a copy of this object.
methodpandas.core.indexes.base.Index.delete(loc:int | np.integer | list[int] | npt.NDArray[np.integer]) -> Self
Make new Index with passed location(-s) deleted.
methodpandas.core.indexes.base.Index.difference(other:Axes, sort:bool | None=None) -> Index
Return a new Index with elements of index not in `other`.
methodpandas.core.indexes.base.Index.drop(labels:Index | np.ndarray | Iterable[Hashable], errors:IgnoreRaise='raise') -> Index
Make new Index with passed list of labels deleted.
methodpandas.core.indexes.base.Index.drop_duplicates(*keep:DropKeep='first') -> Self
Return Index with duplicate values removed.
methodpandas.core.indexes.base.Index.droplevel(level:IndexLabel=0) -> Index
Return index with requested level(s) removed.
methodpandas.core.indexes.base.Index.dropna(how:AnyAll='any') -> Self
Return Index without NA/NaN values.
methodpandas.core.indexes.base.Index.dtype() -> DtypeObj
Return the dtype object of the underlying data.
methodpandas.core.indexes.base.Index.duplicated(keep:DropKeep='first') -> npt.NDArray[np.bool_]
Indicate duplicate index values.
methodpandas.core.indexes.base.Index.equals(other:Any) -> bool
Determine if two Index object are equal.
methodpandas.core.indexes.base.Index.fillna(value:object) -> Index
Fill NA/NaN values with the specified value.
methodpandas.core.indexes.base.Index.get_indexer_for(target:Axes) -> npt.NDArray[np.intp]
Guaranteed return of an indexer even when non-unique.
methodpandas.core.indexes.base.Index.get_loc(key:Hashable) -> int | slice | npt.NDArray[np.bool_]
Get integer location, slice or boolean mask for requested label.
methodpandas.core.indexes.base.Index.get_slice_bound(label:Hashable, side:Literal['left', 'right']) -> int
Calculate slice bound that corresponds to given label.
methodpandas.core.indexes.base.Index.groupby(values:Axes) -> PrettyDict[Hashable, Index]
Group the index labels by a given array of values.
methodpandas.core.indexes.base.Index.has_duplicates() -> bool
Check if the Index has duplicate values.
methodpandas.core.indexes.base.Index.hasnans() -> bool
Return True if there are any NaNs.
methodpandas.core.indexes.base.Index.infer_objects(copy:bool=True) -> Index
If we have an object dtype, try to infer a non-object dtype.
methodpandas.core.indexes.base.Index.inferred_type() -> str_t
Return a string of the type inferred from the values.
methodpandas.core.indexes.base.Index.insert(loc:int, item:Hashable) -> Index
Make new Index inserting new item at location.
methodpandas.core.indexes.base.Index.intersection(other:Axes, sort:bool=False) -> Index
Form the intersection of two Index objects.
methodpandas.core.indexes.base.Index.is_(other:Index) -> bool
More flexible, faster check like ``is`` but that works through views.
methodpandas.core.indexes.base.Index.is_unique() -> bool
Return if the index has unique values.
methodpandas.core.indexes.base.Index.isna() -> npt.NDArray[np.bool_]
Detect missing values.
methodpandas.core.indexes.base.Index.map(mapper:Callable | dict | Series, na_action:Literal['ignore'] | None=None) -> Index
Map values using an input mapping or function.
methodpandas.core.indexes.base.Index.max(axis:AxisInt | None=None, skipna:bool=True, *args:Any, **kwargs:Any) -> object
Return the maximum value of the Index.
methodpandas.core.indexes.base.Index.memory_usage(deep:bool=False) -> int
Memory usage of the values.
methodpandas.core.indexes.base.Index.min(axis:AxisInt | None=None, skipna:bool=True, *args:Any, **kwargs:Any) -> object
Return the minimum value of the Index.
methodpandas.core.indexes.base.Index.name() -> Hashable
Return Index or MultiIndex name.
methodpandas.core.indexes.base.Index.nlevels() -> int
Number of levels.
methodpandas.core.indexes.base.Index.notna() -> npt.NDArray[np.bool_]
Detect existing (non-missing) values.
methodpandas.core.indexes.base.Index.putmask(mask:npt.NDArray[np.bool_], value:object) -> Index
Return a new Index of the values set with the mask.
methodpandas.core.indexes.base.Index.ravel(order:str_t='C') -> Self
Return a view on self.
methodpandas.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.
methodpandas.core.indexes.base.Index.repeat(repeats:int | Sequence[int], axis:None=None) -> Self
Repeat elements of an Index.
methodpandas.core.indexes.base.Index.replace(to_replace:Any=None, value:Any=lib.no_default, regex:bool=False) -> Index
Replace values in the Index.
methodpandas.core.indexes.base.Index.round(decimals:int=0) -> Self
Round each value in the Index to the given number of decimals.
methodpandas.core.indexes.base.Index.shape() -> Shape
Return a tuple of the shape of the underlying data.
methodpandas.core.indexes.base.Index.shift(periods:int=1, freq:Frequency | None=None) -> Self
Shift index by desired number of time frequency increments.
methodpandas.core.indexes.base.Index.slice_indexer(start:Hashable | None=None, end:Hashable | None=None, step:int | None=None) -> slice
Compute the slice indexer for input labels and step.
methodpandas.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.
methodpandas.core.indexes.base.Index.to_flat_index() -> Self
Identity method.
methodpandas.core.indexes.base.Index.to_frame(index:bool=True, name:Hashable=lib.no_default) -> DataFrame
Create a DataFrame with a column containing the Index.
methodpandas.core.indexes.base.Index.to_series(index:Axes | None=None, name:Hashable | None=None) -> Series
Create a Series with both index and values equal to the index keys.
methodpandas.core.indexes.base.Index.union(other:Axes, sort:bool | None=None) -> Index
Form the union of two Index objects.
methodpandas.core.indexes.base.Index.unique(level:Hashable | None=None) -> Self
Return unique values in the index.
methodpandas.core.indexes.base.Index.values() -> ArrayLike
Return an array representing the data in the Index.
methodpandas.core.indexes.base.Index.where(cond:np.ndarray, other:object=None) -> Index
Replace values where the condition is False.
funcpandas.core.indexes.base.ensure_index(index_like:Axes, copy:bool=False) -> Index
Ensure that we have an index from some index-like object.
funcpandas.core.indexes.base.ensure_index_from_sequences(sequences:Sequence[Axes], names:Sequence[Hashable] | None=None) -> Index
Construct an index from sequences of data.
funcpandas.core.indexes.base.maybe_sequence_to_range(sequence:Axes) -> Axes
Convert a 1D, non-pandas sequence to a range if possible.
funcpandas.core.indexes.base.trim_front(strings:list[str]) -> list[str]
Trims leading spaces evenly among all strings.
classpandas.core.indexes.category.CategoricalIndex
Index based on an underlying :class:`Categorical`.
classpandas.core.indexes.datetimes.DatetimeIndex
Immutable ndarray-like of datetime64 data.
methodpandas.core.indexes.datetimes.DatetimeIndex.normalize() -> Self
Convert times to midnight.
methodpandas.core.indexes.datetimes.DatetimeIndex.snap(freq:Frequency='S') -> DatetimeIndex
Snap time stamps to nearest occurring frequency.
methodpandas.core.indexes.datetimes.DatetimeIndex.strftime(date_format) -> Index
Convert to Index using specified date_format.
methodpandas.core.indexes.datetimes.DatetimeIndex.to_julian_date() -> Index
Convert Timestamp to a Julian Date.
classpandas.core.indexes.extension.ExtensionIndex
Index subclass for indexes backed by ExtensionArray.
funcpandas.core.indexes.interval.interval_range(start=None, end=None, periods=None, freq=None, name:Hashable | None=None, closed:IntervalClosedType='right') -> IntervalIndex
Return a fixed frequency IntervalIndex.
classpandas.core.indexes.multi.MultiIndex
A multi-level, or hierarchical, index object for pandas objects.
methodpandas.core.indexes.multi.MultiIndex.argsort(*na_position:NaPosition='last', *args, **kwargs) -> npt.NDArray[np.intp]
Return the integer indices that would sort the index.
methodpandas.core.indexes.multi.MultiIndex.codes() -> FrozenList
Codes of the MultiIndex.
methodpandas.core.indexes.multi.MultiIndex.copy(names=None, deep:bool=False, name=None) -> Self
Make a copy of this object.
methodpandas.core.indexes.multi.MultiIndex.dropna(how:AnyAll='any') -> MultiIndex
Return MultiIndex without NA/NaN values.
methodpandas.core.indexes.multi.MultiIndex.duplicated(keep:DropKeep='first') -> npt.NDArray[np.bool_]
Indicate duplicate index values.

この情報について

掲載しているシグネチャは pandas-dev/pandas の公開ソースコードを Python の ast モジュールで静的解析し、引数名・デフォルト値・ 型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。 詳しくは仕組みの解説をご覧ください。

収録ライブラリ一覧(全 805 件)へ戻る