neulab/docprompting-conala huggingface dataset:
pandas.Int64Index   classpandas.Int64Index(data=None, dtype=None, copy=False, name=None)[source]
 
Immutable sequence used for indexing and alignment. The basic object storing axis labels for all pandas objects. Int64Index is a special case of Index with purely integer labels. .  Deprecated since version 1.4.0: In pandas v2.0 Int64Index will be removed and NumericIndex used instead. Int64Index will remain fully functional for the duration of pandas 1.x.   Parameters 
 
data:array-like (1-dimensional)


dtype:NumPy dtype (default: int64)


copy:bool


Make a copy of input ndarray.  
name:object


Name to be stored in the index.      See also  Index

The base pandas Index type.  NumericIndex

Index of numpy int/uint/float data.    Notes An Index instance can only contain hashable objects. Attributes       
None     Methods       
None
pandas.Int8Dtype   classpandas.Int8Dtype[source]
 
An ExtensionDtype for int8 integer data.  Changed in version 1.0.0: Now uses pandas.NA as its missing value, rather than numpy.nan.  Attributes       
None     Methods       
None
pandas.Interval   classpandas.Interval
 
Immutable object implementing an Interval, a bounded slice-like interval.  Parameters 
 
left:orderable scalar


Left bound for the interval.  
right:orderable scalar


Right bound for the interval.  
closed:{‘right’, ‘left’, ‘both’, ‘neither’}, default ‘right’


Whether the interval is closed on the left-side, right-side, both or neither. See the Notes for more detailed explanation.      See also  IntervalIndex

An Index of Interval objects that are all closed on the same side.  cut

Convert continuous data into discrete bins (Categorical of Interval objects).  qcut

Convert continuous data into bins (Categorical of Interval objects) based on quantiles.  Period

Represents a period of time.    Notes The parameters left and right must be from the same type, you must be able to compare them and they must satisfy left <= right. A closed interval (in mathematics denoted by square brackets) contains its endpoints, i.e. the closed interval [0, 5] is characterized by the conditions 0 <= x <= 5. This is what closed='both' stands for. An open interval (in mathematics denoted by parentheses) does not contain its endpoints, i.e. the open interval (0, 5) is characterized by the conditions 0 < x < 5. This is what closed='neither' stands for. Intervals can also be half-open or half-closed, i.e. [0, 5) is described by 0 <= x < 5 (closed='left') and (0, 5] is described by 0 < x <= 5 (closed='right'). Examples It is possible to build Intervals of different types, like numeric ones: 
>>> iv = pd.Interval(left=0, right=5)
>>> iv
Interval(0, 5, closed='right')
  You can check if an element belongs to it 
>>> 2.5 in iv
True
  You can test the bounds (closed='right', so 0 < x <= 5): 
>>> 0 in iv
False
>>> 5 in iv
True
>>> 0.0001 in iv
True
  Calculate its length 
>>> iv.length
5
  You can operate with + and * over an Interval and the operation is applied to each of its bounds, so the result depends on the type of the bound elements 
>>> shifted_iv = iv + 3
>>> shifted_iv
Interval(3, 8, closed='right')
>>> extended_iv = iv * 10.0
>>> extended_iv
Interval(0.0, 50.0, closed='right')
  To create a time interval you can use Timestamps as the bounds 
>>> year_2017 = pd.Interval(pd.Timestamp('2017-01-01 00:00:00'),
...                         pd.Timestamp('2018-01-01 00:00:00'),
...                         closed='left')
>>> pd.Timestamp('2017-01-01 00:00') in year_2017
True
>>> year_2017.length
Timedelta('365 days 00:00:00')
  Attributes       
closed Whether the interval is closed on the left-side, right-side, both or neither.  
closed_left Check if the interval is closed on the left side.  
closed_right Check if the interval is closed on the right side.  
is_empty Indicates if an interval is empty, meaning it contains no points.  
left Left bound for the interval.  
length Return the length of the Interval.  
mid Return the midpoint of the Interval.  
open_left Check if the interval is open on the left side.  
open_right Check if the interval is open on the right side.  
right Right bound for the interval.    Methods       
overlaps Check whether two Interval objects overlap.
pandas.Interval.closed   Interval.closed
 
Whether the interval is closed on the left-side, right-side, both or neither.
pandas.Interval.closed_left   Interval.closed_left
 
Check if the interval is closed on the left side. For the meaning of closed and open see Interval.  Returns 
 bool

True if the Interval is closed on the left-side.
pandas.Interval.closed_right   Interval.closed_right
 
Check if the interval is closed on the right side. For the meaning of closed and open see Interval.  Returns 
 bool

True if the Interval is closed on the left-side.
pandas.Interval.is_empty   Interval.is_empty
 
Indicates if an interval is empty, meaning it contains no points.  New in version 0.25.0.   Returns 
 bool or ndarray

A boolean indicating if a scalar Interval is empty, or a boolean ndarray positionally indicating if an Interval in an IntervalArray or IntervalIndex is empty.     Examples An Interval that contains points is not empty: 
>>> pd.Interval(0, 1, closed='right').is_empty
False
  An Interval that does not contain any points is empty: 
>>> pd.Interval(0, 0, closed='right').is_empty
True
>>> pd.Interval(0, 0, closed='left').is_empty
True
>>> pd.Interval(0, 0, closed='neither').is_empty
True
  An Interval that contains a single point is not empty: 
>>> pd.Interval(0, 0, closed='both').is_empty
False
  An IntervalArray or IntervalIndex returns a boolean ndarray positionally indicating if an Interval is empty: 
>>> ivs = [pd.Interval(0, 0, closed='neither'),
...        pd.Interval(1, 2, closed='neither')]
>>> pd.arrays.IntervalArray(ivs).is_empty
array([ True, False])
  Missing values are not considered empty: 
>>> ivs = [pd.Interval(0, 0, closed='neither'), np.nan]
>>> pd.IntervalIndex(ivs).is_empty
array([ True, False])
pandas.Interval.length   Interval.length
 
Return the length of the Interval.
pandas.Interval.mid   Interval.mid
 
Return the midpoint of the Interval.
pandas.Interval.open_left   Interval.open_left
 
Check if the interval is open on the left side. For the meaning of closed and open see Interval.  Returns 
 bool

True if the Interval is closed on the left-side.
pandas.Interval.open_right   Interval.open_right
 
Check if the interval is open on the right side. For the meaning of closed and open see Interval.  Returns 
 bool

True if the Interval is closed on the left-side.
pandas.Interval.overlaps   Interval.overlaps()
 
Check whether two Interval objects overlap. Two intervals overlap if they share a common point, including closed endpoints. Intervals that only have an open endpoint in common do not overlap.  Parameters 
 
other:Interval


Interval to check against for an overlap.    Returns 
 bool

True if the two intervals overlap.      See also  IntervalArray.overlaps

The corresponding method for IntervalArray.  IntervalIndex.overlaps

The corresponding method for IntervalIndex.    Examples 
>>> i1 = pd.Interval(0, 2)
>>> i2 = pd.Interval(1, 3)
>>> i1.overlaps(i2)
True
>>> i3 = pd.Interval(4, 5)
>>> i1.overlaps(i3)
False
  Intervals that share closed endpoints overlap: 
>>> i4 = pd.Interval(0, 1, closed='both')
>>> i5 = pd.Interval(1, 2, closed='both')
>>> i4.overlaps(i5)
True
  Intervals that only have an open endpoint in common do not overlap: 
>>> i6 = pd.Interval(1, 2, closed='neither')
>>> i4.overlaps(i6)
False
pandas.interval_range   pandas.interval_range(start=None, end=None, periods=None, freq=None, name=None, closed='right')[source]
 
Return a fixed frequency IntervalIndex.  Parameters 
 
start:numeric or datetime-like, default None


Left bound for generating intervals.  
end:numeric or datetime-like, default None


Right bound for generating intervals.  
periods:int, default None


Number of periods to generate.  
freq:numeric, str, or DateOffset, default None


The length of each interval. Must be consistent with the type of start and end, e.g. 2 for numeric, or ‘5H’ for datetime-like. Default is 1 for numeric and ‘D’ for datetime-like.  
name:str, default None


Name of the resulting IntervalIndex.  
closed:{‘left’, ‘right’, ‘both’, ‘neither’}, default ‘right’


Whether the intervals are closed on the left-side, right-side, both or neither.    Returns 
 IntervalIndex
    See also  IntervalIndex

An Index of intervals that are all closed on the same side.    Notes Of the four parameters start, end, periods, and freq, exactly three must be specified. If freq is omitted, the resulting IntervalIndex will have periods linearly spaced elements between start and end, inclusively. To learn more about datetime-like frequency strings, please see this link. Examples Numeric start and end is supported. 
>>> pd.interval_range(start=0, end=5)
IntervalIndex([(0, 1], (1, 2], (2, 3], (3, 4], (4, 5]],
              dtype='interval[int64, right]')
  Additionally, datetime-like input is also supported. 
>>> pd.interval_range(start=pd.Timestamp('2017-01-01'),
...                   end=pd.Timestamp('2017-01-04'))
IntervalIndex([(2017-01-01, 2017-01-02], (2017-01-02, 2017-01-03],
               (2017-01-03, 2017-01-04]],
              dtype='interval[datetime64[ns], right]')
  The freq parameter specifies the frequency between the left and right. endpoints of the individual intervals within the IntervalIndex. For numeric start and end, the frequency must also be numeric. 
>>> pd.interval_range(start=0, periods=4, freq=1.5)
IntervalIndex([(0.0, 1.5], (1.5, 3.0], (3.0, 4.5], (4.5, 6.0]],
              dtype='interval[float64, right]')
  Similarly, for datetime-like start and end, the frequency must be convertible to a DateOffset. 
>>> pd.interval_range(start=pd.Timestamp('2017-01-01'),
...                   periods=3, freq='MS')
IntervalIndex([(2017-01-01, 2017-02-01], (2017-02-01, 2017-03-01],
               (2017-03-01, 2017-04-01]],
              dtype='interval[datetime64[ns], right]')
  Specify start, end, and periods; the frequency is generated automatically (linearly spaced). 
>>> pd.interval_range(start=0, end=6, periods=4)
IntervalIndex([(0.0, 1.5], (1.5, 3.0], (3.0, 4.5], (4.5, 6.0]],
          dtype='interval[float64, right]')
  The closed parameter specifies which endpoints of the individual intervals within the IntervalIndex are closed. 
>>> pd.interval_range(end=5, periods=4, closed='both')
IntervalIndex([[1, 2], [2, 3], [3, 4], [4, 5]],
              dtype='interval[int64, both]')
pandas.IntervalDtype   classpandas.IntervalDtype(subtype=None, closed=None)[source]
 
An ExtensionDtype for Interval data. This is not an actual numpy dtype, but a duck type.  Parameters 
 
subtype:str, np.dtype


The dtype of the Interval bounds.     Examples 
>>> pd.IntervalDtype(subtype='int64', closed='both')
interval[int64, both]
  Attributes       
subtype The dtype of the Interval bounds.    Methods       
None
pandas.IntervalDtype.subtype   propertyIntervalDtype.subtype
 
The dtype of the Interval bounds.
pandas.IntervalIndex   classpandas.IntervalIndex(data, closed=None, dtype=None, copy=False, name=None, verify_integrity=True)[source]
 
Immutable index of intervals that are closed on the same side.  New in version 0.20.0.   Parameters 
 
data:array-like (1-dimensional)


Array-like 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.      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 for more. Examples A new IntervalIndex is typically constructed using 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: IntervalIndex.from_arrays(), IntervalIndex.from_breaks(), and IntervalIndex.from_tuples(). See further examples in the doc strings of interval_range and the mentioned constructor methods. Attributes       
closed Whether the intervals are closed on the left-side, right-side, both or neither.  
is_empty Indicates if an interval is empty, meaning it contains no points.  
is_non_overlapping_monotonic Return True if the IntervalArray is non-overlapping (no Intervals share points) and is either monotonic increasing or monotonic decreasing, else False.  
is_overlapping Return True if the IntervalIndex has overlapping intervals, else False.  
values Return an array representing the data in the Index.          
left   
right   
mid   
length     Methods       
from_arrays(left, right[, closed, name, ...]) Construct from two arrays defining the left and right bounds.  
from_tuples(data[, closed, name, copy, dtype]) Construct an IntervalIndex from an array-like of tuples.  
from_breaks(breaks[, closed, name, copy, dtype]) Construct an IntervalIndex from an array of splits.  
contains(*args, **kwargs) Check elementwise if the Intervals contain the value.  
overlaps(*args, **kwargs) Check elementwise if an Interval overlaps the values in the IntervalArray.  
set_closed(*args, **kwargs) Return an IntervalArray identical to the current one, but closed on the specified side.  
to_tuples(*args, **kwargs) Return an ndarray of tuples of the form (left, right).
pandas.IntervalIndex.closed   IntervalIndex.closed
 
Whether the intervals are closed on the left-side, right-side, both or neither.
pandas.IntervalIndex.contains   IntervalIndex.contains(*args, **kwargs)[source]
 
Check elementwise if the Intervals contain the value. Return a boolean mask whether the value is contained in the Intervals of the IntervalArray.  New in version 0.25.0.   Parameters 
 
other:scalar


The value to check whether it is contained in the Intervals.    Returns 
 boolean array
    See also  Interval.contains

Check whether Interval object contains value.  IntervalArray.overlaps

Check if an Interval overlaps the values in the IntervalArray.    Examples 
>>> intervals = pd.arrays.IntervalArray.from_tuples([(0, 1), (1, 3), (2, 4)])
>>> intervals
<IntervalArray>
[(0, 1], (1, 3], (2, 4]]
Length: 3, dtype: interval[int64, right]
  
>>> intervals.contains(0.5)
array([ True, False, False])
pandas.IntervalIndex.from_arrays   classmethodIntervalIndex.from_arrays(left, right, closed='right', name=None, copy=False, dtype=None)[source]
 
Construct from two arrays defining the left and right bounds.  Parameters 
 
left:array-like (1-dimensional)


Left bounds for each interval.  
right:array-like (1-dimensional)


Right bounds for each interval.  
closed:{‘left’, ‘right’, ‘both’, ‘neither’}, default ‘right’


Whether the intervals are closed on the left-side, right-side, both or neither.  
copy:bool, default False


Copy the data.  
dtype:dtype, optional


If None, dtype will be inferred.    Returns 
 IntervalIndex
  Raises 
 ValueError

When a value is missing in only one of left or right. When a value in left is greater than the corresponding value in right.      See also  interval_range

Function to create a fixed frequency IntervalIndex.  IntervalIndex.from_breaks

Construct an IntervalIndex from an array of splits.  IntervalIndex.from_tuples

Construct an IntervalIndex from an array-like of tuples.    Notes Each element of left must be less than or equal to the right element at the same position. If an element is missing, it must be missing in both left and right. A TypeError is raised when using an unsupported type for left or right. At the moment, ‘category’, ‘object’, and ‘string’ subtypes are not supported. Examples 
>>> pd.IntervalIndex.from_arrays([0, 1, 2], [1, 2, 3])
IntervalIndex([(0, 1], (1, 2], (2, 3]],
              dtype='interval[int64, right]')
pandas.IntervalIndex.from_breaks   classmethodIntervalIndex.from_breaks(breaks, closed='right', name=None, copy=False, dtype=None)[source]
 
Construct an IntervalIndex from an array of splits.  Parameters 
 
breaks:array-like (1-dimensional)


Left and right bounds for each interval.  
closed:{‘left’, ‘right’, ‘both’, ‘neither’}, default ‘right’


Whether the intervals are closed on the left-side, right-side, both or neither.  
copy:bool, default False


Copy the data.  
dtype:dtype or None, default None


If None, dtype will be inferred.    Returns 
 IntervalIndex
    See also  interval_range

Function to create a fixed frequency IntervalIndex.  IntervalIndex.from_arrays

Construct from a left and right array.  IntervalIndex.from_tuples

Construct from a sequence of tuples.    Examples 
>>> pd.IntervalIndex.from_breaks([0, 1, 2, 3])
IntervalIndex([(0, 1], (1, 2], (2, 3]],
              dtype='interval[int64, right]')
pandas.IntervalIndex.from_tuples   classmethodIntervalIndex.from_tuples(data, closed='right', name=None, copy=False, dtype=None)[source]
 
Construct an IntervalIndex from an array-like of tuples.  Parameters 
 
data:array-like (1-dimensional)


Array of tuples.  
closed:{‘left’, ‘right’, ‘both’, ‘neither’}, default ‘right’


Whether the intervals are closed on the left-side, right-side, both or neither.  
copy:bool, default False


By-default copy the data, this is compat only and ignored.  
dtype:dtype or None, default None


If None, dtype will be inferred.    Returns 
 IntervalIndex
    See also  interval_range

Function to create a fixed frequency IntervalIndex.  IntervalIndex.from_arrays

Construct an IntervalIndex from a left and right array.  IntervalIndex.from_breaks

Construct an IntervalIndex from an array of splits.    Examples 
>>> pd.IntervalIndex.from_tuples([(0, 1), (1, 2)])
IntervalIndex([(0, 1], (1, 2]],
               dtype='interval[int64, right]')
pandas.IntervalIndex.get_indexer   IntervalIndex.get_indexer(target, method=None, limit=None, tolerance=None)[source]
 
Compute indexer and mask for new index given the current index. The indexer should be then used as an input to ndarray.take to align the current data to the new index.  Parameters 
 
target:Index


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.   
limit:int, optional


Maximum number of consecutive labels in target to match for inexact matches.  
tolerance: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 
 
indexer:np.ndarray[np.intp]


Integers from 0 to n - 1 indicating that the index at these positions matches the corresponding target values. Missing values in the target are marked by -1.     Notes Returns -1 for unmatched values, for further explanation see the example below. Examples 
>>> index = pd.Index(['c', 'a', 'b'])
>>> index.get_indexer(['a', 'b', 'x'])
array([ 1,  2, -1])
  Notice that the return value is an array of locations in index and x is marked by -1, as it is not in index.
pandas.IntervalIndex.get_loc   IntervalIndex.get_loc(key, method=None, tolerance=None)[source]
 
Get integer location, slice or boolean mask for requested label.  Parameters 
 
key:label


method:{None}, optional


 default: matches where the label is within an interval only.     Returns 
 int if unique index, slice if monotonic index, else mask
   Examples 
>>> i1, i2 = pd.Interval(0, 1), pd.Interval(1, 2)
>>> index = pd.IntervalIndex([i1, i2])
>>> index.get_loc(1)
0
  You can also supply a point inside an interval. 
>>> index.get_loc(1.5)
1
  If a label is in several intervals, you get the locations of all the relevant intervals. 
>>> i3 = pd.Interval(0, 2)
>>> overlapping_index = pd.IntervalIndex([i1, i2, i3])
>>> overlapping_index.get_loc(0.5)
array([ True, False,  True])
  Only exact matches will be returned if an interval is provided. 
>>> index.get_loc(pd.Interval(0, 1))
0
pandas.IntervalIndex.is_empty   propertyIntervalIndex.is_empty
 
Indicates if an interval is empty, meaning it contains no points.  New in version 0.25.0.   Returns 
 bool or ndarray

A boolean indicating if a scalar Interval is empty, or a boolean ndarray positionally indicating if an Interval in an IntervalArray or IntervalIndex is empty.     Examples An Interval that contains points is not empty: 
>>> pd.Interval(0, 1, closed='right').is_empty
False
  An Interval that does not contain any points is empty: 
>>> pd.Interval(0, 0, closed='right').is_empty
True
>>> pd.Interval(0, 0, closed='left').is_empty
True
>>> pd.Interval(0, 0, closed='neither').is_empty
True
  An Interval that contains a single point is not empty: 
>>> pd.Interval(0, 0, closed='both').is_empty
False
  An IntervalArray or IntervalIndex returns a boolean ndarray positionally indicating if an Interval is empty: 
>>> ivs = [pd.Interval(0, 0, closed='neither'),
...        pd.Interval(1, 2, closed='neither')]
>>> pd.arrays.IntervalArray(ivs).is_empty
array([ True, False])
  Missing values are not considered empty: 
>>> ivs = [pd.Interval(0, 0, closed='neither'), np.nan]
>>> pd.IntervalIndex(ivs).is_empty
array([ True, False])
pandas.IntervalIndex.is_non_overlapping_monotonic   IntervalIndex.is_non_overlapping_monotonic
 
Return True if the IntervalArray is non-overlapping (no Intervals share points) and is either monotonic increasing or monotonic decreasing, else False.
pandas.IntervalIndex.is_overlapping   propertyIntervalIndex.is_overlapping
 
Return True if the IntervalIndex has overlapping intervals, else False. Two intervals overlap if they share a common point, including closed endpoints. Intervals that only have an open endpoint in common do not overlap.  Returns 
 bool

Boolean indicating if the IntervalIndex has overlapping intervals.      See also  Interval.overlaps

Check whether two Interval objects overlap.  IntervalIndex.overlaps

Check an IntervalIndex elementwise for overlaps.    Examples 
>>> index = pd.IntervalIndex.from_tuples([(0, 2), (1, 3), (4, 5)])
>>> index
IntervalIndex([(0, 2], (1, 3], (4, 5]],
      dtype='interval[int64, right]')
>>> index.is_overlapping
True
  Intervals that share closed endpoints overlap: 
>>> index = pd.interval_range(0, 3, closed='both')
>>> index
IntervalIndex([[0, 1], [1, 2], [2, 3]],
      dtype='interval[int64, both]')
>>> index.is_overlapping
True
  Intervals that only have an open endpoint in common do not overlap: 
>>> index = pd.interval_range(0, 3, closed='left')
>>> index
IntervalIndex([[0, 1), [1, 2), [2, 3)],
      dtype='interval[int64, left]')
>>> index.is_overlapping
False