neulab/docprompting-conala huggingface dataset:
pandas.Series.product   Series.product(axis=None, skipna=True, level=None, numeric_only=None, min_count=0, **kwargs)[source]
 
Return the product of the values over the requested axis.  Parameters 
 
axis:{index (0)}


Axis for the function to be applied on.  
skipna:bool, default True


Exclude NA/null values when computing the result.  
level:int or level name, default None


If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a scalar.  
numeric_only:bool, default None


Include only float, int, boolean columns. If None, will attempt to use everything, then use only numeric data. Not implemented for Series.  
min_count:int, default 0


The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA.  **kwargs

Additional keyword arguments to be passed to the function.    Returns 
 scalar or Series (if level specified)
    See also  Series.sum

Return the sum.  Series.min

Return the minimum.  Series.max

Return the maximum.  Series.idxmin

Return the index of the minimum.  Series.idxmax

Return the index of the maximum.  DataFrame.sum

Return the sum over the requested axis.  DataFrame.min

Return the minimum over the requested axis.  DataFrame.max

Return the maximum over the requested axis.  DataFrame.idxmin

Return the index of the minimum over the requested axis.  DataFrame.idxmax

Return the index of the maximum over the requested axis.    Examples By default, the product of an empty or all-NA Series is 1 
>>> pd.Series([], dtype="float64").prod()
1.0
  This can be controlled with the min_count parameter 
>>> pd.Series([], dtype="float64").prod(min_count=1)
nan
  Thanks to the skipna parameter, min_count handles all-NA and empty series identically. 
>>> pd.Series([np.nan]).prod()
1.0
  
>>> pd.Series([np.nan]).prod(min_count=1)
nan
pandas.Series.quantile   Series.quantile(q=0.5, interpolation='linear')[source]
 
Return value at the given quantile.  Parameters 
 
q:float or array-like, default 0.5 (50% quantile)


The quantile(s) to compute, which can lie in range: 0 <= q <= 1.  
interpolation:{‘linear’, ‘lower’, ‘higher’, ‘midpoint’, ‘nearest’}


This optional parameter specifies the interpolation method to use, when the desired quantile lies between two data points i and j:  
 linear: i + (j - i) * fraction, where fraction is the fractional part of the index surrounded by i and j. lower: i. higher: j. nearest: i or j whichever is nearest. midpoint: (i + j) / 2.  
    Returns 
 float or Series

If q is an array, a Series will be returned where the index is q and the values are the quantiles, otherwise a float will be returned.      See also  core.window.Rolling.quantile

Calculate the rolling quantile.  numpy.percentile

Returns the q-th percentile(s) of the array elements.    Examples 
>>> s = pd.Series([1, 2, 3, 4])
>>> s.quantile(.5)
2.5
>>> s.quantile([.25, .5, .75])
0.25    1.75
0.50    2.50
0.75    3.25
dtype: float64
pandas.Series.radd   Series.radd(other, level=None, fill_value=None, axis=0)[source]
 
Return Addition of series and other, element-wise (binary operator radd). Equivalent to other + series, but with support to substitute a fill_value for missing data in either one of the inputs.  Parameters 
 
other:Series or scalar value


fill_value:None or float value, default None (NaN)


Fill existing missing (NaN) values, and any new element needed for successful Series alignment, with this value before computation. If data in both corresponding Series locations is missing the result of filling (at that location) will be missing.  
level:int or name


Broadcast across a level, matching Index values on the passed MultiIndex level.    Returns 
 Series

The result of the operation.      See also  Series.add

Element-wise Addition, see Python documentation for more details.    Examples 
>>> a = pd.Series([1, 1, 1, np.nan], index=['a', 'b', 'c', 'd'])
>>> a
a    1.0
b    1.0
c    1.0
d    NaN
dtype: float64
>>> b = pd.Series([1, np.nan, 1, np.nan], index=['a', 'b', 'd', 'e'])
>>> b
a    1.0
b    NaN
d    1.0
e    NaN
dtype: float64
>>> a.add(b, fill_value=0)
a    2.0
b    1.0
c    1.0
d    1.0
e    NaN
dtype: float64
pandas.Series.rank   Series.rank(axis=0, method='average', numeric_only=NoDefault.no_default, na_option='keep', ascending=True, pct=False)[source]
 
Compute numerical data ranks (1 through n) along axis. By default, equal values are assigned a rank that is the average of the ranks of those values.  Parameters 
 
axis:{0 or ‘index’, 1 or ‘columns’}, default 0


Index to direct ranking.  
method:{‘average’, ‘min’, ‘max’, ‘first’, ‘dense’}, default ‘average’


How to rank the group of records that have the same value (i.e. ties):  average: average rank of the group min: lowest rank in the group max: highest rank in the group first: ranks assigned in order they appear in the array dense: like ‘min’, but rank always increases by 1 between groups.   
numeric_only:bool, optional


For DataFrame objects, rank only numeric columns if set to True.  
na_option:{‘keep’, ‘top’, ‘bottom’}, default ‘keep’


How to rank NaN values:  keep: assign NaN rank to NaN values top: assign lowest rank to NaN values bottom: assign highest rank to NaN values   
ascending:bool, default True


Whether or not the elements should be ranked in ascending order.  
pct:bool, default False


Whether or not to display the returned rankings in percentile form.    Returns 
 same type as caller

Return a Series or DataFrame with data ranks as values.      See also  core.groupby.GroupBy.rank

Rank of values within each group.    Examples 
>>> df = pd.DataFrame(data={'Animal': ['cat', 'penguin', 'dog',
...                                    'spider', 'snake'],
...                         'Number_legs': [4, 2, 4, 8, np.nan]})
>>> df
    Animal  Number_legs
0      cat          4.0
1  penguin          2.0
2      dog          4.0
3   spider          8.0
4    snake          NaN
  The following example shows how the method behaves with the above parameters:  default_rank: this is the default behaviour obtained without using any parameter. max_rank: setting method = 'max' the records that have the same values are ranked using the highest rank (e.g.: since ‘cat’ and ‘dog’ are both in the 2nd and 3rd position, rank 3 is assigned.) NA_bottom: choosing na_option = 'bottom', if there are records with NaN values they are placed at the bottom of the ranking. pct_rank: when setting pct = True, the ranking is expressed as percentile rank.  
>>> df['default_rank'] = df['Number_legs'].rank()
>>> df['max_rank'] = df['Number_legs'].rank(method='max')
>>> df['NA_bottom'] = df['Number_legs'].rank(na_option='bottom')
>>> df['pct_rank'] = df['Number_legs'].rank(pct=True)
>>> df
    Animal  Number_legs  default_rank  max_rank  NA_bottom  pct_rank
0      cat          4.0           2.5       3.0        2.5     0.625
1  penguin          2.0           1.0       1.0        1.0     0.250
2      dog          4.0           2.5       3.0        2.5     0.625
3   spider          8.0           4.0       4.0        4.0     1.000
4    snake          NaN           NaN       NaN        5.0       NaN
pandas.Series.ravel   Series.ravel(order='C')[source]
 
Return the flattened underlying data as an ndarray.  Returns 
 numpy.ndarray or ndarray-like

Flattened data of the Series.      See also  numpy.ndarray.ravel

Return a flattened array.
pandas.Series.rdiv   Series.rdiv(other, level=None, fill_value=None, axis=0)[source]
 
Return Floating division of series and other, element-wise (binary operator rtruediv). Equivalent to other / series, but with support to substitute a fill_value for missing data in either one of the inputs.  Parameters 
 
other:Series or scalar value


fill_value:None or float value, default None (NaN)


Fill existing missing (NaN) values, and any new element needed for successful Series alignment, with this value before computation. If data in both corresponding Series locations is missing the result of filling (at that location) will be missing.  
level:int or name


Broadcast across a level, matching Index values on the passed MultiIndex level.    Returns 
 Series

The result of the operation.      See also  Series.truediv

Element-wise Floating division, see Python documentation for more details.    Examples 
>>> a = pd.Series([1, 1, 1, np.nan], index=['a', 'b', 'c', 'd'])
>>> a
a    1.0
b    1.0
c    1.0
d    NaN
dtype: float64
>>> b = pd.Series([1, np.nan, 1, np.nan], index=['a', 'b', 'd', 'e'])
>>> b
a    1.0
b    NaN
d    1.0
e    NaN
dtype: float64
>>> a.divide(b, fill_value=0)
a    1.0
b    inf
c    inf
d    0.0
e    NaN
dtype: float64
pandas.Series.rdivmod   Series.rdivmod(other, level=None, fill_value=None, axis=0)[source]
 
Return Integer division and modulo of series and other, element-wise (binary operator rdivmod). Equivalent to other divmod series, but with support to substitute a fill_value for missing data in either one of the inputs.  Parameters 
 
other:Series or scalar value


fill_value:None or float value, default None (NaN)


Fill existing missing (NaN) values, and any new element needed for successful Series alignment, with this value before computation. If data in both corresponding Series locations is missing the result of filling (at that location) will be missing.  
level:int or name


Broadcast across a level, matching Index values on the passed MultiIndex level.    Returns 
 2-Tuple of Series

The result of the operation.      See also  Series.divmod

Element-wise Integer division and modulo, see Python documentation for more details.    Examples 
>>> a = pd.Series([1, 1, 1, np.nan], index=['a', 'b', 'c', 'd'])
>>> a
a    1.0
b    1.0
c    1.0
d    NaN
dtype: float64
>>> b = pd.Series([1, np.nan, 1, np.nan], index=['a', 'b', 'd', 'e'])
>>> b
a    1.0
b    NaN
d    1.0
e    NaN
dtype: float64
>>> a.divmod(b, fill_value=0)
(a    1.0
 b    NaN
 c    NaN
 d    0.0
 e    NaN
 dtype: float64,
 a    0.0
 b    NaN
 c    NaN
 d    0.0
 e    NaN
 dtype: float64)
pandas.Series.rename   Series.rename(index=None, *, axis=None, copy=True, inplace=False, level=None, errors='ignore')[source]
 
Alter Series index labels or name. Function / dict values must be unique (1-to-1). Labels not contained in a dict / Series will be left as-is. Extra labels listed don’t throw an error. Alternatively, change Series.name with a scalar value. See the user guide for more.  Parameters 
 
axis:{0 or “index”}


Unused. Accepted for compatibility with DataFrame method only.  
index:scalar, hashable sequence, dict-like or function, optional


Functions or dict-like are transformations to apply to the index. Scalar or hashable sequence-like will alter the Series.name attribute.  **kwargs

Additional keyword arguments passed to the function. Only the “inplace” keyword is used.    Returns 
 Series or None

Series with index labels or name altered or None if inplace=True.      See also  DataFrame.rename

Corresponding DataFrame method.  Series.rename_axis

Set the name of the axis.    Examples 
>>> s = pd.Series([1, 2, 3])
>>> s
0    1
1    2
2    3
dtype: int64
>>> s.rename("my_name")  # scalar, changes Series.name
0    1
1    2
2    3
Name: my_name, dtype: int64
>>> s.rename(lambda x: x ** 2)  # function, changes labels
0    1
1    2
4    3
dtype: int64
>>> s.rename({1: 3, 2: 5})  # mapping, changes labels
0    1
3    2
5    3
dtype: int64
pandas.Series.reorder_levels   Series.reorder_levels(order)[source]
 
Rearrange index levels using input order. May not drop or duplicate levels.  Parameters 
 
order:list of int representing new level order


Reference level by number or key.    Returns 
 type of caller (new object)
pandas.Series.repeat   Series.repeat(repeats, axis=None)[source]
 
Repeat elements of a Series. Returns a new Series where each element of the current Series 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 Series.  
axis:None


Must be None. Has no effect but is accepted for compatibility with numpy.    Returns 
 Series

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

Equivalent function for Index.  numpy.repeat

Similar method for numpy.ndarray.    Examples 
>>> s = pd.Series(['a', 'b', 'c'])
>>> s
0    a
1    b
2    c
dtype: object
>>> s.repeat(2)
0    a
0    a
1    b
1    b
2    c
2    c
dtype: object
>>> s.repeat([1, 2, 3])
0    a
1    b
1    b
2    c
2    c
2    c
dtype: object
pandas.Series.reset_index   Series.reset_index(level=None, drop=False, name=NoDefault.no_default, inplace=False)[source]
 
Generate a new DataFrame or Series with the index reset. This is useful when the index needs to be treated as a column, or when the index is meaningless and needs to be reset to the default before another operation.  Parameters 
 
level:int, str, tuple, or list, default optional


For a Series with a MultiIndex, only remove the specified levels from the index. Removes all levels by default.  
drop:bool, default False


Just reset the index, without inserting it as a column in the new DataFrame.  
name:object, optional


The name to use for the column containing the original Series values. Uses self.name by default. This argument is ignored when drop is True.  
inplace:bool, default False


Modify the Series in place (do not create a new object).    Returns 
 Series or DataFrame or None

When drop is False (the default), a DataFrame is returned. The newly created columns will come first in the DataFrame, followed by the original Series values. When drop is True, a Series is returned. In either case, if inplace=True, no value is returned.      See also  DataFrame.reset_index

Analogous function for DataFrame.    Examples 
>>> s = pd.Series([1, 2, 3, 4], name='foo',
...               index=pd.Index(['a', 'b', 'c', 'd'], name='idx'))
  Generate a DataFrame with default index. 
>>> s.reset_index()
  idx  foo
0   a    1
1   b    2
2   c    3
3   d    4
  To specify the name of the new column use name. 
>>> s.reset_index(name='values')
  idx  values
0   a       1
1   b       2
2   c       3
3   d       4
  To generate a new Series with the default set drop to True. 
>>> s.reset_index(drop=True)
0    1
1    2
2    3
3    4
Name: foo, dtype: int64
  To update the Series in place, without generating a new one set inplace to True. Note that it also requires drop=True. 
>>> s.reset_index(inplace=True, drop=True)
>>> s
0    1
1    2
2    3
3    4
Name: foo, dtype: int64
  The level parameter is interesting for Series with a multi-level index. 
>>> arrays = [np.array(['bar', 'bar', 'baz', 'baz']),
...           np.array(['one', 'two', 'one', 'two'])]
>>> s2 = pd.Series(
...     range(4), name='foo',
...     index=pd.MultiIndex.from_arrays(arrays,
...                                     names=['a', 'b']))
  To remove a specific level from the Index, use level. 
>>> s2.reset_index(level='a')
       a  foo
b
one  bar    0
two  bar    1
one  baz    2
two  baz    3
  If level is not set, all levels are removed from the Index. 
>>> s2.reset_index()
     a    b  foo
0  bar  one    0
1  bar  two    1
2  baz  one    2
3  baz  two    3
pandas.Series.rfloordiv   Series.rfloordiv(other, level=None, fill_value=None, axis=0)[source]
 
Return Integer division of series and other, element-wise (binary operator rfloordiv). Equivalent to other // series, but with support to substitute a fill_value for missing data in either one of the inputs.  Parameters 
 
other:Series or scalar value


fill_value:None or float value, default None (NaN)


Fill existing missing (NaN) values, and any new element needed for successful Series alignment, with this value before computation. If data in both corresponding Series locations is missing the result of filling (at that location) will be missing.  
level:int or name


Broadcast across a level, matching Index values on the passed MultiIndex level.    Returns 
 Series

The result of the operation.      See also  Series.floordiv

Element-wise Integer division, see Python documentation for more details.    Examples 
>>> a = pd.Series([1, 1, 1, np.nan], index=['a', 'b', 'c', 'd'])
>>> a
a    1.0
b    1.0
c    1.0
d    NaN
dtype: float64
>>> b = pd.Series([1, np.nan, 1, np.nan], index=['a', 'b', 'd', 'e'])
>>> b
a    1.0
b    NaN
d    1.0
e    NaN
dtype: float64
>>> a.floordiv(b, fill_value=0)
a    1.0
b    NaN
c    NaN
d    0.0
e    NaN
dtype: float64
pandas.Series.rmod   Series.rmod(other, level=None, fill_value=None, axis=0)[source]
 
Return Modulo of series and other, element-wise (binary operator rmod). Equivalent to other % series, but with support to substitute a fill_value for missing data in either one of the inputs.  Parameters 
 
other:Series or scalar value


fill_value:None or float value, default None (NaN)


Fill existing missing (NaN) values, and any new element needed for successful Series alignment, with this value before computation. If data in both corresponding Series locations is missing the result of filling (at that location) will be missing.  
level:int or name


Broadcast across a level, matching Index values on the passed MultiIndex level.    Returns 
 Series

The result of the operation.      See also  Series.mod

Element-wise Modulo, see Python documentation for more details.    Examples 
>>> a = pd.Series([1, 1, 1, np.nan], index=['a', 'b', 'c', 'd'])
>>> a
a    1.0
b    1.0
c    1.0
d    NaN
dtype: float64
>>> b = pd.Series([1, np.nan, 1, np.nan], index=['a', 'b', 'd', 'e'])
>>> b
a    1.0
b    NaN
d    1.0
e    NaN
dtype: float64
>>> a.mod(b, fill_value=0)
a    0.0
b    NaN
c    NaN
d    0.0
e    NaN
dtype: float64
pandas.Series.rmul   Series.rmul(other, level=None, fill_value=None, axis=0)[source]
 
Return Multiplication of series and other, element-wise (binary operator rmul). Equivalent to other * series, but with support to substitute a fill_value for missing data in either one of the inputs.  Parameters 
 
other:Series or scalar value


fill_value:None or float value, default None (NaN)


Fill existing missing (NaN) values, and any new element needed for successful Series alignment, with this value before computation. If data in both corresponding Series locations is missing the result of filling (at that location) will be missing.  
level:int or name


Broadcast across a level, matching Index values on the passed MultiIndex level.    Returns 
 Series

The result of the operation.      See also  Series.mul

Element-wise Multiplication, see Python documentation for more details.    Examples 
>>> a = pd.Series([1, 1, 1, np.nan], index=['a', 'b', 'c', 'd'])
>>> a
a    1.0
b    1.0
c    1.0
d    NaN
dtype: float64
>>> b = pd.Series([1, np.nan, 1, np.nan], index=['a', 'b', 'd', 'e'])
>>> b
a    1.0
b    NaN
d    1.0
e    NaN
dtype: float64
>>> a.multiply(b, fill_value=0)
a    1.0
b    0.0
c    0.0
d    0.0
e    NaN
dtype: float64
pandas.Series.round   Series.round(decimals=0, *args, **kwargs)[source]
 
Round each value in a Series to the given number of decimals.  Parameters 
 
decimals:int, default 0


Number of decimal places to round to. If decimals is negative, it specifies the number of positions to the left of the decimal point.  *args, **kwargs

Additional arguments and keywords have no effect but might be accepted for compatibility with NumPy.    Returns 
 Series

Rounded values of the Series.      See also  numpy.around

Round values of an np.array.  DataFrame.round

Round values of a DataFrame.    Examples 
>>> s = pd.Series([0.1, 1.3, 2.7])
>>> s.round()
0    0.0
1    1.0
2    3.0
dtype: float64
pandas.Series.rpow   Series.rpow(other, level=None, fill_value=None, axis=0)[source]
 
Return Exponential power of series and other, element-wise (binary operator rpow). Equivalent to other ** series, but with support to substitute a fill_value for missing data in either one of the inputs.  Parameters 
 
other:Series or scalar value


fill_value:None or float value, default None (NaN)


Fill existing missing (NaN) values, and any new element needed for successful Series alignment, with this value before computation. If data in both corresponding Series locations is missing the result of filling (at that location) will be missing.  
level:int or name


Broadcast across a level, matching Index values on the passed MultiIndex level.    Returns 
 Series

The result of the operation.      See also  Series.pow

Element-wise Exponential power, see Python documentation for more details.    Examples 
>>> a = pd.Series([1, 1, 1, np.nan], index=['a', 'b', 'c', 'd'])
>>> a
a    1.0
b    1.0
c    1.0
d    NaN
dtype: float64
>>> b = pd.Series([1, np.nan, 1, np.nan], index=['a', 'b', 'd', 'e'])
>>> b
a    1.0
b    NaN
d    1.0
e    NaN
dtype: float64
>>> a.pow(b, fill_value=0)
a    1.0
b    1.0
c    1.0
d    0.0
e    NaN
dtype: float64
pandas.Series.rsub   Series.rsub(other, level=None, fill_value=None, axis=0)[source]
 
Return Subtraction of series and other, element-wise (binary operator rsub). Equivalent to other - series, but with support to substitute a fill_value for missing data in either one of the inputs.  Parameters 
 
other:Series or scalar value


fill_value:None or float value, default None (NaN)


Fill existing missing (NaN) values, and any new element needed for successful Series alignment, with this value before computation. If data in both corresponding Series locations is missing the result of filling (at that location) will be missing.  
level:int or name


Broadcast across a level, matching Index values on the passed MultiIndex level.    Returns 
 Series

The result of the operation.      See also  Series.sub

Element-wise Subtraction, see Python documentation for more details.    Examples 
>>> a = pd.Series([1, 1, 1, np.nan], index=['a', 'b', 'c', 'd'])
>>> a
a    1.0
b    1.0
c    1.0
d    NaN
dtype: float64
>>> b = pd.Series([1, np.nan, 1, np.nan], index=['a', 'b', 'd', 'e'])
>>> b
a    1.0
b    NaN
d    1.0
e    NaN
dtype: float64
>>> a.subtract(b, fill_value=0)
a    0.0
b    1.0
c    1.0
d   -1.0
e    NaN
dtype: float64
pandas.Series.rtruediv   Series.rtruediv(other, level=None, fill_value=None, axis=0)[source]
 
Return Floating division of series and other, element-wise (binary operator rtruediv). Equivalent to other / series, but with support to substitute a fill_value for missing data in either one of the inputs.  Parameters 
 
other:Series or scalar value


fill_value:None or float value, default None (NaN)


Fill existing missing (NaN) values, and any new element needed for successful Series alignment, with this value before computation. If data in both corresponding Series locations is missing the result of filling (at that location) will be missing.  
level:int or name


Broadcast across a level, matching Index values on the passed MultiIndex level.    Returns 
 Series

The result of the operation.      See also  Series.truediv

Element-wise Floating division, see Python documentation for more details.    Examples 
>>> a = pd.Series([1, 1, 1, np.nan], index=['a', 'b', 'c', 'd'])
>>> a
a    1.0
b    1.0
c    1.0
d    NaN
dtype: float64
>>> b = pd.Series([1, np.nan, 1, np.nan], index=['a', 'b', 'd', 'e'])
>>> b
a    1.0
b    NaN
d    1.0
e    NaN
dtype: float64
>>> a.divide(b, fill_value=0)
a    1.0
b    inf
c    inf
d    0.0
e    NaN
dtype: float64