neulab/docprompting-conala huggingface dataset:
pandas.Series.hist   Series.hist(by=None, ax=None, grid=True, xlabelsize=None, xrot=None, ylabelsize=None, yrot=None, figsize=None, bins=10, backend=None, legend=False, **kwargs)[source]
 
Draw histogram of the input series using matplotlib.  Parameters 
 
by:object, optional


If passed, then used to form histograms for separate groups.  
ax:matplotlib axis object


If not passed, uses gca().  
grid:bool, default True


Whether to show axis grid lines.  
xlabelsize:int, default None


If specified changes the x-axis label size.  
xrot:float, default None


Rotation of x axis labels.  
ylabelsize:int, default None


If specified changes the y-axis label size.  
yrot:float, default None


Rotation of y axis labels.  
figsize:tuple, default None


Figure size in inches by default.  
bins:int or sequence, default 10


Number of histogram bins to be used. If an integer is given, bins + 1 bin edges are calculated and returned. If bins is a sequence, gives bin edges, including left edge of first bin and right edge of last bin. In this case, bins is returned unmodified.  
backend:str, default None


Backend to use instead of the backend specified in the option plotting.backend. For instance, ‘matplotlib’. Alternatively, to specify the plotting.backend for the whole session, set pd.options.plotting.backend.  New in version 1.0.0.   
legend:bool, default False


Whether to show the legend.  New in version 1.1.0.   **kwargs

To be passed to the actual plotting function.    Returns 
 matplotlib.AxesSubplot

A histogram plot.      See also  matplotlib.axes.Axes.hist

Plot a histogram using matplotlib.
pandas.Series.iat   propertySeries.iat
 
Access a single value for a row/column pair by integer position. Similar to iloc, in that both provide integer-based lookups. Use iat if you only need to get or set a single value in a DataFrame or Series.  Raises 
 IndexError

When integer position is out of bounds.      See also  DataFrame.at

Access a single value for a row/column label pair.  DataFrame.loc

Access a group of rows and columns by label(s).  DataFrame.iloc

Access a group of rows and columns by integer position(s).    Examples 
>>> df = pd.DataFrame([[0, 2, 3], [0, 4, 1], [10, 20, 30]],
...                   columns=['A', 'B', 'C'])
>>> df
    A   B   C
0   0   2   3
1   0   4   1
2  10  20  30
  Get value at specified row/column pair 
>>> df.iat[1, 2]
1
  Set value at specified row/column pair 
>>> df.iat[1, 2] = 10
>>> df.iat[1, 2]
10
  Get value within a series 
>>> df.loc[0].iat[1]
2
pandas.Series.idxmax   Series.idxmax(axis=0, skipna=True, *args, **kwargs)[source]
 
Return the row label of the maximum value. If multiple values equal the maximum, the first row label with that value is returned.  Parameters 
 
axis:int, default 0


For compatibility with DataFrame.idxmax. Redundant for application on Series.  
skipna:bool, default True


Exclude NA/null values. If the entire Series is NA, the result will be NA.  *args, **kwargs

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

Label of the maximum value.    Raises 
 ValueError

If the Series is empty.      See also  numpy.argmax

Return indices of the maximum values along the given axis.  DataFrame.idxmax

Return index of first occurrence of maximum over requested axis.  Series.idxmin

Return index label of the first occurrence of minimum of values.    Notes This method is the Series version of ndarray.argmax. This method returns the label of the maximum, while ndarray.argmax returns the position. To get the position, use series.values.argmax(). Examples 
>>> s = pd.Series(data=[1, None, 4, 3, 4],
...               index=['A', 'B', 'C', 'D', 'E'])
>>> s
A    1.0
B    NaN
C    4.0
D    3.0
E    4.0
dtype: float64
  
>>> s.idxmax()
'C'
  If skipna is False and there is an NA value in the data, the function returns nan. 
>>> s.idxmax(skipna=False)
nan
pandas.Series.idxmin   Series.idxmin(axis=0, skipna=True, *args, **kwargs)[source]
 
Return the row label of the minimum value. If multiple values equal the minimum, the first row label with that value is returned.  Parameters 
 
axis:int, default 0


For compatibility with DataFrame.idxmin. Redundant for application on Series.  
skipna:bool, default True


Exclude NA/null values. If the entire Series is NA, the result will be NA.  *args, **kwargs

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

Label of the minimum value.    Raises 
 ValueError

If the Series is empty.      See also  numpy.argmin

Return indices of the minimum values along the given axis.  DataFrame.idxmin

Return index of first occurrence of minimum over requested axis.  Series.idxmax

Return index label of the first occurrence of maximum of values.    Notes This method is the Series version of ndarray.argmin. This method returns the label of the minimum, while ndarray.argmin returns the position. To get the position, use series.values.argmin(). Examples 
>>> s = pd.Series(data=[1, None, 4, 1],
...               index=['A', 'B', 'C', 'D'])
>>> s
A    1.0
B    NaN
C    4.0
D    1.0
dtype: float64
  
>>> s.idxmin()
'A'
  If skipna is False and there is an NA value in the data, the function returns nan. 
>>> s.idxmin(skipna=False)
nan
pandas.Series.iloc   propertySeries.iloc
 
Purely integer-location based indexing for selection by position. .iloc[] is primarily integer position based (from 0 to length-1 of the axis), but may also be used with a boolean array. Allowed inputs are:  An integer, e.g. 5. A list or array of integers, e.g. [4, 3, 0]. A slice object with ints, e.g. 1:7. A boolean array. A callable function with one argument (the calling Series or DataFrame) and that returns valid output for indexing (one of the above). This is useful in method chains, when you don’t have a reference to the calling object, but would like to base your selection on some value.  .iloc will raise IndexError if a requested indexer is out-of-bounds, except slice indexers which allow out-of-bounds indexing (this conforms with python/numpy slice semantics). See more at Selection by Position.  See also  DataFrame.iat

Fast integer location scalar accessor.  DataFrame.loc

Purely label-location based indexer for selection by label.  Series.iloc

Purely integer-location based indexing for selection by position.    Examples 
>>> mydict = [{'a': 1, 'b': 2, 'c': 3, 'd': 4},
...           {'a': 100, 'b': 200, 'c': 300, 'd': 400},
...           {'a': 1000, 'b': 2000, 'c': 3000, 'd': 4000 }]
>>> df = pd.DataFrame(mydict)
>>> df
      a     b     c     d
0     1     2     3     4
1   100   200   300   400
2  1000  2000  3000  4000
  Indexing just the rows With a scalar integer. 
>>> type(df.iloc[0])
<class 'pandas.core.series.Series'>
>>> df.iloc[0]
a    1
b    2
c    3
d    4
Name: 0, dtype: int64
  With a list of integers. 
>>> df.iloc[[0]]
   a  b  c  d
0  1  2  3  4
>>> type(df.iloc[[0]])
<class 'pandas.core.frame.DataFrame'>
  
>>> df.iloc[[0, 1]]
     a    b    c    d
0    1    2    3    4
1  100  200  300  400
  With a slice object. 
>>> df.iloc[:3]
      a     b     c     d
0     1     2     3     4
1   100   200   300   400
2  1000  2000  3000  4000
  With a boolean mask the same length as the index. 
>>> df.iloc[[True, False, True]]
      a     b     c     d
0     1     2     3     4
2  1000  2000  3000  4000
  With a callable, useful in method chains. The x passed to the lambda is the DataFrame being sliced. This selects the rows whose index label even. 
>>> df.iloc[lambda x: x.index % 2 == 0]
      a     b     c     d
0     1     2     3     4
2  1000  2000  3000  4000
  Indexing both axes You can mix the indexer types for the index and columns. Use : to select the entire axis. With scalar integers. 
>>> df.iloc[0, 1]
2
  With lists of integers. 
>>> df.iloc[[0, 2], [1, 3]]
      b     d
0     2     4
2  2000  4000
  With slice objects. 
>>> df.iloc[1:3, 0:3]
      a     b     c
1   100   200   300
2  1000  2000  3000
  With a boolean array whose length matches the columns. 
>>> df.iloc[:, [True, False, True, False]]
      a     c
0     1     3
1   100   300
2  1000  3000
  With a callable function that expects the Series or DataFrame. 
>>> df.iloc[:, lambda df: [0, 2]]
      a     c
0     1     3
1   100   300
2  1000  3000
pandas.Series.index   Series.index
 
The index (axis labels) of the Series.
pandas.Series.infer_objects   Series.infer_objects()[source]
 
Attempt to infer better dtypes for object columns. Attempts soft conversion of object-dtyped columns, leaving non-object and unconvertible columns unchanged. The inference rules are the same as during normal Series/DataFrame construction.  Returns 
 
converted:same type as input object

    See also  to_datetime

Convert argument to datetime.  to_timedelta

Convert argument to timedelta.  to_numeric

Convert argument to numeric type.  convert_dtypes

Convert argument to best possible dtype.    Examples 
>>> df = pd.DataFrame({"A": ["a", 1, 2, 3]})
>>> df = df.iloc[1:]
>>> df
   A
1  1
2  2
3  3
  
>>> df.dtypes
A    object
dtype: object
  
>>> df.infer_objects().dtypes
A    int64
dtype: object
pandas.Series.is_monotonic   propertySeries.is_monotonic
 
Return boolean if values in the object are monotonic_increasing.  Returns 
 bool
pandas.Series.is_monotonic_decreasing   propertySeries.is_monotonic_decreasing
 
Return boolean if values in the object are monotonic_decreasing.  Returns 
 bool
pandas.Series.is_monotonic_increasing   propertySeries.is_monotonic_increasing
 
Alias for is_monotonic.
pandas.Series.is_unique   propertySeries.is_unique
 
Return boolean if values in the object are unique.  Returns 
 bool
pandas.Series.isin   Series.isin(values)[source]
 
Whether elements in Series are contained in values. Return a boolean Series showing whether each element in the Series matches an element in the passed sequence of values exactly.  Parameters 
 
values:set or list-like


The sequence of values to test. Passing in a single string will raise a TypeError. Instead, turn a single string into a list of one element.    Returns 
 Series

Series of booleans indicating if each element is in values.    Raises 
 TypeError

 If values is a string       See also  DataFrame.isin

Equivalent method on DataFrame.    Examples 
>>> s = pd.Series(['lama', 'cow', 'lama', 'beetle', 'lama',
...                'hippo'], name='animal')
>>> s.isin(['cow', 'lama'])
0     True
1     True
2     True
3    False
4     True
5    False
Name: animal, dtype: bool
  To invert the boolean values, use the ~ operator: 
>>> ~s.isin(['cow', 'lama'])
0    False
1    False
2    False
3     True
4    False
5     True
Name: animal, dtype: bool
  Passing a single string as s.isin('lama') will raise an error. Use a list of one element instead: 
>>> s.isin(['lama'])
0     True
1    False
2     True
3    False
4     True
5    False
Name: animal, dtype: bool
  Strings and integers are distinct and are therefore not comparable: 
>>> pd.Series([1]).isin(['1'])
0    False
dtype: bool
>>> pd.Series([1.1]).isin(['1.1'])
0    False
dtype: bool
pandas.Series.isna   Series.isna()[source]
 
Detect missing values. Return a boolean same-sized object indicating if the values are NA. NA values, such as None or numpy.NaN, gets mapped to True values. Everything else gets 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 
 Series

Mask of bool values for each element in Series that indicates whether an element is an NA value.      See also  Series.isnull

Alias of isna.  Series.notna

Boolean inverse of isna.  Series.dropna

Omit axes labels with missing values.  isna

Top-level isna.    Examples Show which entries in a DataFrame are NA. 
>>> df = pd.DataFrame(dict(age=[5, 6, np.NaN],
...                    born=[pd.NaT, pd.Timestamp('1939-05-27'),
...                          pd.Timestamp('1940-04-25')],
...                    name=['Alfred', 'Batman', ''],
...                    toy=[None, 'Batmobile', 'Joker']))
>>> df
   age       born    name        toy
0  5.0        NaT  Alfred       None
1  6.0 1939-05-27  Batman  Batmobile
2  NaN 1940-04-25              Joker
  
>>> df.isna()
     age   born   name    toy
0  False   True  False   True
1  False  False  False  False
2   True  False  False  False
  Show which entries in a Series are NA. 
>>> ser = pd.Series([5, 6, np.NaN])
>>> ser
0    5.0
1    6.0
2    NaN
dtype: float64
  
>>> ser.isna()
0    False
1    False
2     True
dtype: bool
pandas.Series.isnull   Series.isnull()[source]
 
Series.isnull is an alias for Series.isna. Detect missing values. Return a boolean same-sized object indicating if the values are NA. NA values, such as None or numpy.NaN, gets mapped to True values. Everything else gets 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 
 Series

Mask of bool values for each element in Series that indicates whether an element is an NA value.      See also  Series.isnull

Alias of isna.  Series.notna

Boolean inverse of isna.  Series.dropna

Omit axes labels with missing values.  isna

Top-level isna.    Examples Show which entries in a DataFrame are NA. 
>>> df = pd.DataFrame(dict(age=[5, 6, np.NaN],
...                    born=[pd.NaT, pd.Timestamp('1939-05-27'),
...                          pd.Timestamp('1940-04-25')],
...                    name=['Alfred', 'Batman', ''],
...                    toy=[None, 'Batmobile', 'Joker']))
>>> df
   age       born    name        toy
0  5.0        NaT  Alfred       None
1  6.0 1939-05-27  Batman  Batmobile
2  NaN 1940-04-25              Joker
  
>>> df.isna()
     age   born   name    toy
0  False   True  False   True
1  False  False  False  False
2   True  False  False  False
  Show which entries in a Series are NA. 
>>> ser = pd.Series([5, 6, np.NaN])
>>> ser
0    5.0
1    6.0
2    NaN
dtype: float64
  
>>> ser.isna()
0    False
1    False
2     True
dtype: bool
pandas.Series.item   Series.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.Series.items   Series.items()[source]
 
Lazily iterate over (index, value) tuples. This method returns an iterable tuple (index, value). This is convenient if you want to create a lazy iterator.  Returns 
 iterable

Iterable of tuples containing the (index, value) pairs from a Series.      See also  DataFrame.items

Iterate over (column name, Series) pairs.  DataFrame.iterrows

Iterate over DataFrame rows as (index, Series) pairs.    Examples 
>>> s = pd.Series(['A', 'B', 'C'])
>>> for index, value in s.items():
...     print(f"Index : {index}, Value : {value}")
Index : 0, Value : A
Index : 1, Value : B
Index : 2, Value : C
pandas.Series.iteritems   Series.iteritems()[source]
 
Lazily iterate over (index, value) tuples. This method returns an iterable tuple (index, value). This is convenient if you want to create a lazy iterator.  Returns 
 iterable

Iterable of tuples containing the (index, value) pairs from a Series.      See also  DataFrame.items

Iterate over (column name, Series) pairs.  DataFrame.iterrows

Iterate over DataFrame rows as (index, Series) pairs.    Examples 
>>> s = pd.Series(['A', 'B', 'C'])
>>> for index, value in s.items():
...     print(f"Index : {index}, Value : {value}")
Index : 0, Value : A
Index : 1, Value : B
Index : 2, Value : C
pandas.Series.keys   Series.keys()[source]
 
Return alias for index.  Returns 
 Index

Index of the Series.
pandas.Series.kurt   Series.kurt(axis=NoDefault.no_default, skipna=True, level=None, numeric_only=None, **kwargs)[source]
 
Return unbiased kurtosis over requested axis. Kurtosis obtained using Fisher’s definition of kurtosis (kurtosis of normal == 0.0). Normalized by N-1.  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.  **kwargs

Additional keyword arguments to be passed to the function.    Returns 
 scalar or Series (if level specified)
pandas.Series.kurtosis   Series.kurtosis(axis=NoDefault.no_default, skipna=True, level=None, numeric_only=None, **kwargs)[source]
 
Return unbiased kurtosis over requested axis. Kurtosis obtained using Fisher’s definition of kurtosis (kurtosis of normal == 0.0). Normalized by N-1.  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.  **kwargs

Additional keyword arguments to be passed to the function.    Returns 
 scalar or Series (if level specified)
pandas.Series.last   Series.last(offset)[source]
 
Select final periods of time series data based on a date offset. For a DataFrame with a sorted DatetimeIndex, this function selects the last few rows based on a date offset.  Parameters 
 
offset:str, DateOffset, dateutil.relativedelta


The offset length of the data that will be selected. For instance, ‘3D’ will display all the rows having their index within the last 3 days.    Returns 
 Series or DataFrame

A subset of the caller.    Raises 
 TypeError

If the index is not a DatetimeIndex      See also  first

Select initial periods of time series based on a date offset.  at_time

Select values at a particular time of the day.  between_time

Select values between particular times of the day.    Examples 
>>> i = pd.date_range('2018-04-09', periods=4, freq='2D')
>>> ts = pd.DataFrame({'A': [1, 2, 3, 4]}, index=i)
>>> ts
            A
2018-04-09  1
2018-04-11  2
2018-04-13  3
2018-04-15  4
  Get the rows for the last 3 days: 
>>> ts.last('3D')
            A
2018-04-13  3
2018-04-15  4
  Notice the data for 3 last calendar days were returned, not the last 3 observed days in the dataset, and therefore data for 2018-04-11 was not returned.
pandas.Series.last_valid_index   Series.last_valid_index()[source]
 
Return index for last non-NA value or None, if no NA value is found.  Returns 
 
scalar:type of index

   Notes If all elements are non-NA/null, returns None. Also returns None for empty Series/DataFrame.
pandas.Series.le   Series.le(other, level=None, fill_value=None, axis=0)[source]
 
Return Less than or equal to of series and other, element-wise (binary operator le). Equivalent to series <= other, 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.     Examples 
>>> a = pd.Series([1, 1, 1, np.nan, 1], index=['a', 'b', 'c', 'd', 'e'])
>>> a
a    1.0
b    1.0
c    1.0
d    NaN
e    1.0
dtype: float64
>>> b = pd.Series([0, 1, 2, np.nan, 1], index=['a', 'b', 'c', 'd', 'f'])
>>> b
a    0.0
b    1.0
c    2.0
d    NaN
f    1.0
dtype: float64
>>> a.le(b, fill_value=0)
a    False
b     True
c     True
d    False
e    False
f     True
dtype: bool
pandas.Series.lt   Series.lt(other, level=None, fill_value=None, axis=0)[source]
 
Return Less than of series and other, element-wise (binary operator lt). Equivalent to series < other, 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.     Examples 
>>> a = pd.Series([1, 1, 1, np.nan, 1], index=['a', 'b', 'c', 'd', 'e'])
>>> a
a    1.0
b    1.0
c    1.0
d    NaN
e    1.0
dtype: float64
>>> b = pd.Series([0, 1, 2, np.nan, 1], index=['a', 'b', 'c', 'd', 'f'])
>>> b
a    0.0
b    1.0
c    2.0
d    NaN
f    1.0
dtype: float64
>>> a.lt(b, fill_value=0)
a    False
b    False
c     True
d    False
e    False
f     True
dtype: bool
pandas.Series.mad   Series.mad(axis=None, skipna=True, level=None)[source]
 
Return the mean absolute deviation 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.    Returns 
 scalar or Series (if level specified)
pandas.Series.map   Series.map(arg, na_action=None)[source]
 
Map values of Series according to an input mapping or function. Used for substituting each value in a Series with another value, that may be derived from a function, a dict or a Series.  Parameters 
 
arg:function, collections.abc.Mapping subclass or Series


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


If ‘ignore’, propagate NaN values, without passing them to the mapping correspondence.    Returns 
 Series

Same index as caller.      See also  Series.apply

For applying more complex functions on a Series.  DataFrame.apply

Apply a function row-/column-wise.  DataFrame.applymap

Apply a function elementwise on a whole DataFrame.    Notes When arg is a dictionary, values in Series that are not in the dictionary (as keys) are converted to NaN. However, if the dictionary is a dict subclass that defines __missing__ (i.e. provides a method for default values), then this default is used rather than NaN. Examples 
>>> s = pd.Series(['cat', 'dog', np.nan, 'rabbit'])
>>> s
0      cat
1      dog
2      NaN
3   rabbit
dtype: object
  map accepts a dict or a Series. Values that are not found in the dict are converted to NaN, unless the dict has a default value (e.g. defaultdict): 
>>> s.map({'cat': 'kitten', 'dog': 'puppy'})
0   kitten
1    puppy
2      NaN
3      NaN
dtype: object
  It also accepts a function: 
>>> s.map('I am a {}'.format)
0       I am a cat
1       I am a dog
2       I am a nan
3    I am a rabbit
dtype: object
  To avoid applying the function to missing values (and keep them as NaN) na_action='ignore' can be used: 
>>> s.map('I am a {}'.format, na_action='ignore')
0     I am a cat
1     I am a dog
2            NaN
3  I am a rabbit
dtype: object