neulab/docprompting-conala huggingface dataset:
pandas.Index.is_integer   finalIndex.is_integer()[source]
 
Check if the Index only consists of integers.  Returns 
 bool

Whether or not the Index only consists of integers.      See also  is_boolean

Check if the Index only consists of booleans.  is_floating

Check if the Index is a floating type.  is_numeric

Check if the Index only consists of numeric data.  is_object

Check if the Index is of the object dtype.  is_categorical

Check if the Index holds categorical data.  is_interval

Check if the Index holds Interval objects.  is_mixed

Check if the Index holds data with mixed data types.    Examples 
>>> idx = pd.Index([1, 2, 3, 4])
>>> idx.is_integer()
True
  
>>> idx = pd.Index([1.0, 2.0, 3.0, 4.0])
>>> idx.is_integer()
False
  
>>> idx = pd.Index(["Apple", "Mango", "Watermelon"])
>>> idx.is_integer()
False
pandas.Index.is_interval   finalIndex.is_interval()[source]
 
Check if the Index holds Interval objects.  Returns 
 bool

Whether or not the Index holds Interval objects.      See also  IntervalIndex

Index for Interval objects.  is_boolean

Check if the Index only consists of booleans.  is_integer

Check if the Index only consists of integers.  is_floating

Check if the Index is a floating type.  is_numeric

Check if the Index only consists of numeric data.  is_object

Check if the Index is of the object dtype.  is_categorical

Check if the Index holds categorical data.  is_mixed

Check if the Index holds data with mixed data types.    Examples 
>>> idx = pd.Index([pd.Interval(left=0, right=5),
...                 pd.Interval(left=5, right=10)])
>>> idx.is_interval()
True
  
>>> idx = pd.Index([1, 3, 5, 7])
>>> idx.is_interval()
False
pandas.Index.is_mixed   finalIndex.is_mixed()[source]
 
Check if the Index holds data with mixed data types.  Returns 
 bool

Whether or not the Index holds data with mixed data types.      See also  is_boolean

Check if the Index only consists of booleans.  is_integer

Check if the Index only consists of integers.  is_floating

Check if the Index is a floating type.  is_numeric

Check if the Index only consists of numeric data.  is_object

Check if the Index is of the object dtype.  is_categorical

Check if the Index holds categorical data.  is_interval

Check if the Index holds Interval objects.    Examples 
>>> idx = pd.Index(['a', np.nan, 'b'])
>>> idx.is_mixed()
True
  
>>> idx = pd.Index([1.0, 2.0, 3.0, 5.0])
>>> idx.is_mixed()
False
pandas.Index.is_monotonic   propertyIndex.is_monotonic
 
Alias for is_monotonic_increasing.
pandas.Index.is_monotonic_decreasing   propertyIndex.is_monotonic_decreasing
 
Return if the index is monotonic decreasing (only equal or decreasing) values. Examples 
>>> Index([3, 2, 1]).is_monotonic_decreasing
True
>>> Index([3, 2, 2]).is_monotonic_decreasing
True
>>> Index([3, 1, 2]).is_monotonic_decreasing
False
pandas.Index.is_monotonic_increasing   propertyIndex.is_monotonic_increasing
 
Return if the index is monotonic increasing (only equal or increasing) values. Examples 
>>> Index([1, 2, 3]).is_monotonic_increasing
True
>>> Index([1, 2, 2]).is_monotonic_increasing
True
>>> Index([1, 3, 2]).is_monotonic_increasing
False
pandas.Index.is_numeric   finalIndex.is_numeric()[source]
 
Check if the Index only consists of numeric data.  Returns 
 bool

Whether or not the Index only consists of numeric data.      See also  is_boolean

Check if the Index only consists of booleans.  is_integer

Check if the Index only consists of integers.  is_floating

Check if the Index is a floating type.  is_object

Check if the Index is of the object dtype.  is_categorical

Check if the Index holds categorical data.  is_interval

Check if the Index holds Interval objects.  is_mixed

Check if the Index holds data with mixed data types.    Examples 
>>> idx = pd.Index([1.0, 2.0, 3.0, 4.0])
>>> idx.is_numeric()
True
  
>>> idx = pd.Index([1, 2, 3, 4.0])
>>> idx.is_numeric()
True
  
>>> idx = pd.Index([1, 2, 3, 4])
>>> idx.is_numeric()
True
  
>>> idx = pd.Index([1, 2, 3, 4.0, np.nan])
>>> idx.is_numeric()
True
  
>>> idx = pd.Index([1, 2, 3, 4.0, np.nan, "Apple"])
>>> idx.is_numeric()
False
pandas.Index.is_object   finalIndex.is_object()[source]
 
Check if the Index is of the object dtype.  Returns 
 bool

Whether or not the Index is of the object dtype.      See also  is_boolean

Check if the Index only consists of booleans.  is_integer

Check if the Index only consists of integers.  is_floating

Check if the Index is a floating type.  is_numeric

Check if the Index only consists of numeric data.  is_categorical

Check if the Index holds categorical data.  is_interval

Check if the Index holds Interval objects.  is_mixed

Check if the Index holds data with mixed data types.    Examples 
>>> idx = pd.Index(["Apple", "Mango", "Watermelon"])
>>> idx.is_object()
True
  
>>> idx = pd.Index(["Apple", "Mango", 2.0])
>>> idx.is_object()
True
  
>>> idx = pd.Index(["Watermelon", "Orange", "Apple",
...                 "Watermelon"]).astype("category")
>>> idx.is_object()
False
  
>>> idx = pd.Index([1.0, 2.0, 3.0, 4.0])
>>> idx.is_object()
False
pandas.Index.is_type_compatible   Index.is_type_compatible(kind)[source]
 
Whether the index type is compatible with the provided type.
pandas.Index.is_unique   Index.is_unique
 
Return if the index has unique values.
pandas.Index.isin   Index.isin(values, level=None)[source]
 
Return a boolean array where the index values are in values. Compute boolean array of whether each index value is found in the passed set of values. The length of the returned boolean array matches the length of the index.  Parameters 
 
values:set or list-like


Sought values.  
level:str or int, optional


Name or position of the index level to use (if the index is a MultiIndex).    Returns 
 np.ndarray[bool]

NumPy array of boolean values.      See also  Series.isin

Same for Series.  DataFrame.isin

Same method for DataFrames.    Notes In the case of MultiIndex you must either specify values as a list-like object containing tuples that are the same length as the number of levels, or specify level. Otherwise it will raise a ValueError. If level is specified:  if it is the name of one and only one index level, use that level; otherwise it should be a number indicating level position.  Examples 
>>> idx = pd.Index([1,2,3])
>>> idx
Int64Index([1, 2, 3], dtype='int64')
  Check whether each index value in a list of values. 
>>> idx.isin([1, 4])
array([ True, False, False])
  
>>> midx = pd.MultiIndex.from_arrays([[1,2,3],
...                                  ['red', 'blue', 'green']],
...                                  names=('number', 'color'))
>>> midx
MultiIndex([(1,   'red'),
            (2,  'blue'),
            (3, 'green')],
           names=['number', 'color'])
  Check whether the strings in the ‘color’ level of the MultiIndex are in a list of colors. 
>>> midx.isin(['red', 'orange', 'yellow'], level='color')
array([ True, False, False])
  To check across the levels of a MultiIndex, pass a list of tuples: 
>>> midx.isin([(1, 'red'), (3, 'red')])
array([ True, False, False])
  For a DatetimeIndex, string values in values are converted to Timestamps. 
>>> dates = ['2000-03-11', '2000-03-12', '2000-03-13']
>>> dti = pd.to_datetime(dates)
>>> dti
DatetimeIndex(['2000-03-11', '2000-03-12', '2000-03-13'],
dtype='datetime64[ns]', freq=None)
  
>>> dti.isin(['2000-03-11'])
array([ True, False, False])
pandas.Index.isna   finalIndex.isna()[source]
 
Detect missing values. Return a boolean same-sized object indicating if the values are NA. NA values, such as None, numpy.NaN or pd.NaT, get mapped to True values. Everything else get mapped to False values. Characters such as empty strings ‘’ or numpy.inf are not considered NA values (unless you set pandas.options.mode.use_inf_as_na = True).  Returns 
 numpy.ndarray[bool]

A boolean array of whether my values are NA.      See also  Index.notna

Boolean inverse of isna.  Index.dropna

Omit entries with missing values.  isna

Top-level isna.  Series.isna

Detect missing values in Series object.    Examples Show which entries in a pandas.Index are NA. The result is an array. 
>>> idx = pd.Index([5.2, 6.0, np.NaN])
>>> idx
Float64Index([5.2, 6.0, nan], dtype='float64')
>>> idx.isna()
array([False, False,  True])
  Empty strings are not considered NA values. None is considered an NA value. 
>>> idx = pd.Index(['black', '', 'red', None])
>>> idx
Index(['black', '', 'red', None], dtype='object')
>>> idx.isna()
array([False, False, False,  True])
  For datetimes, NaT (Not a Time) is considered as an NA value. 
>>> idx = pd.DatetimeIndex([pd.Timestamp('1940-04-25'),
...                         pd.Timestamp(''), None, pd.NaT])
>>> idx
DatetimeIndex(['1940-04-25', 'NaT', 'NaT', 'NaT'],
              dtype='datetime64[ns]', freq=None)
>>> idx.isna()
array([False,  True,  True,  True])
pandas.Index.isnull   Index.isnull()[source]
 
Detect missing values. Return a boolean same-sized object indicating if the values are NA. NA values, such as None, numpy.NaN or pd.NaT, get mapped to True values. Everything else get mapped to False values. Characters such as empty strings ‘’ or numpy.inf are not considered NA values (unless you set pandas.options.mode.use_inf_as_na = True).  Returns 
 numpy.ndarray[bool]

A boolean array of whether my values are NA.      See also  Index.notna

Boolean inverse of isna.  Index.dropna

Omit entries with missing values.  isna

Top-level isna.  Series.isna

Detect missing values in Series object.    Examples Show which entries in a pandas.Index are NA. The result is an array. 
>>> idx = pd.Index([5.2, 6.0, np.NaN])
>>> idx
Float64Index([5.2, 6.0, nan], dtype='float64')
>>> idx.isna()
array([False, False,  True])
  Empty strings are not considered NA values. None is considered an NA value. 
>>> idx = pd.Index(['black', '', 'red', None])
>>> idx
Index(['black', '', 'red', None], dtype='object')
>>> idx.isna()
array([False, False, False,  True])
  For datetimes, NaT (Not a Time) is considered as an NA value. 
>>> idx = pd.DatetimeIndex([pd.Timestamp('1940-04-25'),
...                         pd.Timestamp(''), None, pd.NaT])
>>> idx
DatetimeIndex(['1940-04-25', 'NaT', 'NaT', 'NaT'],
              dtype='datetime64[ns]', freq=None)
>>> idx.isna()
array([False,  True,  True,  True])
pandas.Index.item   Index.item()[source]
 
Return the first element of the underlying data as a Python scalar.  Returns 
 scalar

The first element of %(klass)s.    Raises 
 ValueError

If the data is not length-1.
pandas.Index.join   finalIndex.join(other, how='left', level=None, return_indexers=False, sort=False)[source]
 
Compute join_index and indexers to conform data structures to the new index.  Parameters 
 
other:Index


how:{‘left’, ‘right’, ‘inner’, ‘outer’}


level:int or level name, default None


return_indexers:bool, default False


sort:bool, default False


Sort the join keys lexicographically in the result Index. If False, the order of the join keys depends on the join type (how keyword).    Returns 
 join_index, (left_indexer, right_indexer)
pandas.Index.map   Index.map(mapper, na_action=None)[source]
 
Map values using an input mapping or function.  Parameters 
 
mapper:function, dict, or Series


Mapping correspondence.  
na_action:{None, ‘ignore’}


If ‘ignore’, propagate NA values, without passing them to the mapping correspondence.    Returns 
 
applied:Union[Index, MultiIndex], inferred


The output of the mapping function applied to the index. If the function returns a tuple with more than one element a MultiIndex will be returned.
pandas.Index.max   Index.max(axis=None, skipna=True, *args, **kwargs)[source]
 
Return the maximum value of the Index.  Parameters 
 
axis:int, optional


For compatibility with NumPy. Only 0 or None are allowed.  
skipna:bool, default True


Exclude NA/null values when showing the result.  *args, **kwargs

Additional arguments and keywords for compatibility with NumPy.    Returns 
 scalar

Maximum value.      See also  Index.min

Return the minimum value in an Index.  Series.max

Return the maximum value in a Series.  DataFrame.max

Return the maximum values in a DataFrame.    Examples 
>>> idx = pd.Index([3, 2, 1])
>>> idx.max()
3
  
>>> idx = pd.Index(['c', 'b', 'a'])
>>> idx.max()
'c'
  For a MultiIndex, the maximum is determined lexicographically. 
>>> idx = pd.MultiIndex.from_product([('a', 'b'), (2, 1)])
>>> idx.max()
('b', 2)
pandas.Index.memory_usage   Index.memory_usage(deep=False)[source]
 
Memory usage of the values.  Parameters 
 
deep:bool, default False


Introspect the data deeply, interrogate object dtypes for system-level memory consumption.    Returns 
 bytes used
    See also  numpy.ndarray.nbytes

Total bytes consumed by the elements of the array.    Notes Memory usage does not include memory consumed by elements that are not components of the array if deep=False or if used on PyPy
pandas.Index.min   Index.min(axis=None, skipna=True, *args, **kwargs)[source]
 
Return the minimum value of the Index.  Parameters 
 
axis:{None}


Dummy argument for consistency with Series.  
skipna:bool, default True


Exclude NA/null values when showing the result.  *args, **kwargs

Additional arguments and keywords for compatibility with NumPy.    Returns 
 scalar

Minimum value.      See also  Index.max

Return the maximum value of the object.  Series.min

Return the minimum value in a Series.  DataFrame.min

Return the minimum values in a DataFrame.    Examples 
>>> idx = pd.Index([3, 2, 1])
>>> idx.min()
1
  
>>> idx = pd.Index(['c', 'b', 'a'])
>>> idx.min()
'a'
  For a MultiIndex, the minimum is determined lexicographically. 
>>> idx = pd.MultiIndex.from_product([('a', 'b'), (2, 1)])
>>> idx.min()
('a', 1)
pandas.Index.name   propertyIndex.name
 
Return Index or MultiIndex name.
pandas.Index.nbytes   propertyIndex.nbytes
 
Return the number of bytes in the underlying data.
pandas.Index.ndim   propertyIndex.ndim
 
Number of dimensions of the underlying data, by definition 1.
pandas.Index.nlevels   propertyIndex.nlevels
 
Number of levels.
pandas.Index.notna   finalIndex.notna()[source]
 
Detect existing (non-missing) values. Return a boolean same-sized object indicating if the values are not NA. Non-missing values get mapped to True. Characters such as empty strings '' or numpy.inf are not considered NA values (unless you set pandas.options.mode.use_inf_as_na = True). NA values, such as None or numpy.NaN, get mapped to False values.  Returns 
 numpy.ndarray[bool]

Boolean array to indicate which entries are not NA.      See also  Index.notnull

Alias of notna.  Index.isna

Inverse of notna.  notna

Top-level notna.    Examples Show which entries in an Index are not NA. The result is an array. 
>>> idx = pd.Index([5.2, 6.0, np.NaN])
>>> idx
Float64Index([5.2, 6.0, nan], dtype='float64')
>>> idx.notna()
array([ True,  True, False])
  Empty strings are not considered NA values. None is considered a NA value. 
>>> idx = pd.Index(['black', '', 'red', None])
>>> idx
Index(['black', '', 'red', None], dtype='object')
>>> idx.notna()
array([ True,  True,  True, False])
pandas.Index.notnull   Index.notnull()[source]
 
Detect existing (non-missing) values. Return a boolean same-sized object indicating if the values are not NA. Non-missing values get mapped to True. Characters such as empty strings '' or numpy.inf are not considered NA values (unless you set pandas.options.mode.use_inf_as_na = True). NA values, such as None or numpy.NaN, get mapped to False values.  Returns 
 numpy.ndarray[bool]

Boolean array to indicate which entries are not NA.      See also  Index.notnull

Alias of notna.  Index.isna

Inverse of notna.  notna

Top-level notna.    Examples Show which entries in an Index are not NA. The result is an array. 
>>> idx = pd.Index([5.2, 6.0, np.NaN])
>>> idx
Float64Index([5.2, 6.0, nan], dtype='float64')
>>> idx.notna()
array([ True,  True, False])
  Empty strings are not considered NA values. None is considered a NA value. 
>>> idx = pd.Index(['black', '', 'red', None])
>>> idx
Index(['black', '', 'red', None], dtype='object')
>>> idx.notna()
array([ True,  True,  True, False])
pandas.Index.nunique   Index.nunique(dropna=True)[source]
 
Return number of unique elements in the object. Excludes NA values by default.  Parameters 
 
dropna:bool, default True


Don’t include NaN in the count.    Returns 
 int
    See also  DataFrame.nunique

Method nunique for DataFrame.  Series.count

Count non-NA/null observations in the Series.    Examples 
>>> s = pd.Series([1, 3, 5, 7, 7])
>>> s
0    1
1    3
2    5
3    7
4    7
dtype: int64
  
>>> s.nunique()
4
pandas.Index.putmask   finalIndex.putmask(mask, value)[source]
 
Return a new Index of the values set with the mask.  Returns 
 Index
    See also  numpy.ndarray.putmask

Changes elements of an array based on conditional and input values.
pandas.Index.ravel   finalIndex.ravel(order='C')[source]
 
Return an ndarray of the flattened values of the underlying data.  Returns 
 numpy.ndarray

Flattened array.      See also  numpy.ndarray.ravel

Return a flattened array.
pandas.Index.reindex   Index.reindex(target, method=None, level=None, limit=None, tolerance=None)[source]
 
Create index with target’s values.  Parameters 
 
target:an iterable


method:{None, ‘pad’/’ffill’, ‘backfill’/’bfill’, ‘nearest’}, optional


 default: exact matches only. pad / ffill: find the PREVIOUS index value if no exact match. backfill / bfill: use NEXT index value if no exact match nearest: use the NEAREST index value if no exact match. Tied distances are broken by preferring the larger index value.   
level:int, optional


Level of multiindex.  
limit:int, optional


Maximum number of consecutive labels in target to match for inexact matches.  
tolerance:int or float, optional


Maximum distance between original and new labels for inexact matches. The values of the index at the matching locations must satisfy the equation abs(index[indexer] - target) <= tolerance. Tolerance may be a scalar value, which applies the same tolerance to all values, or list-like, which applies variable tolerance per element. List-like includes list, tuple, array, Series, and must be the same size as the index and its dtype must exactly match the index’s type.    Returns 
 
new_index:pd.Index


Resulting index.  
indexer:np.ndarray[np.intp] or None


Indices of output values in original index.    Raises 
 TypeError

If method passed along with level.  ValueError

If non-unique multi-index  ValueError

If non-unique index and method or limit passed.      See also  Series.reindex
DataFrame.reindex
  Examples 
>>> idx = pd.Index(['car', 'bike', 'train', 'tractor'])
>>> idx
Index(['car', 'bike', 'train', 'tractor'], dtype='object')
>>> idx.reindex(['car', 'bike'])
(Index(['car', 'bike'], dtype='object'), array([0, 1]))
pandas.Index.rename   Index.rename(name, inplace=False)[source]
 
Alter Index or MultiIndex name. Able to set new names without level. Defaults to returning new index. Length of names must match number of levels in MultiIndex.  Parameters 
 
name:label or list of labels


Name(s) to set.  
inplace:bool, default False


Modifies the object directly, instead of creating a new Index or MultiIndex.    Returns 
 Index or None

The same type as the caller or None if inplace=True.      See also  Index.set_names

Able to set new names partially and by level.    Examples 
>>> idx = pd.Index(['A', 'C', 'A', 'B'], name='score')
>>> idx.rename('grade')
Index(['A', 'C', 'A', 'B'], dtype='object', name='grade')
  
>>> idx = pd.MultiIndex.from_product([['python', 'cobra'],
...                                   [2018, 2019]],
...                                   names=['kind', 'year'])
>>> idx
MultiIndex([('python', 2018),
            ('python', 2019),
            ( 'cobra', 2018),
            ( 'cobra', 2019)],
           names=['kind', 'year'])
>>> idx.rename(['species', 'year'])
MultiIndex([('python', 2018),
            ('python', 2019),
            ( 'cobra', 2018),
            ( 'cobra', 2019)],
           names=['species', 'year'])
>>> idx.rename('species')
Traceback (most recent call last):
TypeError: Must pass list-like as `names`.
pandas.Index.repeat   Index.repeat(repeats, axis=None)[source]
 
Repeat elements of a Index. Returns a new Index where each element of the current Index is repeated consecutively a given number of times.  Parameters 
 
repeats:int or array of ints


The number of repetitions for each element. This should be a non-negative integer. Repeating 0 times will return an empty Index.  
axis:None


Must be None. Has no effect but is accepted for compatibility with numpy.    Returns 
 
repeated_index:Index


Newly created Index with repeated elements.      See also  Series.repeat

Equivalent function for Series.  numpy.repeat

Similar method for numpy.ndarray.    Examples 
>>> idx = pd.Index(['a', 'b', 'c'])
>>> idx
Index(['a', 'b', 'c'], dtype='object')
>>> idx.repeat(2)
Index(['a', 'a', 'b', 'b', 'c', 'c'], dtype='object')
>>> idx.repeat([1, 2, 3])
Index(['a', 'b', 'b', 'c', 'c', 'c'], dtype='object')
pandas.Index.searchsorted   Index.searchsorted(value, side='left', sorter=None)[source]
 
Find indices where elements should be inserted to maintain order. Find the indices into a sorted Index self such that, if the corresponding elements in value were inserted before the indices, the order of self would be preserved.  Note The Index must be monotonically sorted, otherwise wrong locations will likely be returned. Pandas does not check this for you.   Parameters 
 
value:array-like or scalar


Values to insert into self.  
side:{‘left’, ‘right’}, optional


If ‘left’, the index of the first suitable location found is given. If ‘right’, return the last such index. If there is no suitable index, return either 0 or N (where N is the length of self).  
sorter:1-D array-like, optional


Optional array of integer indices that sort self into ascending order. They are typically the result of np.argsort.    Returns 
 int or array of int

A scalar or array of insertion points with the same shape as value.      See also  sort_values

Sort by the values along either axis.  numpy.searchsorted

Similar method from NumPy.    Notes Binary search is used to find the required insertion points. Examples 
>>> ser = pd.Series([1, 2, 3])
>>> ser
0    1
1    2
2    3
dtype: int64
  
>>> ser.searchsorted(4)
3
  
>>> ser.searchsorted([0, 4])
array([0, 3])
  
>>> ser.searchsorted([1, 3], side='left')
array([0, 2])
  
>>> ser.searchsorted([1, 3], side='right')
array([1, 3])
  
>>> ser = pd.Series(pd.to_datetime(['3/11/2000', '3/12/2000', '3/13/2000']))
>>> ser
0   2000-03-11
1   2000-03-12
2   2000-03-13
dtype: datetime64[ns]
  
>>> ser.searchsorted('3/14/2000')
3
  
>>> ser = pd.Categorical(
...     ['apple', 'bread', 'bread', 'cheese', 'milk'], ordered=True
... )
>>> ser
['apple', 'bread', 'bread', 'cheese', 'milk']
Categories (4, object): ['apple' < 'bread' < 'cheese' < 'milk']
  
>>> ser.searchsorted('bread')
1
  
>>> ser.searchsorted(['bread'], side='right')
array([3])
  If the values are not monotonically sorted, wrong locations may be returned: 
>>> ser = pd.Series([2, 1, 3])
>>> ser
0    2
1    1
2    3
dtype: int64
  
>>> ser.searchsorted(1)  
0  # wrong result, correct would be 1