Vous êtes un professionnel et vous avez besoin d'une formation ?
Sensibilisation àl'Intelligence Artificielle
Voir le programme détaillé
Module « pandas »
Classe « IntervalIndex »
Informations générales
Héritage
builtins.object
DirNamesMixin
PandasObject
builtins.object
OpsMixin
IndexOpsMixin
Index
ExtensionIndex
IntervalIndex
Définition
class IntervalIndex(ExtensionIndex):
help(IntervalIndex)
Immutable index of intervals that are closed on the same side.
Parameters
----------
data : array-like (1-dimensional)
Array-like (ndarray, :class:`DateTimeArray`, :class:`TimeDeltaArray`) containing
Interval objects from which to build the IntervalIndex.
closed : {'left', 'right', 'both', 'neither'}, default 'right'
Whether the intervals are closed on the left-side, right-side, both or
neither.
dtype : dtype or None, default None
If None, dtype will be inferred.
copy : bool, default False
Copy the input data.
name : object, optional
Name to be stored in the index.
verify_integrity : bool, default True
Verify that the IntervalIndex is valid.
Attributes
----------
left
right
closed
mid
length
is_empty
is_non_overlapping_monotonic
is_overlapping
values
Methods
-------
from_arrays
from_tuples
from_breaks
contains
overlaps
set_closed
to_tuples
See Also
--------
Index : The base pandas Index type.
Interval : A bounded slice-like interval; the elements of an IntervalIndex.
interval_range : Function to create a fixed frequency IntervalIndex.
cut : Bin values into discrete Intervals.
qcut : Bin values into equal-sized Intervals based on rank or sample quantiles.
Notes
-----
See the `user guide
<https://pandas.pydata.org/pandas-docs/stable/user_guide/advanced.html#intervalindex>`__
for more.
Examples
--------
A new ``IntervalIndex`` is typically constructed using
:func:`interval_range`:
>>> pd.interval_range(start=0, end=5)
IntervalIndex([(0, 1], (1, 2], (2, 3], (3, 4], (4, 5]],
dtype='interval[int64, right]')
It may also be constructed using one of the constructor
methods: :meth:`IntervalIndex.from_arrays`,
:meth:`IntervalIndex.from_breaks`, and :meth:`IntervalIndex.from_tuples`.
See further examples in the doc strings of ``interval_range`` and the
mentioned constructor methods.
Constructeur(s)
Liste des attributs statiques
array | <pandas._libs.properties.CachedProperty object at 0x0000020D9B489680> |
closed | <pandas._libs.properties.CachedProperty object at 0x0000020D9B4FA580> |
dtype | <pandas._libs.properties.CachedProperty object at 0x0000020D9B47BF80> |
hasnans | <pandas._libs.properties.CachedProperty object at 0x0000020D9B488B40> |
is_monotonic_decreasing | <pandas._libs.properties.CachedProperty object at 0x0000020D9B4FA240> |
is_non_overlapping_monotonic | <pandas._libs.properties.CachedProperty object at 0x0000020D9B4FA540> |
is_unique | <pandas._libs.properties.CachedProperty object at 0x0000020D9B4FA280> |
left | <pandas._libs.properties.CachedProperty object at 0x0000020D9B4FA3C0> |
mid | <pandas._libs.properties.CachedProperty object at 0x0000020D9B4FA440> |
right | <pandas._libs.properties.CachedProperty object at 0x0000020D9B4FA400> |
Attributs statiques hérités de la classe ExtensionIndex
inferred_type
Liste des propriétés
closed_left | |
closed_right | |
empty | |
has_duplicates | |
inferred_type | Return a string of the type inferred from the values [extrait de inferred_type.__doc__] |
is_empty | |
is_monotonic_increasing | |
is_overlapping | |
length | |
name | |
names | |
nbytes | |
ndim | |
nlevels | |
open_left | |
open_right | |
shape | |
size | |
T | |
values | |
Propriétés héritées de la classe ExtensionIndex
is_monotonic_decreasing
Propriétés héritées de la classe IndexOpsMixin
array, dtype, is_unique
Opérateurs hérités de la classe Index
__getitem__, __iadd__, __invert__, __neg__, __pos__, __setitem__
Opérateurs hérités de la classe OpsMixin
__add__, __and__, __eq__, __floordiv__, __ge__, __gt__, __le__, __lt__, __mod__, __mul__, __ne__, __or__, __pow__, __radd__, __rand__, __rfloordiv__, __rmod__, __rmul__, __ror__, __rpow__, __rsub__, __rtruediv__, __rxor__, __sub__, __truediv__, __xor__
Liste des méthodes
Toutes les méthodes
Méthodes d'instance
Méthodes statiques
Méthodes dépréciées
__reduce__(self) |
|
from_arrays(left, right, closed: 'IntervalClosedType' = 'right', name: 'Hashable | None' = None, copy: 'bool' = False, dtype: 'Dtype | None' = None) -> 'IntervalIndex' |
|
from_breaks(breaks, closed: 'IntervalClosedType | None' = 'right', name: 'Hashable | None' = None, copy: 'bool' = False, dtype: 'Dtype | None' = None) -> 'IntervalIndex' |
|
from_tuples(data, closed: 'IntervalClosedType' = 'right', name: 'Hashable | None' = None, copy: 'bool' = False, dtype: 'Dtype | None' = None) -> 'IntervalIndex' |
|
get_indexer_non_unique(self, target: 'Index') -> 'tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]]' |
|
get_loc(self, key) -> 'int | slice | np.ndarray' |
|
memory_usage(self, deep: 'bool' = False) -> 'int' |
|
Méthodes héritées de la classe ExtensionIndex
__init_subclass__, __subclasshook__
Méthodes héritées de la classe Index
__abs__, __array__, __array_ufunc__, __array_wrap__, __bool__, __copy__, __deepcopy__, __len__, __nonzero__, __repr__, all, any, append, argmax, argmin, argsort, asof, asof_locs, astype, copy, delete, diff, difference, drop, drop_duplicates, droplevel, dropna, duplicated, equals, fillna, format, get_indexer, get_indexer_for, get_level_values, get_slice_bound, groupby, holds_integer, identical, infer_objects, insert, intersection, is_, is_boolean, is_categorical, is_floating, is_integer, is_interval, is_numeric, is_object, isin, isna, isnull, join, map, max, min, notna, notnull, putmask, ravel, reindex, rename, repeat, round, set_names, shift, slice_indexer, slice_locs, sort, sort_values, sortlevel, symmetric_difference, take, to_flat_index, to_frame, to_series, union, unique, view, where
Méthodes héritées de la classe PandasObject
__sizeof__
Méthodes héritées de la classe DirNamesMixin
__dir__
Méthodes héritées de la classe IndexOpsMixin
__iter__, factorize, item, 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__,
__getstate__,
__hash__,
__reduce_ex__,
__setattr__,
__str__
Vous êtes un professionnel et vous avez besoin d'une formation ?
Mise en oeuvre d'IHM
avec Qt et PySide6
Voir le programme détaillé
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 :