neulab/docprompting-conala huggingface dataset:
pandas.core.groupby.SeriesGroupBy.value_counts   SeriesGroupBy.value_counts(normalize=False, sort=True, ascending=False, bins=None, dropna=True)[source]
pandas.core.resample.Resampler.__iter__   Resampler.__iter__()[source]
 
Groupby iterator.  Returns 
 Generator yielding sequence of (name, subsetted object)
for each group
pandas.core.resample.Resampler.aggregate   Resampler.aggregate(func=None, *args, **kwargs)[source]
 
Aggregate using one or more operations over the specified axis.  Parameters 
 
func:function, str, list or dict


Function to use for aggregating the data. If a function, must either work when passed a DataFrame or when passed to DataFrame.apply. Accepted combinations are:  function string function name list of functions and/or function names, e.g. [np.sum, 'mean'] dict of axis labels -> functions, function names or list of such.   *args

Positional arguments to pass to func.  **kwargs

Keyword arguments to pass to func.    Returns 
 scalar, Series or DataFrame

The return can be:  scalar : when Series.agg is called with single function Series : when DataFrame.agg is called with a single function DataFrame : when DataFrame.agg is called with several functions  Return scalar, Series or DataFrame.      See also  DataFrame.groupby.aggregate

Aggregate using callable, string, dict, or list of string/callables.  DataFrame.resample.transform

Transforms the Series on each group based on the given function.  DataFrame.aggregate

Aggregate using one or more operations over the specified axis.    Notes agg is an alias for aggregate. Use the alias. Functions that mutate the passed object can produce unexpected behavior or errors and are not supported. See Mutating with User Defined Function (UDF) methods for more details. A passed user-defined-function will be passed a Series for evaluation. Examples 
>>> s = pd.Series([1, 2, 3, 4, 5],
...               index=pd.date_range('20130101', periods=5, freq='s'))
>>> s
2013-01-01 00:00:00    1
2013-01-01 00:00:01    2
2013-01-01 00:00:02    3
2013-01-01 00:00:03    4
2013-01-01 00:00:04    5
Freq: S, dtype: int64
  
>>> r = s.resample('2s')
  
>>> r.agg(np.sum)
2013-01-01 00:00:00    3
2013-01-01 00:00:02    7
2013-01-01 00:00:04    5
Freq: 2S, dtype: int64
  
>>> r.agg(['sum', 'mean', 'max'])
                     sum  mean  max
2013-01-01 00:00:00    3   1.5    2
2013-01-01 00:00:02    7   3.5    4
2013-01-01 00:00:04    5   5.0    5
  
>>> r.agg({'result': lambda x: x.mean() / x.std(),
...        'total': np.sum})
                       result  total
2013-01-01 00:00:00  2.121320      3
2013-01-01 00:00:02  4.949747      7
2013-01-01 00:00:04       NaN      5
  
>>> r.agg(average="mean", total="sum")
                         average  total
2013-01-01 00:00:00      1.5      3
2013-01-01 00:00:02      3.5      7
2013-01-01 00:00:04      5.0      5
pandas.core.resample.Resampler.apply   Resampler.apply(func=None, *args, **kwargs)[source]
 
Aggregate using one or more operations over the specified axis.  Parameters 
 
func:function, str, list or dict


Function to use for aggregating the data. If a function, must either work when passed a DataFrame or when passed to DataFrame.apply. Accepted combinations are:  function string function name list of functions and/or function names, e.g. [np.sum, 'mean'] dict of axis labels -> functions, function names or list of such.   *args

Positional arguments to pass to func.  **kwargs

Keyword arguments to pass to func.    Returns 
 scalar, Series or DataFrame

The return can be:  scalar : when Series.agg is called with single function Series : when DataFrame.agg is called with a single function DataFrame : when DataFrame.agg is called with several functions  Return scalar, Series or DataFrame.      See also  DataFrame.groupby.aggregate

Aggregate using callable, string, dict, or list of string/callables.  DataFrame.resample.transform

Transforms the Series on each group based on the given function.  DataFrame.aggregate

Aggregate using one or more operations over the specified axis.    Notes agg is an alias for aggregate. Use the alias. Functions that mutate the passed object can produce unexpected behavior or errors and are not supported. See Mutating with User Defined Function (UDF) methods for more details. A passed user-defined-function will be passed a Series for evaluation. Examples 
>>> s = pd.Series([1, 2, 3, 4, 5],
...               index=pd.date_range('20130101', periods=5, freq='s'))
>>> s
2013-01-01 00:00:00    1
2013-01-01 00:00:01    2
2013-01-01 00:00:02    3
2013-01-01 00:00:03    4
2013-01-01 00:00:04    5
Freq: S, dtype: int64
  
>>> r = s.resample('2s')
  
>>> r.agg(np.sum)
2013-01-01 00:00:00    3
2013-01-01 00:00:02    7
2013-01-01 00:00:04    5
Freq: 2S, dtype: int64
  
>>> r.agg(['sum', 'mean', 'max'])
                     sum  mean  max
2013-01-01 00:00:00    3   1.5    2
2013-01-01 00:00:02    7   3.5    4
2013-01-01 00:00:04    5   5.0    5
  
>>> r.agg({'result': lambda x: x.mean() / x.std(),
...        'total': np.sum})
                       result  total
2013-01-01 00:00:00  2.121320      3
2013-01-01 00:00:02  4.949747      7
2013-01-01 00:00:04       NaN      5
  
>>> r.agg(average="mean", total="sum")
                         average  total
2013-01-01 00:00:00      1.5      3
2013-01-01 00:00:02      3.5      7
2013-01-01 00:00:04      5.0      5
pandas.core.resample.Resampler.asfreq   Resampler.asfreq(fill_value=None)[source]
 
Return the values at the new freq, essentially a reindex.  Parameters 
 
fill_value:scalar, optional


Value to use for missing values, applied during upsampling (note this does not fill NaNs that already were present).    Returns 
 DataFrame or Series

Values at the specified freq.      See also  Series.asfreq

Convert TimeSeries to specified frequency.  DataFrame.asfreq

Convert TimeSeries to specified frequency.
pandas.core.resample.Resampler.backfill   Resampler.backfill(limit=None)[source]
 
Backward fill the new missing values in the resampled data. In statistics, imputation is the process of replacing missing data with substituted values [1]. When resampling data, missing values may appear (e.g., when the resampling frequency is higher than the original frequency). The backward fill will replace NaN values that appeared in the resampled data with the next value in the original sequence. Missing values that existed in the original data will not be modified.  Parameters 
 
limit:int, optional


Limit of how many values to fill.    Returns 
 Series, DataFrame

An upsampled Series or DataFrame with backward filled NaN values.      See also  bfill

Alias of backfill.  fillna

Fill NaN values using the specified method, which can be ‘backfill’.  nearest

Fill NaN values with nearest neighbor starting from center.  ffill

Forward fill NaN values.  Series.fillna

Fill NaN values in the Series using the specified method, which can be ‘backfill’.  DataFrame.fillna

Fill NaN values in the DataFrame using the specified method, which can be ‘backfill’.    References  1 
https://en.wikipedia.org/wiki/Imputation_(statistics)   Examples Resampling a Series: 
>>> s = pd.Series([1, 2, 3],
...               index=pd.date_range('20180101', periods=3, freq='h'))
>>> s
2018-01-01 00:00:00    1
2018-01-01 01:00:00    2
2018-01-01 02:00:00    3
Freq: H, dtype: int64
  
>>> s.resample('30min').bfill()
2018-01-01 00:00:00    1
2018-01-01 00:30:00    2
2018-01-01 01:00:00    2
2018-01-01 01:30:00    3
2018-01-01 02:00:00    3
Freq: 30T, dtype: int64
  
>>> s.resample('15min').bfill(limit=2)
2018-01-01 00:00:00    1.0
2018-01-01 00:15:00    NaN
2018-01-01 00:30:00    2.0
2018-01-01 00:45:00    2.0
2018-01-01 01:00:00    2.0
2018-01-01 01:15:00    NaN
2018-01-01 01:30:00    3.0
2018-01-01 01:45:00    3.0
2018-01-01 02:00:00    3.0
Freq: 15T, dtype: float64
  Resampling a DataFrame that has missing values: 
>>> df = pd.DataFrame({'a': [2, np.nan, 6], 'b': [1, 3, 5]},
...                   index=pd.date_range('20180101', periods=3,
...                                       freq='h'))
>>> df
                       a  b
2018-01-01 00:00:00  2.0  1
2018-01-01 01:00:00  NaN  3
2018-01-01 02:00:00  6.0  5
  
>>> df.resample('30min').bfill()
                       a  b
2018-01-01 00:00:00  2.0  1
2018-01-01 00:30:00  NaN  3
2018-01-01 01:00:00  NaN  3
2018-01-01 01:30:00  6.0  5
2018-01-01 02:00:00  6.0  5
  
>>> df.resample('15min').bfill(limit=2)
                       a    b
2018-01-01 00:00:00  2.0  1.0
2018-01-01 00:15:00  NaN  NaN
2018-01-01 00:30:00  NaN  3.0
2018-01-01 00:45:00  NaN  3.0
2018-01-01 01:00:00  NaN  3.0
2018-01-01 01:15:00  NaN  NaN
2018-01-01 01:30:00  6.0  5.0
2018-01-01 01:45:00  6.0  5.0
2018-01-01 02:00:00  6.0  5.0
pandas.core.resample.Resampler.bfill   Resampler.bfill(limit=None)[source]
 
Backward fill the new missing values in the resampled data. In statistics, imputation is the process of replacing missing data with substituted values [1]. When resampling data, missing values may appear (e.g., when the resampling frequency is higher than the original frequency). The backward fill will replace NaN values that appeared in the resampled data with the next value in the original sequence. Missing values that existed in the original data will not be modified.  Parameters 
 
limit:int, optional


Limit of how many values to fill.    Returns 
 Series, DataFrame

An upsampled Series or DataFrame with backward filled NaN values.      See also  bfill

Alias of backfill.  fillna

Fill NaN values using the specified method, which can be ‘backfill’.  nearest

Fill NaN values with nearest neighbor starting from center.  ffill

Forward fill NaN values.  Series.fillna

Fill NaN values in the Series using the specified method, which can be ‘backfill’.  DataFrame.fillna

Fill NaN values in the DataFrame using the specified method, which can be ‘backfill’.    References  1 
https://en.wikipedia.org/wiki/Imputation_(statistics)   Examples Resampling a Series: 
>>> s = pd.Series([1, 2, 3],
...               index=pd.date_range('20180101', periods=3, freq='h'))
>>> s
2018-01-01 00:00:00    1
2018-01-01 01:00:00    2
2018-01-01 02:00:00    3
Freq: H, dtype: int64
  
>>> s.resample('30min').bfill()
2018-01-01 00:00:00    1
2018-01-01 00:30:00    2
2018-01-01 01:00:00    2
2018-01-01 01:30:00    3
2018-01-01 02:00:00    3
Freq: 30T, dtype: int64
  
>>> s.resample('15min').bfill(limit=2)
2018-01-01 00:00:00    1.0
2018-01-01 00:15:00    NaN
2018-01-01 00:30:00    2.0
2018-01-01 00:45:00    2.0
2018-01-01 01:00:00    2.0
2018-01-01 01:15:00    NaN
2018-01-01 01:30:00    3.0
2018-01-01 01:45:00    3.0
2018-01-01 02:00:00    3.0
Freq: 15T, dtype: float64
  Resampling a DataFrame that has missing values: 
>>> df = pd.DataFrame({'a': [2, np.nan, 6], 'b': [1, 3, 5]},
...                   index=pd.date_range('20180101', periods=3,
...                                       freq='h'))
>>> df
                       a  b
2018-01-01 00:00:00  2.0  1
2018-01-01 01:00:00  NaN  3
2018-01-01 02:00:00  6.0  5
  
>>> df.resample('30min').bfill()
                       a  b
2018-01-01 00:00:00  2.0  1
2018-01-01 00:30:00  NaN  3
2018-01-01 01:00:00  NaN  3
2018-01-01 01:30:00  6.0  5
2018-01-01 02:00:00  6.0  5
  
>>> df.resample('15min').bfill(limit=2)
                       a    b
2018-01-01 00:00:00  2.0  1.0
2018-01-01 00:15:00  NaN  NaN
2018-01-01 00:30:00  NaN  3.0
2018-01-01 00:45:00  NaN  3.0
2018-01-01 01:00:00  NaN  3.0
2018-01-01 01:15:00  NaN  NaN
2018-01-01 01:30:00  6.0  5.0
2018-01-01 01:45:00  6.0  5.0
2018-01-01 02:00:00  6.0  5.0
pandas.core.resample.Resampler.count   Resampler.count()[source]
 
Compute count of group, excluding missing values.  Returns 
 Series or DataFrame

Count of values within each group.      See also  Series.groupby

Apply a function groupby to a Series.  DataFrame.groupby

Apply a function groupby to each row or column of a DataFrame.
pandas.core.resample.Resampler.ffill   Resampler.ffill(limit=None)[source]
 
Forward fill the values.  Parameters 
 
limit:int, optional


Limit of how many values to fill.    Returns 
 An upsampled Series.
    See also  Series.fillna

Fill NA/NaN values using the specified method.  DataFrame.fillna

Fill NA/NaN values using the specified method.
pandas.core.resample.Resampler.first   Resampler.first(_method='first', min_count=0, *args, **kwargs)[source]
 
Compute first of group values.  Parameters 
 
numeric_only:bool, default False


Include only float, int, boolean columns. If None, will attempt to use everything, then use only numeric data.  
min_count:int, default -1


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.    Returns 
 Series or DataFrame

Computed first of values within each group.
pandas.core.resample.Resampler.get_group   Resampler.get_group(name, obj=None)[source]
 
Construct DataFrame from group with provided name.  Parameters 
 
name:object


The name of the group to get as a DataFrame.  
obj:DataFrame, default None


The DataFrame to take the DataFrame out of. If it is None, the object groupby was called on will be used.    Returns 
 
group:same type as obj
pandas.core.resample.Resampler.groups   propertyResampler.groups
 
Dict {group name -> group labels}.
pandas.core.resample.Resampler.indices   propertyResampler.indices
 
Dict {group name -> group indices}.
pandas.core.resample.Resampler.last   Resampler.last(_method='last', min_count=0, *args, **kwargs)[source]
 
Compute last of group values.  Parameters 
 
numeric_only:bool, default False


Include only float, int, boolean columns. If None, will attempt to use everything, then use only numeric data.  
min_count:int, default -1


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.    Returns 
 Series or DataFrame

Computed last of values within each group.
pandas.core.resample.Resampler.max   Resampler.max(_method='max', min_count=0, *args, **kwargs)[source]
 
Compute max of group values.  Parameters 
 
numeric_only:bool, default False


Include only float, int, boolean columns. If None, will attempt to use everything, then use only numeric data.  
min_count:int, default -1


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.    Returns 
 Series or DataFrame

Computed max of values within each group.
pandas.core.resample.Resampler.mean   Resampler.mean(_method='mean', *args, **kwargs)[source]
 
Compute mean of groups, excluding missing values.  Parameters 
 
numeric_only:bool, default True


Include only float, int, boolean columns. If None, will attempt to use everything, then use only numeric data.  
engine:str, default None


 'cython' : Runs the operation through C-extensions from cython. 'numba' : Runs the operation through JIT compiled code from numba. None : Defaults to 'cython' or globally setting compute.use_numba   New in version 1.4.0.   
engine_kwargs:dict, default None


 For 'cython' engine, there are no accepted engine_kwargs For 'numba' engine, the engine can accept nopython, nogil and parallel dictionary keys. The values must either be True or False. The default engine_kwargs for the 'numba' engine is {{'nopython': True, 'nogil': False, 'parallel': False}}   New in version 1.4.0.     Returns 
 pandas.Series or pandas.DataFrame
    See also  Series.groupby

Apply a function groupby to a Series.  DataFrame.groupby

Apply a function groupby to each row or column of a DataFrame.    Examples 
>>> df = pd.DataFrame({'A': [1, 1, 2, 1, 2],
...                    'B': [np.nan, 2, 3, 4, 5],
...                    'C': [1, 2, 1, 1, 2]}, columns=['A', 'B', 'C'])
  Groupby one column and return the mean of the remaining columns in each group. 
>>> df.groupby('A').mean()
     B         C
A
1  3.0  1.333333
2  4.0  1.500000
  Groupby two columns and return the mean of the remaining column. 
>>> df.groupby(['A', 'B']).mean()
         C
A B
1 2.0  2.0
  4.0  1.0
2 3.0  1.0
  5.0  2.0
  Groupby one column and return the mean of only particular column in the group. 
>>> df.groupby('A')['B'].mean()
A
1    3.0
2    4.0
Name: B, dtype: float64
pandas.core.resample.Resampler.median   Resampler.median(_method='median', *args, **kwargs)[source]
 
Compute median of groups, excluding missing values. For multiple groupings, the result index will be a MultiIndex  Parameters 
 
numeric_only:bool, default True


Include only float, int, boolean columns. If None, will attempt to use everything, then use only numeric data.    Returns 
 Series or DataFrame

Median of values within each group.      See also  Series.groupby

Apply a function groupby to a Series.  DataFrame.groupby

Apply a function groupby to each row or column of a DataFrame.
pandas.core.resample.Resampler.min   Resampler.min(_method='min', min_count=0, *args, **kwargs)[source]
 
Compute min of group values.  Parameters 
 
numeric_only:bool, default False


Include only float, int, boolean columns. If None, will attempt to use everything, then use only numeric data.  
min_count:int, default -1


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.    Returns 
 Series or DataFrame

Computed min of values within each group.
pandas.core.resample.Resampler.nearest   Resampler.nearest(limit=None)[source]
 
Resample by using the nearest value. When resampling data, missing values may appear (e.g., when the resampling frequency is higher than the original frequency). The nearest method will replace NaN values that appeared in the resampled data with the value from the nearest member of the sequence, based on the index value. Missing values that existed in the original data will not be modified. If limit is given, fill only this many values in each direction for each of the original values.  Parameters 
 
limit:int, optional


Limit of how many values to fill.    Returns 
 Series or DataFrame

An upsampled Series or DataFrame with NaN values filled with their nearest value.      See also  backfill

Backward fill the new missing values in the resampled data.  pad

Forward fill NaN values.    Examples 
>>> s = pd.Series([1, 2],
...               index=pd.date_range('20180101',
...                                   periods=2,
...                                   freq='1h'))
>>> s
2018-01-01 00:00:00    1
2018-01-01 01:00:00    2
Freq: H, dtype: int64
  
>>> s.resample('15min').nearest()
2018-01-01 00:00:00    1
2018-01-01 00:15:00    1
2018-01-01 00:30:00    2
2018-01-01 00:45:00    2
2018-01-01 01:00:00    2
Freq: 15T, dtype: int64
  Limit the number of upsampled values imputed by the nearest: 
>>> s.resample('15min').nearest(limit=1)
2018-01-01 00:00:00    1.0
2018-01-01 00:15:00    1.0
2018-01-01 00:30:00    NaN
2018-01-01 00:45:00    2.0
2018-01-01 01:00:00    2.0
Freq: 15T, dtype: float64
pandas.core.resample.Resampler.nunique   Resampler.nunique(_method='nunique')[source]
 
Return number of unique elements in the group.  Returns 
 Series

Number of unique values within each group.
pandas.core.resample.Resampler.ohlc   Resampler.ohlc(_method='ohlc', *args, **kwargs)[source]
 
Compute open, high, low and close values of a group, excluding missing values. For multiple groupings, the result index will be a MultiIndex  Returns 
 DataFrame

Open, high, low and close values within each group.      See also  Series.groupby

Apply a function groupby to a Series.  DataFrame.groupby

Apply a function groupby to each row or column of a DataFrame.
pandas.core.resample.Resampler.pad   Resampler.pad(limit=None)[source]
 
Forward fill the values.  Parameters 
 
limit:int, optional


Limit of how many values to fill.    Returns 
 An upsampled Series.
    See also  Series.fillna

Fill NA/NaN values using the specified method.  DataFrame.fillna

Fill NA/NaN values using the specified method.
pandas.core.resample.Resampler.pipe   Resampler.pipe(func, *args, **kwargs)[source]
 
Apply a function func with arguments to this Resampler object and return the function’s result. Use .pipe when you want to improve readability by chaining together functions that expect Series, DataFrames, GroupBy or Resampler objects. Instead of writing 
>>> h(g(f(df.groupby('group')), arg1=a), arg2=b, arg3=c)  
  You can write 
>>> (df.groupby('group')
...    .pipe(f)
...    .pipe(g, arg1=a)
...    .pipe(h, arg2=b, arg3=c))  
  which is much more readable.  Parameters 
 
func:callable or tuple of (callable, str)


Function to apply to this Resampler object or, alternatively, a (callable, data_keyword) tuple where data_keyword is a string indicating the keyword of callable that expects the Resampler object.  
args:iterable, optional


Positional arguments passed into func.  
kwargs:dict, optional


A dictionary of keyword arguments passed into func.    Returns 
 
object:the return type of func.

    See also  Series.pipe

Apply a function with arguments to a series.  DataFrame.pipe

Apply a function with arguments to a dataframe.  apply

Apply function to each group instead of to the full Resampler object.    Notes See more here Examples 
>>> df = pd.DataFrame({'A': [1, 2, 3, 4]},
...                   index=pd.date_range('2012-08-02', periods=4))
>>> df
            A
2012-08-02  1
2012-08-03  2
2012-08-04  3
2012-08-05  4
  To get the difference between each 2-day period’s maximum and minimum value in one pass, you can do 
>>> df.resample('2D').pipe(lambda x: x.max() - x.min())
            A
2012-08-02  1
2012-08-04  1
pandas.core.resample.Resampler.prod   Resampler.prod(_method='prod', min_count=0, *args, **kwargs)[source]
 
Compute prod of group values.  Parameters 
 
numeric_only:bool, default True


Include only float, int, boolean columns. If None, will attempt to use everything, then use only numeric data.  
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.    Returns 
 Series or DataFrame

Computed prod of values within each group.
pandas.core.resample.Resampler.quantile   Resampler.quantile(q=0.5, **kwargs)[source]
 
Return value at the given quantile.  Parameters 
 
q:float or array-like, default 0.5 (50% quantile)

  Returns 
 DataFrame or Series

Quantile of values within each group.      See also  Series.quantile

Return a series, where the index is q and the values are the quantiles.  DataFrame.quantile

Return a DataFrame, where the columns are the columns of self, and the values are the quantiles.  DataFrameGroupBy.quantile

Return a DataFrame, where the coulmns are groupby columns, and the values are its quantiles.
pandas.core.resample.Resampler.sem   Resampler.sem(_method='sem', *args, **kwargs)[source]
 
Compute standard error of the mean of groups, excluding missing values. For multiple groupings, the result index will be a MultiIndex.  Parameters 
 
ddof:int, default 1


Degrees of freedom.    Returns 
 Series or DataFrame

Standard error of the mean of values within each group.      See also  Series.groupby

Apply a function groupby to a Series.  DataFrame.groupby

Apply a function groupby to each row or column of a DataFrame.
pandas.core.resample.Resampler.size   Resampler.size()[source]
 
Compute group sizes.  Returns 
 DataFrame or Series

Number of rows in each group as a Series if as_index is True or a DataFrame if as_index is False.      See also  Series.groupby

Apply a function groupby to a Series.  DataFrame.groupby

Apply a function groupby to each row or column of a DataFrame.
pandas.core.resample.Resampler.std   Resampler.std(ddof=1, *args, **kwargs)[source]
 
Compute standard deviation of groups, excluding missing values.  Parameters 
 
ddof:int, default 1


Degrees of freedom.    Returns 
 DataFrame or Series

Standard deviation of values within each group.