neulab/docprompting-conala huggingface dataset:
pandas.IntervalIndex.overlaps   IntervalIndex.overlaps(*args, **kwargs)[source]
 
Check elementwise if an Interval overlaps the values in the IntervalArray. 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:IntervalArray


Interval to check against for an overlap.    Returns 
 ndarray

Boolean array positionally indicating where an overlap occurs.      See also  Interval.overlaps

Check whether two Interval objects overlap.    Examples 
>>> data = [(0, 1), (1, 3), (2, 4)]
>>> intervals = pd.arrays.IntervalArray.from_tuples(data)
>>> intervals
<IntervalArray>
[(0, 1], (1, 3], (2, 4]]
Length: 3, dtype: interval[int64, right]
  
>>> intervals.overlaps(pd.Interval(0.5, 1.5))
array([ True,  True, False])
  Intervals that share closed endpoints overlap: 
>>> intervals.overlaps(pd.Interval(1, 3, closed='left'))
array([ True,  True, True])
  Intervals that only have an open endpoint in common do not overlap: 
>>> intervals.overlaps(pd.Interval(1, 2, closed='right'))
array([False,  True, False])
pandas.IntervalIndex.set_closed   IntervalIndex.set_closed(*args, **kwargs)[source]
 
Return an IntervalArray identical to the current one, but closed on the specified side.  Parameters 
 
closed:{‘left’, ‘right’, ‘both’, ‘neither’}


Whether the intervals are closed on the left-side, right-side, both or neither.    Returns 
 
new_index:IntervalArray

   Examples 
>>> index = pd.arrays.IntervalArray.from_breaks(range(4))
>>> index
<IntervalArray>
[(0, 1], (1, 2], (2, 3]]
Length: 3, dtype: interval[int64, right]
>>> index.set_closed('both')
<IntervalArray>
[[0, 1], [1, 2], [2, 3]]
Length: 3, dtype: interval[int64, both]
pandas.IntervalIndex.to_tuples   IntervalIndex.to_tuples(*args, **kwargs)[source]
 
Return an ndarray of tuples of the form (left, right).  Parameters 
 
na_tuple:bool, default True


Returns NA as a tuple if True, (nan, nan), or just as the NA value itself if False, nan.    Returns 
 tuples: ndarray
pandas.IntervalIndex.values   propertyIntervalIndex.values
 
Return an array representing the data in the Index.  Warning We recommend using Index.array or Index.to_numpy(), depending on whether you need a reference to the underlying data or a NumPy array.   Returns 
 array: numpy.ndarray or ExtensionArray
    See also  Index.array

Reference to the underlying data.  Index.to_numpy

A NumPy array representing the underlying data.
pandas.io.formats.style.Styler.apply   Styler.apply(func, axis=0, subset=None, **kwargs)[source]
 
Apply a CSS-styling function column-wise, row-wise, or table-wise. Updates the HTML representation with the result.  Parameters 
 
func:function


func should take a Series if axis in [0,1] and return a list-like object of same length, or a Series, not necessarily of same length, with valid index labels considering subset. func should take a DataFrame if axis is None and return either an ndarray with the same shape or a DataFrame, not necessarily of the same shape, with valid index and columns labels considering subset.  Changed in version 1.3.0.   Changed in version 1.4.0.   
axis:{0 or ‘index’, 1 or ‘columns’, None}, default 0


Apply to each column (axis=0 or 'index'), to each row (axis=1 or 'columns'), or to the entire DataFrame at once with axis=None.  
subset:label, array-like, IndexSlice, optional


A valid 2d input to DataFrame.loc[<subset>], or, in the case of a 1d input or single key, to DataFrame.loc[:, <subset>] where the columns are prioritised, to limit data to before applying the function.  
**kwargs:dict


Pass along to func.    Returns 
 
self:Styler

    See also  Styler.applymap_index

Apply a CSS-styling function to headers elementwise.  Styler.apply_index

Apply a CSS-styling function to headers level-wise.  Styler.applymap

Apply a CSS-styling function elementwise.    Notes The elements of the output of func should be CSS styles as strings, in the format ‘attribute: value; attribute2: value2; …’ or, if nothing is to be applied to that element, an empty string or None. This is similar to DataFrame.apply, except that axis=None applies the function to the entire DataFrame at once, rather than column-wise or row-wise. Examples 
>>> def highlight_max(x, color):
...     return np.where(x == np.nanmax(x.to_numpy()), f"color: {color};", None)
>>> df = pd.DataFrame(np.random.randn(5, 2), columns=["A", "B"])
>>> df.style.apply(highlight_max, color='red')  
>>> df.style.apply(highlight_max, color='blue', axis=1)  
>>> df.style.apply(highlight_max, color='green', axis=None)  
  Using subset to restrict application to a single column or multiple columns 
>>> df.style.apply(highlight_max, color='red', subset="A")
...  
>>> df.style.apply(highlight_max, color='red', subset=["A", "B"])
...  
  Using a 2d input to subset to select rows in addition to columns 
>>> df.style.apply(highlight_max, color='red', subset=([0,1,2], slice(None)))
...  
>>> df.style.apply(highlight_max, color='red', subset=(slice(0,5,2), "A"))
...  
  Using a function which returns a Series / DataFrame of unequal length but containing valid index labels 
>>> df = pd.DataFrame([[1, 2], [3, 4], [4, 6]], index=["A1", "A2", "Total"])
>>> total_style = pd.Series("font-weight: bold;", index=["Total"])
>>> df.style.apply(lambda s: total_style)  
  See Table Visualization user guide for more details.
pandas.io.formats.style.Styler.apply_index   Styler.apply_index(func, axis=0, level=None, **kwargs)[source]
 
Apply a CSS-styling function to the index or column headers, level-wise. Updates the HTML representation with the result.  New in version 1.4.0.   Parameters 
 
func:function


func should take a Series and return a string array of the same length.  
axis:{0, 1, “index”, “columns”}


The headers over which to apply the function.  
level:int, str, list, optional


If index is MultiIndex the level(s) over which to apply the function.  
**kwargs:dict


Pass along to func.    Returns 
 
self:Styler

    See also  Styler.applymap_index

Apply a CSS-styling function to headers elementwise.  Styler.apply

Apply a CSS-styling function column-wise, row-wise, or table-wise.  Styler.applymap

Apply a CSS-styling function elementwise.    Notes Each input to func will be the index as a Series, if an Index, or a level of a MultiIndex. The output of func should be an identically sized array of CSS styles as strings, in the format ‘attribute: value; attribute2: value2; …’ or, if nothing is to be applied to that element, an empty string or None. Examples Basic usage to conditionally highlight values in the index. 
>>> df = pd.DataFrame([[1,2], [3,4]], index=["A", "B"])
>>> def color_b(s):
...     return np.where(s == "B", "background-color: yellow;", "")
>>> df.style.apply_index(color_b)  
     Selectively applying to specific levels of MultiIndex columns. 
>>> midx = pd.MultiIndex.from_product([['ix', 'jy'], [0, 1], ['x3', 'z4']])
>>> df = pd.DataFrame([np.arange(8)], columns=midx)
>>> def highlight_x(s):
...     return ["background-color: yellow;" if "x" in v else "" for v in s]
>>> df.style.apply_index(highlight_x, axis="columns", level=[0, 2])
...
pandas.io.formats.style.Styler.applymap   Styler.applymap(func, subset=None, **kwargs)[source]
 
Apply a CSS-styling function elementwise. Updates the HTML representation with the result.  Parameters 
 
func:function


func should take a scalar and return a string.  
subset:label, array-like, IndexSlice, optional


A valid 2d input to DataFrame.loc[<subset>], or, in the case of a 1d input or single key, to DataFrame.loc[:, <subset>] where the columns are prioritised, to limit data to before applying the function.  
**kwargs:dict


Pass along to func.    Returns 
 
self:Styler

    See also  Styler.applymap_index

Apply a CSS-styling function to headers elementwise.  Styler.apply_index

Apply a CSS-styling function to headers level-wise.  Styler.apply

Apply a CSS-styling function column-wise, row-wise, or table-wise.    Notes The elements of the output of func should be CSS styles as strings, in the format ‘attribute: value; attribute2: value2; …’ or, if nothing is to be applied to that element, an empty string or None. Examples 
>>> def color_negative(v, color):
...     return f"color: {color};" if v < 0 else None
>>> df = pd.DataFrame(np.random.randn(5, 2), columns=["A", "B"])
>>> df.style.applymap(color_negative, color='red')  
  Using subset to restrict application to a single column or multiple columns 
>>> df.style.applymap(color_negative, color='red', subset="A")
...  
>>> df.style.applymap(color_negative, color='red', subset=["A", "B"])
...  
  Using a 2d input to subset to select rows in addition to columns 
>>> df.style.applymap(color_negative, color='red',
...  subset=([0,1,2], slice(None)))  
>>> df.style.applymap(color_negative, color='red', subset=(slice(0,5,2), "A"))
...  
  See Table Visualization user guide for more details.
pandas.io.formats.style.Styler.applymap_index   Styler.applymap_index(func, axis=0, level=None, **kwargs)[source]
 
Apply a CSS-styling function to the index or column headers, elementwise. Updates the HTML representation with the result.  New in version 1.4.0.   Parameters 
 
func:function


func should take a scalar and return a string.  
axis:{0, 1, “index”, “columns”}


The headers over which to apply the function.  
level:int, str, list, optional


If index is MultiIndex the level(s) over which to apply the function.  
**kwargs:dict


Pass along to func.    Returns 
 
self:Styler

    See also  Styler.apply_index

Apply a CSS-styling function to headers level-wise.  Styler.apply

Apply a CSS-styling function column-wise, row-wise, or table-wise.  Styler.applymap

Apply a CSS-styling function elementwise.    Notes Each input to func will be an index value, if an Index, or a level value of a MultiIndex. The output of func should be CSS styles as a string, in the format ‘attribute: value; attribute2: value2; …’ or, if nothing is to be applied to that element, an empty string or None. Examples Basic usage to conditionally highlight values in the index. 
>>> df = pd.DataFrame([[1,2], [3,4]], index=["A", "B"])
>>> def color_b(s):
...     return "background-color: yellow;" if v == "B" else None
>>> df.style.applymap_index(color_b)  
     Selectively applying to specific levels of MultiIndex columns. 
>>> midx = pd.MultiIndex.from_product([['ix', 'jy'], [0, 1], ['x3', 'z4']])
>>> df = pd.DataFrame([np.arange(8)], columns=midx)
>>> def highlight_x(v):
...     return "background-color: yellow;" if "x" in v else None
>>> df.style.applymap_index(highlight_x, axis="columns", level=[0, 2])
...
pandas.io.formats.style.Styler.bar   Styler.bar(subset=None, axis=0, *, color=None, cmap=None, width=100, height=100, align='mid', vmin=None, vmax=None, props='width: 10em;')[source]
 
Draw bar chart in the cell backgrounds.  Changed in version 1.4.0.   Parameters 
 
subset:label, array-like, IndexSlice, optional


A valid 2d input to DataFrame.loc[<subset>], or, in the case of a 1d input or single key, to DataFrame.loc[:, <subset>] where the columns are prioritised, to limit data to before applying the function.  
axis:{0 or ‘index’, 1 or ‘columns’, None}, default 0


Apply to each column (axis=0 or 'index'), to each row (axis=1 or 'columns'), or to the entire DataFrame at once with axis=None.  
color:str or 2-tuple/list


If a str is passed, the color is the same for both negative and positive numbers. If 2-tuple/list is used, the first element is the color_negative and the second is the color_positive (eg: [‘#d65f5f’, ‘#5fba7d’]).  
cmap:str, matplotlib.cm.ColorMap


A string name of a matplotlib Colormap, or a Colormap object. Cannot be used together with color.  New in version 1.4.0.   
width:float, default 100


The percentage of the cell, measured from the left, in which to draw the bars, in [0, 100].  
height:float, default 100


The percentage height of the bar in the cell, centrally aligned, in [0,100].  New in version 1.4.0.   
align:str, int, float, callable, default ‘mid’


How to align the bars within the cells relative to a width adjusted center. If string must be one of:  ‘left’ : bars are drawn rightwards from the minimum data value. ‘right’ : bars are drawn leftwards from the maximum data value. ‘zero’ : a value of zero is located at the center of the cell. ‘mid’ : a value of (max-min)/2 is located at the center of the cell, or if all values are negative (positive) the zero is aligned at the right (left) of the cell. ‘mean’ : the mean value of the data is located at the center of the cell.  If a float or integer is given this will indicate the center of the cell. If a callable should take a 1d or 2d array and return a scalar.  Changed in version 1.4.0.   
vmin:float, optional


Minimum bar value, defining the left hand limit of the bar drawing range, lower values are clipped to vmin. When None (default): the minimum value of the data will be used.  
vmax:float, optional


Maximum bar value, defining the right hand limit of the bar drawing range, higher values are clipped to vmax. When None (default): the maximum value of the data will be used.  
props:str, optional


The base CSS of the cell that is extended to add the bar chart. Defaults to “width: 10em;”.  New in version 1.4.0.     Returns 
 
self:Styler

   Notes This section of the user guide: Table Visualization gives a number of examples for different settings and color coordination.
pandas.io.formats.style.Styler.clear   Styler.clear()[source]
 
Reset the Styler, removing any previously applied styles. Returns None.
pandas.io.formats.style.Styler.env   Styler.env=<jinja2.environment.Environment object>
pandas.io.formats.style.Styler.export   Styler.export()[source]
 
Export the styles applied to the current Styler. Can be applied to a second Styler with Styler.use.  Returns 
 
styles:dict

    See also  Styler.use

Set the styles on the current Styler.  Styler.copy

Create a copy of the current Styler.    Notes This method is designed to copy non-data dependent attributes of one Styler to another. It differs from Styler.copy where data and data dependent attributes are also copied. The following items are exported since they are not generally data dependent:  
 Styling functions added by the apply and applymap Whether axes and names are hidden from the display, if unambiguous. Table attributes Table styles  
 The following attributes are considered data dependent and therefore not exported:  
 Caption UUID Tooltips Any hidden rows or columns identified by Index labels Any formatting applied using Styler.format Any CSS classes added using Styler.set_td_classes  
 Examples 
>>> styler = DataFrame([[1, 2], [3, 4]]).style
>>> styler2 = DataFrame([[9, 9, 9]]).style
>>> styler.hide(axis=0).highlight_max(axis=1)  
>>> export = styler.export()
>>> styler2.use(export)
pandas.io.formats.style.Styler.from_custom_template   classmethodStyler.from_custom_template(searchpath, html_table=None, html_style=None)[source]
 
Factory function for creating a subclass of Styler. Uses custom templates and Jinja environment.  Changed in version 1.3.0.   Parameters 
 
searchpath:str or list


Path or paths of directories containing the templates.  
html_table:str


Name of your custom template to replace the html_table template.  New in version 1.3.0.   
html_style:str


Name of your custom template to replace the html_style template.  New in version 1.3.0.     Returns 
 
MyStyler:subclass of Styler


Has the correct env,``template_html``, template_html_table and template_html_style class attributes set.
pandas.io.formats.style.Styler.hide_columns   Styler.hide_columns(subset=None, level=None, names=False)[source]
 
Hide the column headers or specific keys in the columns from rendering. This method has dual functionality:  
 if subset is None then the entire column headers row, or specific levels, will be hidden whilst the data-values remain visible. if a subset is given then those specific columns, including the data-values will be hidden, whilst the column headers row remains visible.  
  Changed in version 1.3.0.   ..deprecated:: 1.4.0

This method should be replaced by hide(axis="columns", **kwargs)    Parameters 
 
subset:label, array-like, IndexSlice, optional


A valid 1d input or single key along the columns axis within DataFrame.loc[:, <subset>], to limit data to before applying the function.  
level:int, str, list


The level(s) to hide in a MultiIndex if hiding the entire column headers row. Cannot be used simultaneously with subset.  New in version 1.4.0.   
names:bool


Whether to hide the column index name(s), in the case all column headers, or some levels, are visible.  New in version 1.4.0.     Returns 
 
self:Styler

    See also  Styler.hide

Hide the entire index / columns, or specific rows / columns.
pandas.io.formats.style.Styler.hide_index   Styler.hide_index(subset=None, level=None, names=False)[source]
 
Hide the entire index, or specific keys in the index from rendering. This method has dual functionality:  
 if subset is None then the entire index, or specified levels, will be hidden whilst displaying all data-rows. if a subset is given then those specific rows will be hidden whilst the index itself remains visible.  
  Changed in version 1.3.0.   Deprecated since version 1.4.0: This method should be replaced by hide(axis="index", **kwargs)   Parameters 
 
subset:label, array-like, IndexSlice, optional


A valid 1d input or single key along the index axis within DataFrame.loc[<subset>, :], to limit data to before applying the function.  
level:int, str, list


The level(s) to hide in a MultiIndex if hiding the entire index. Cannot be used simultaneously with subset.  New in version 1.4.0.   
names:bool


Whether to hide the index name(s), in the case the index or part of it remains visible.  New in version 1.4.0.     Returns 
 
self:Styler

    See also  Styler.hide

Hide the entire index / columns, or specific rows / columns.
pandas.io.formats.style.Styler.highlight_between   Styler.highlight_between(subset=None, color='yellow', axis=0, left=None, right=None, inclusive='both', props=None)[source]
 
Highlight a defined range with a style.  New in version 1.3.0.   Parameters 
 
subset:label, array-like, IndexSlice, optional


A valid 2d input to DataFrame.loc[<subset>], or, in the case of a 1d input or single key, to DataFrame.loc[:, <subset>] where the columns are prioritised, to limit data to before applying the function.  
color:str, default ‘yellow’


Background color to use for highlighting.  
axis:{0 or ‘index’, 1 or ‘columns’, None}, default 0


If left or right given as sequence, axis along which to apply those boundaries. See examples.  
left:scalar or datetime-like, or sequence or array-like, default None


Left bound for defining the range.  
right:scalar or datetime-like, or sequence or array-like, default None


Right bound for defining the range.  
inclusive:{‘both’, ‘neither’, ‘left’, ‘right’}


Identify whether bounds are closed or open.  
props:str, default None


CSS properties to use for highlighting. If props is given, color is not used.    Returns 
 
self:Styler

    See also  Styler.highlight_null

Highlight missing values with a style.  Styler.highlight_max

Highlight the maximum with a style.  Styler.highlight_min

Highlight the minimum with a style.  Styler.highlight_quantile

Highlight values defined by a quantile with a style.    Notes If left is None only the right bound is applied. If right is None only the left bound is applied. If both are None all values are highlighted. axis is only needed if left or right are provided as a sequence or an array-like object for aligning the shapes. If left and right are both scalars then all axis inputs will give the same result. This function only works with compatible dtypes. For example a datetime-like region can only use equivalent datetime-like left and right arguments. Use subset to control regions which have multiple dtypes. Examples Basic usage 
>>> df = pd.DataFrame({
...     'One': [1.2, 1.6, 1.5],
...     'Two': [2.9, 2.1, 2.5],
...     'Three': [3.1, 3.2, 3.8],
... })
>>> df.style.highlight_between(left=2.1, right=2.9)  
     Using a range input sequnce along an axis, in this case setting a left and right for each column individually 
>>> df.style.highlight_between(left=[1.4, 2.4, 3.4], right=[1.6, 2.6, 3.6],
...     axis=1, color="#fffd75")  
     Using axis=None and providing the left argument as an array that matches the input DataFrame, with a constant right 
>>> df.style.highlight_between(left=[[2,2,3],[2,2,3],[3,3,3]], right=3.5,
...     axis=None, color="#fffd75")  
     Using props instead of default background coloring 
>>> df.style.highlight_between(left=1.5, right=3.5,
...     props='font-weight:bold;color:#e83e8c')
pandas.io.formats.style.Styler.highlight_max   Styler.highlight_max(subset=None, color='yellow', axis=0, props=None)[source]
 
Highlight the maximum with a style.  Parameters 
 
subset:label, array-like, IndexSlice, optional


A valid 2d input to DataFrame.loc[<subset>], or, in the case of a 1d input or single key, to DataFrame.loc[:, <subset>] where the columns are prioritised, to limit data to before applying the function.  
color:str, default ‘yellow’


Background color to use for highlighting.  
axis:{0 or ‘index’, 1 or ‘columns’, None}, default 0


Apply to each column (axis=0 or 'index'), to each row (axis=1 or 'columns'), or to the entire DataFrame at once with axis=None.  
props:str, default None


CSS properties to use for highlighting. If props is given, color is not used.  New in version 1.3.0.     Returns 
 
self:Styler

    See also  Styler.highlight_null

Highlight missing values with a style.  Styler.highlight_min

Highlight the minimum with a style.  Styler.highlight_between

Highlight a defined range with a style.  Styler.highlight_quantile

Highlight values defined by a quantile with a style.
pandas.io.formats.style.Styler.highlight_min   Styler.highlight_min(subset=None, color='yellow', axis=0, props=None)[source]
 
Highlight the minimum with a style.  Parameters 
 
subset:label, array-like, IndexSlice, optional


A valid 2d input to DataFrame.loc[<subset>], or, in the case of a 1d input or single key, to DataFrame.loc[:, <subset>] where the columns are prioritised, to limit data to before applying the function.  
color:str, default ‘yellow’


Background color to use for highlighting.  
axis:{0 or ‘index’, 1 or ‘columns’, None}, default 0


Apply to each column (axis=0 or 'index'), to each row (axis=1 or 'columns'), or to the entire DataFrame at once with axis=None.  
props:str, default None


CSS properties to use for highlighting. If props is given, color is not used.  New in version 1.3.0.     Returns 
 
self:Styler

    See also  Styler.highlight_null

Highlight missing values with a style.  Styler.highlight_max

Highlight the maximum with a style.  Styler.highlight_between

Highlight a defined range with a style.  Styler.highlight_quantile

Highlight values defined by a quantile with a style.
pandas.io.formats.style.Styler.highlight_null   Styler.highlight_null(null_color='red', subset=None, props=None)[source]
 
Highlight missing values with a style.  Parameters 
 
null_color:str, default ‘red’


subset:label, array-like, IndexSlice, optional


A valid 2d input to DataFrame.loc[<subset>], or, in the case of a 1d input or single key, to DataFrame.loc[:, <subset>] where the columns are prioritised, to limit data to before applying the function.  New in version 1.1.0.   
props:str, default None


CSS properties to use for highlighting. If props is given, color is not used.  New in version 1.3.0.     Returns 
 
self:Styler

    See also  Styler.highlight_max

Highlight the maximum with a style.  Styler.highlight_min

Highlight the minimum with a style.  Styler.highlight_between

Highlight a defined range with a style.  Styler.highlight_quantile

Highlight values defined by a quantile with a style.