Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Module « pandas »

Classe « Index »

Informations générales

Héritage

builtins.object
    DirNamesMixin
        PandasObject
builtins.object
    OpsMixin
        IndexOpsMixin
            Index

Définition

class Index(IndexOpsMixin, PandasObject):

Description [extrait de Index.__doc__]

    Immutable sequence used for indexing and alignment. The basic object
    storing axis labels for all pandas objects.

    Parameters
    ----------
    data : array-like (1-dimensional)
    dtype : NumPy dtype (default: object)
        If dtype is None, we find the dtype that best fits the data.
        If an actual dtype is provided, we coerce to that dtype if it's safe.
        Otherwise, an error will be raised.
    copy : bool
        Make a copy of input ndarray.
    name : object
        Name to be stored in the index.
    tupleize_cols : bool (default: True)
        When True, attempt to create a MultiIndex if possible.

    See Also
    --------
    RangeIndex : Index implementing a monotonic integer range.
    CategoricalIndex : Index of :class:`Categorical` s.
    MultiIndex : A multi-level, or hierarchical Index.
    IntervalIndex : An Index of :class:`Interval` s.
    DatetimeIndex : Index of datetime64 data.
    TimedeltaIndex : Index of timedelta64 data.
    PeriodIndex : Index of Period data.
    Int64Index : A special case of :class:`Index` with purely integer labels.
    UInt64Index : A special case of :class:`Index` with purely unsigned integer labels.
    Float64Index : A special case of :class:`Index` with purely float labels.

    Notes
    -----
    An Index instance can **only** contain hashable objects

    Examples
    --------
    >>> pd.Index([1, 2, 3])
    Int64Index([1, 2, 3], dtype='int64')

    >>> pd.Index(list('abc'))
    Index(['a', 'b', 'c'], dtype='object')
    

Constructeur(s)

Signature du constructeur Description
__new__(cls, data=None, dtype=None, copy=False, name=None, tupleize_cols=True, **kwargs) -> 'Index'

Liste des attributs statiques

Nom de l'attribut Valeur
array<pandas._libs.properties.CachedProperty object at 0x7f504b9fe2c0>
dtype<pandas._libs.properties.CachedProperty object at 0x7f504bd2af00>
hasnans<pandas._libs.properties.CachedProperty object at 0x7f504bd34d40>
inferred_type<pandas._libs.properties.CachedProperty object at 0x7f504bd34b80>
is_all_dates<pandas._libs.properties.CachedProperty object at 0x7f504bd34c40>
is_unique<pandas._libs.properties.CachedProperty object at 0x7f504bd34880>

Liste des propriétés

Nom de la propriétéDescription
asi8
empty
has_duplicates
is_monotonic
is_monotonic_decreasing
is_monotonic_increasing
name
names
nbytes
ndim
nlevels
shape
size
T
values

Propriétés héritées de la classe IndexOpsMixin

array, dtype, is_unique

Liste des opérateurs

Signature de l'opérateur Description
__and__(self, other)
__contains__(self, key: Any) -> bool
__getitem__(self, key)
__iadd__(self, other)
__inv__(self)
__neg__(self)
__or__(self, other)
__pos__(self)
__setitem__(self, key, value)
__xor__(self, other)

Opérateurs hérités de la classe OpsMixin

__add__, __eq__, __floordiv__, __ge__, __gt__, __le__, __lt__, __mod__, __mul__, __ne__, __pow__, __radd__, __rand__, __rfloordiv__, __rmod__, __rmul__, __ror__, __rpow__, __rsub__, __rtruediv__, __rxor__, __sub__, __truediv__

Liste des méthodes

Toutes les méthodes Méthodes d'instance Méthodes statiques Méthodes dépréciées
Signature de la méthodeDescription
__abs__(self)
__array__(self, dtype=None) -> numpy.ndarray
__array_wrap__(self, result, context=None)
__bool__(self)
__copy__(self, **kwargs)
__deepcopy__(self, memo=None)
__hash__(self)
__len__(self) -> int
__nonzero__(self)
__reduce__(self)
__repr__(self) -> str
all(self)
any(self, *args, **kwargs)
append(self, other)
argsort(self, *args, **kwargs) -> numpy.ndarray
asof(self, label)
asof_locs(self, where: 'Index', mask) -> numpy.ndarray
astype(self, dtype, copy=True)
copy(self: ~_IndexT, name: Optional[Hashable] = None, deep: bool = False, dtype: Union[ForwardRef('ExtensionDtype'), str, numpy.dtype, Type[Union[str, float, int, complex, bool, object]], NoneType] = None, names: Optional[Sequence[Optional[Hashable]]] = None) -> ~_IndexT
delete(self, loc)
difference(self, other, sort=None)
drop(self, labels, errors: str = 'raise')
drop_duplicates(self, keep='first')
droplevel(self, level=0)
dropna(self, how='any')
duplicated(self, keep='first')
equals(self, other: object) -> bool
fillna(self, value=None, downcast=None)
format(self, name: bool = False, formatter: Optional[Callable] = None, na_rep: str = 'NaN') -> List[str]
get_indexer(self, target, method=None, limit=None, tolerance=None) -> numpy.ndarray
get_indexer_for(self, target, **kwargs)
get_indexer_non_unique(self, target)
get_level_values(self, level)
get_loc(self, key, method=None, tolerance=None)
get_slice_bound(self, label, side: str, kind) -> int
get_value(self, series: 'Series', key)
groupby(self, values) -> pandas.io.formats.printing.PrettyDict
holds_integer(self) -> bool
identical(self, other) -> bool
insert(self, loc: int, item)
intersection(self, other, sort=False)
is_(self, other) -> bool
is_boolean(self) -> bool
is_categorical(self) -> bool
is_floating(self) -> bool
is_integer(self) -> bool
is_interval(self) -> bool
is_mixed(self) -> bool
is_numeric(self) -> bool
is_object(self) -> bool
is_type_compatible(self, kind: str) -> bool
isin(self, values, level=None)
isna(self)
isnull(self)
join(self, other, how='left', level=None, return_indexers=False, sort=False)
map(self, mapper, na_action=None)
memory_usage(self, deep: bool = False) -> int
notna(self)
notnull(self)
putmask(self, mask, value)
ravel(self, order='C')
reindex(self, target, method=None, level=None, limit=None, tolerance=None)
rename(self, name, inplace=False)
repeat(self, repeats, axis=None)
set_names(self, names, level=None, inplace: bool = False)
set_value(self, arr, key, value)
shift(self, periods=1, freq=None)
slice_indexer(self, start: Optional[Hashable] = None, end: Optional[Hashable] = None, step: Optional[int] = None, kind: Optional[str] = None) -> slice
slice_locs(self, start=None, end=None, step=None, kind=None)
sort(self, *args, **kwargs)
sort_values(self, return_indexer: bool = False, ascending: bool = True, na_position: str = 'last', key: Optional[Callable] = None)
sortlevel(self, level=None, ascending=True, sort_remaining=None)
symmetric_difference(self, other, result_name=None, sort=None)
take(self, indices, axis=0, allow_fill=True, fill_value=None, **kwargs)
to_flat_index(self)
to_frame(self, index: bool = True, name=None)
to_native_types(self, slicer=None, **kwargs)
to_series(self, index=None, name=None)
union(self, other, sort=None)
unique(self, level=None)
view(self, cls=None)
where(self, cond, other=None)

Méthodes héritées de la classe PandasObject

__init_subclass__, __sizeof__, __subclasshook__

Méthodes héritées de la classe DirNamesMixin

__dir__

Méthodes héritées de la classe IndexOpsMixin

__iter__, argmax, argmin, factorize, item, max, min, nunique, searchsorted, to_list, to_numpy, tolist, transpose, value_counts

Méthodes héritées de la classe OpsMixin

__divmod__, __rdivmod__

Méthodes héritées de la classe object

__delattr__, __format__, __getattribute__, __reduce_ex__, __setattr__, __str__