From b3bb7f57a10778e96b860c7356d36e8b0fdc0adc Mon Sep 17 00:00:00 2001 From: verakai Date: Sat, 10 Mar 2018 11:58:39 -0300 Subject: [PATCH 1/2] update pandas.IntervalIndex docstring --- pandas/core/indexes/interval.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pandas/core/indexes/interval.py b/pandas/core/indexes/interval.py index ccf2e5e3c4486..1b7b7af7dccf0 100644 --- a/pandas/core/indexes/interval.py +++ b/pandas/core/indexes/interval.py @@ -142,20 +142,20 @@ class IntervalIndex(IntervalMixin, Index): Parameters ---------- - data : array-like (1-dimensional) + data : array-Like (1-dimensional) Array-like containing Interval objects from which to build the - IntervalIndex + IntervalIndex. closed : {'left', 'right', 'both', 'neither'}, default 'right' Whether the intervals are closed on the left-side, right-side, both or neither. name : object, optional Name to be stored in the index. copy : boolean, default False - Copy the meta-data + Copy the meta-data. dtype : dtype or None, default None - If None, dtype will be inferred + If None, dtype will be inferred. - ..versionadded:: 0.23.0 + ..versionadded:: 0.23.0. Attributes ---------- @@ -198,11 +198,11 @@ class IntervalIndex(IntervalMixin, Index): 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, qcut : Convert arrays of continuous data into Categoricals/Series of - Intervals + Index : The base pandas Index type. + Interval : A bounded slice-like interval; the elements of an IntervalIndex. + qcut : Quantile-based discretization function. + cut : Return indices of half-open bins to which each value of x belongs. + interval_range : Function to create a fixed frequency IntervalIndex. """ _typ = 'intervalindex' _comparables = ['name'] From 7c8dcee08cb4eadb73f6842700de4242be2c0b64 Mon Sep 17 00:00:00 2001 From: verakai Date: Sat, 10 Mar 2018 12:46:19 -0300 Subject: [PATCH 2/2] updating IntervalIndex parameters --- pandas/core/indexes/interval.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pandas/core/indexes/interval.py b/pandas/core/indexes/interval.py index 1b7b7af7dccf0..6ee9376c118b4 100644 --- a/pandas/core/indexes/interval.py +++ b/pandas/core/indexes/interval.py @@ -148,13 +148,17 @@ class IntervalIndex(IntervalMixin, Index): closed : {'left', 'right', 'both', 'neither'}, default 'right' Whether the intervals are closed on the left-side, right-side, both or neither. - name : object, optional - Name to be stored in the index. - copy : boolean, default False - Copy the meta-data. dtype : dtype or None, default None If None, dtype will be inferred. - + copy : boolean, default False + Copy the meta-data. + name : object, optional + Name to be stored in the index. + fastpath : boolean, default False + Create IntervalIndex without verifying integrity. + verify_integrity : boolean, default True + Verify that the IntervalIndex is valid. + ..versionadded:: 0.23.0. Attributes