neulab/docprompting-conala huggingface dataset:
pandas.Series.array   propertySeries.array
 
The ExtensionArray of the data backing this Series or Index.  Returns 
 ExtensionArray

An ExtensionArray of the values stored within. For extension types, this is the actual array. For NumPy native types, this is a thin (no copy) wrapper around numpy.ndarray. .array differs .values which may require converting the data to a different form.      See also  Index.to_numpy

Similar method that always returns a NumPy array.  Series.to_numpy

Similar method that always returns a NumPy array.    Notes This table lays out the different array types for each extension dtype within pandas.       
dtype array type    
category Categorical  
period PeriodArray  
interval IntervalArray  
IntegerNA IntegerArray  
string StringArray  
boolean BooleanArray  
datetime64[ns, tz] DatetimeArray    For any 3rd-party extension types, the array type will be an ExtensionArray. For all remaining dtypes .array will be a arrays.NumpyExtensionArray wrapping the actual ndarray stored within. If you absolutely need a NumPy array (possibly with copying / coercing data), then use Series.to_numpy() instead. Examples For regular NumPy types like int, and float, a PandasArray is returned. 
>>> pd.Series([1, 2, 3]).array
<PandasArray>
[1, 2, 3]
Length: 3, dtype: int64
  For extension types, like Categorical, the actual ExtensionArray is returned 
>>> ser = pd.Series(pd.Categorical(['a', 'b', 'a']))
>>> ser.array
['a', 'b', 'a']
Categories (2, object): ['a', 'b']
pandas.Series.asfreq   Series.asfreq(freq, method=None, how=None, normalize=False, fill_value=None)[source]
 
Convert time series to specified frequency. Returns the original data conformed to a new index with the specified frequency. If the index of this Series is a PeriodIndex, the new index is the result of transforming the original index with PeriodIndex.asfreq (so the original index will map one-to-one to the new index). Otherwise, the new index will be equivalent to pd.date_range(start, end,
freq=freq) where start and end are, respectively, the first and last entries in the original index (see pandas.date_range()). The values corresponding to any timesteps in the new index which were not present in the original index will be null (NaN), unless a method for filling such unknowns is provided (see the method parameter below). The resample() method is more appropriate if an operation on each group of timesteps (such as an aggregate) is necessary to represent the data at the new frequency.  Parameters 
 
freq:DateOffset or str


Frequency DateOffset or string.  
method:{‘backfill’/’bfill’, ‘pad’/’ffill’}, default None


Method to use for filling holes in reindexed Series (note this does not fill NaNs that already were present):  ‘pad’ / ‘ffill’: propagate last valid observation forward to next valid ‘backfill’ / ‘bfill’: use NEXT valid observation to fill.   
how:{‘start’, ‘end’}, default end


For PeriodIndex only (see PeriodIndex.asfreq).  
normalize:bool, default False


Whether to reset output index to midnight.  
fill_value:scalar, optional


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

Series object reindexed to the specified frequency.      See also  reindex

Conform DataFrame to new index with optional filling logic.    Notes To learn more about the frequency strings, please see this link. Examples Start by creating a series with 4 one minute timestamps. 
>>> index = pd.date_range('1/1/2000', periods=4, freq='T')
>>> series = pd.Series([0.0, None, 2.0, 3.0], index=index)
>>> df = pd.DataFrame({'s': series})
>>> df
                       s
2000-01-01 00:00:00    0.0
2000-01-01 00:01:00    NaN
2000-01-01 00:02:00    2.0
2000-01-01 00:03:00    3.0
  Upsample the series into 30 second bins. 
>>> df.asfreq(freq='30S')
                       s
2000-01-01 00:00:00    0.0
2000-01-01 00:00:30    NaN
2000-01-01 00:01:00    NaN
2000-01-01 00:01:30    NaN
2000-01-01 00:02:00    2.0
2000-01-01 00:02:30    NaN
2000-01-01 00:03:00    3.0
  Upsample again, providing a fill value. 
>>> df.asfreq(freq='30S', fill_value=9.0)
                       s
2000-01-01 00:00:00    0.0
2000-01-01 00:00:30    9.0
2000-01-01 00:01:00    NaN
2000-01-01 00:01:30    9.0
2000-01-01 00:02:00    2.0
2000-01-01 00:02:30    9.0
2000-01-01 00:03:00    3.0
  Upsample again, providing a method. 
>>> df.asfreq(freq='30S', method='bfill')
                       s
2000-01-01 00:00:00    0.0
2000-01-01 00:00:30    NaN
2000-01-01 00:01:00    NaN
2000-01-01 00:01:30    2.0
2000-01-01 00:02:00    2.0
2000-01-01 00:02:30    3.0
2000-01-01 00:03:00    3.0
pandas.Series.asof   Series.asof(where, subset=None)[source]
 
Return the last row(s) without any NaNs before where. The last row (for each element in where, if list) without any NaN is taken. In case of a DataFrame, the last row without NaN considering only the subset of columns (if not None) If there is no good value, NaN is returned for a Series or a Series of NaN values for a DataFrame  Parameters 
 
where:date or array-like of dates


Date(s) before which the last row(s) are returned.  
subset:str or array-like of str, default None


For DataFrame, if not None, only use these columns to check for NaNs.    Returns 
 scalar, Series, or DataFrame

The return can be:  scalar : when self is a Series and where is a scalar Series: when self is a Series and where is an array-like, or when self is a DataFrame and where is a scalar DataFrame : when self is a DataFrame and where is an array-like  Return scalar, Series, or DataFrame.      See also  merge_asof

Perform an asof merge. Similar to left join.    Notes Dates are assumed to be sorted. Raises if this is not the case. Examples A Series and a scalar where. 
>>> s = pd.Series([1, 2, np.nan, 4], index=[10, 20, 30, 40])
>>> s
10    1.0
20    2.0
30    NaN
40    4.0
dtype: float64
  
>>> s.asof(20)
2.0
  For a sequence where, a Series is returned. The first value is NaN, because the first element of where is before the first index value. 
>>> s.asof([5, 20])
5     NaN
20    2.0
dtype: float64
  Missing values are not considered. The following is 2.0, not NaN, even though NaN is at the index location for 30. 
>>> s.asof(30)
2.0
  Take all columns into consideration 
>>> df = pd.DataFrame({'a': [10, 20, 30, 40, 50],
...                    'b': [None, None, None, None, 500]},
...                   index=pd.DatetimeIndex(['2018-02-27 09:01:00',
...                                           '2018-02-27 09:02:00',
...                                           '2018-02-27 09:03:00',
...                                           '2018-02-27 09:04:00',
...                                           '2018-02-27 09:05:00']))
>>> df.asof(pd.DatetimeIndex(['2018-02-27 09:03:30',
...                           '2018-02-27 09:04:30']))
                      a   b
2018-02-27 09:03:30 NaN NaN
2018-02-27 09:04:30 NaN NaN
  Take a single column into consideration 
>>> df.asof(pd.DatetimeIndex(['2018-02-27 09:03:30',
...                           '2018-02-27 09:04:30']),
...         subset=['a'])
                         a   b
2018-02-27 09:03:30   30.0 NaN
2018-02-27 09:04:30   40.0 NaN
pandas.Series.astype   Series.astype(dtype, copy=True, errors='raise')[source]
 
Cast a pandas object to a specified dtype dtype.  Parameters 
 
dtype:data type, or dict of column name -> data type


Use a numpy.dtype or Python type to cast entire pandas object to the same type. Alternatively, use {col: dtype, …}, where col is a column label and dtype is a numpy.dtype or Python type to cast one or more of the DataFrame’s columns to column-specific types.  
copy:bool, default True


Return a copy when copy=True (be very careful setting copy=False as changes to values then may propagate to other pandas objects).  
errors:{‘raise’, ‘ignore’}, default ‘raise’


Control raising of exceptions on invalid data for provided dtype.  raise : allow exceptions to be raised ignore : suppress exceptions. On error return original object.     Returns 
 
casted:same type as caller

    See also  to_datetime

Convert argument to datetime.  to_timedelta

Convert argument to timedelta.  to_numeric

Convert argument to a numeric type.  numpy.ndarray.astype

Cast a numpy array to a specified type.    Notes  Deprecated since version 1.3.0: Using astype to convert from timezone-naive dtype to timezone-aware dtype is deprecated and will raise in a future version. Use Series.dt.tz_localize() instead.  Examples Create a DataFrame: 
>>> d = {'col1': [1, 2], 'col2': [3, 4]}
>>> df = pd.DataFrame(data=d)
>>> df.dtypes
col1    int64
col2    int64
dtype: object
  Cast all columns to int32: 
>>> df.astype('int32').dtypes
col1    int32
col2    int32
dtype: object
  Cast col1 to int32 using a dictionary: 
>>> df.astype({'col1': 'int32'}).dtypes
col1    int32
col2    int64
dtype: object
  Create a series: 
>>> ser = pd.Series([1, 2], dtype='int32')
>>> ser
0    1
1    2
dtype: int32
>>> ser.astype('int64')
0    1
1    2
dtype: int64
  Convert to categorical type: 
>>> ser.astype('category')
0    1
1    2
dtype: category
Categories (2, int64): [1, 2]
  Convert to ordered categorical type with custom ordering: 
>>> from pandas.api.types import CategoricalDtype
>>> cat_dtype = CategoricalDtype(
...     categories=[2, 1], ordered=True)
>>> ser.astype(cat_dtype)
0    1
1    2
dtype: category
Categories (2, int64): [2 < 1]
  Note that using copy=False and changing data on a new pandas object may propagate changes: 
>>> s1 = pd.Series([1, 2])
>>> s2 = s1.astype('int64', copy=False)
>>> s2[0] = 10
>>> s1  # note that s1[0] has changed too
0    10
1     2
dtype: int64
  Create a series of dates: 
>>> ser_date = pd.Series(pd.date_range('20200101', periods=3))
>>> ser_date
0   2020-01-01
1   2020-01-02
2   2020-01-03
dtype: datetime64[ns]
pandas.Series.at   propertySeries.at
 
Access a single value for a row/column label pair. Similar to loc, in that both provide label-based lookups. Use at if you only need to get or set a single value in a DataFrame or Series.  Raises 
 KeyError

If ‘label’ does not exist in DataFrame.      See also  DataFrame.iat

Access a single value for a row/column pair by integer position.  DataFrame.loc

Access a group of rows and columns by label(s).  Series.at

Access a single value using a label.    Examples 
>>> df = pd.DataFrame([[0, 2, 3], [0, 4, 1], [10, 20, 30]],
...                   index=[4, 5, 6], columns=['A', 'B', 'C'])
>>> df
    A   B   C
4   0   2   3
5   0   4   1
6  10  20  30
  Get value at specified row/column pair 
>>> df.at[4, 'B']
2
  Set value at specified row/column pair 
>>> df.at[4, 'B'] = 10
>>> df.at[4, 'B']
10
  Get value within a Series 
>>> df.loc[5].at['B']
4
pandas.Series.at_time   Series.at_time(time, asof=False, axis=None)[source]
 
Select values at particular time of day (e.g., 9:30AM).  Parameters 
 
time:datetime.time or str


axis:{0 or ‘index’, 1 or ‘columns’}, default 0

  Returns 
 Series or DataFrame
  Raises 
 TypeError

If the index is not a DatetimeIndex      See also  between_time

Select values between particular times of the day.  first

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

Select final periods of time series based on a date offset.  DatetimeIndex.indexer_at_time

Get just the index locations for values at particular time of the day.    Examples 
>>> i = pd.date_range('2018-04-09', periods=4, freq='12H')
>>> ts = pd.DataFrame({'A': [1, 2, 3, 4]}, index=i)
>>> ts
                     A
2018-04-09 00:00:00  1
2018-04-09 12:00:00  2
2018-04-10 00:00:00  3
2018-04-10 12:00:00  4
  
>>> ts.at_time('12:00')
                     A
2018-04-09 12:00:00  2
2018-04-10 12:00:00  4
pandas.Series.attrs   propertySeries.attrs
 
Dictionary of global attributes of this dataset.  Warning attrs is experimental and may change without warning.   See also  DataFrame.flags

Global flags applying to this object.
pandas.Series.autocorr   Series.autocorr(lag=1)[source]
 
Compute the lag-N autocorrelation. This method computes the Pearson correlation between the Series and its shifted self.  Parameters 
 
lag:int, default 1


Number of lags to apply before performing autocorrelation.    Returns 
 float

The Pearson correlation between self and self.shift(lag).      See also  Series.corr

Compute the correlation between two Series.  Series.shift

Shift index by desired number of periods.  DataFrame.corr

Compute pairwise correlation of columns.  DataFrame.corrwith

Compute pairwise correlation between rows or columns of two DataFrame objects.    Notes If the Pearson correlation is not well defined return ‘NaN’. Examples 
>>> s = pd.Series([0.25, 0.5, 0.2, -0.05])
>>> s.autocorr()  
0.10355...
>>> s.autocorr(lag=2)  
-0.99999...
  If the Pearson correlation is not well defined, then ‘NaN’ is returned. 
>>> s = pd.Series([1, 0, 0, 0])
>>> s.autocorr()
nan
pandas.Series.axes   propertySeries.axes
 
Return a list of the row axis labels.
pandas.Series.backfill   Series.backfill(axis=None, inplace=False, limit=None, downcast=None)[source]
 
Synonym for DataFrame.fillna() with method='bfill'.  Returns 
 Series/DataFrame or None

Object with missing values filled or None if inplace=True.
pandas.Series.between   Series.between(left, right, inclusive='both')[source]
 
Return boolean Series equivalent to left <= series <= right. This function returns a boolean vector containing True wherever the corresponding Series element is between the boundary values left and right. NA values are treated as False.  Parameters 
 
left:scalar or list-like


Left boundary.  
right:scalar or list-like


Right boundary.  
inclusive:{“both”, “neither”, “left”, “right”}


Include boundaries. Whether to set each bound as closed or open.  Changed in version 1.3.0.     Returns 
 Series

Series representing whether each element is between left and right (inclusive).      See also  Series.gt

Greater than of series and other.  Series.lt

Less than of series and other.    Notes This function is equivalent to (left <= ser) & (ser <= right) Examples 
>>> s = pd.Series([2, 0, 4, 8, np.nan])
  Boundary values are included by default: 
>>> s.between(1, 4)
0     True
1    False
2     True
3    False
4    False
dtype: bool
  With inclusive set to "neither" boundary values are excluded: 
>>> s.between(1, 4, inclusive="neither")
0     True
1    False
2    False
3    False
4    False
dtype: bool
  left and right can be any scalar value: 
>>> s = pd.Series(['Alice', 'Bob', 'Carol', 'Eve'])
>>> s.between('Anna', 'Daniel')
0    False
1     True
2     True
3    False
dtype: bool
pandas.Series.between_time   Series.between_time(start_time, end_time, include_start=NoDefault.no_default, include_end=NoDefault.no_default, inclusive=None, axis=None)[source]
 
Select values between particular times of the day (e.g., 9:00-9:30 AM). By setting start_time to be later than end_time, you can get the times that are not between the two times.  Parameters 
 
start_time:datetime.time or str


Initial time as a time filter limit.  
end_time:datetime.time or str


End time as a time filter limit.  
include_start:bool, default True


Whether the start time needs to be included in the result.  Deprecated since version 1.4.0: Arguments include_start and include_end have been deprecated to standardize boundary inputs. Use inclusive instead, to set each bound as closed or open.   
include_end:bool, default True


Whether the end time needs to be included in the result.  Deprecated since version 1.4.0: Arguments include_start and include_end have been deprecated to standardize boundary inputs. Use inclusive instead, to set each bound as closed or open.   
inclusive:{“both”, “neither”, “left”, “right”}, default “both”


Include boundaries; whether to set each bound as closed or open.  
axis:{0 or ‘index’, 1 or ‘columns’}, default 0


Determine range time on index or columns value.    Returns 
 Series or DataFrame

Data from the original object filtered to the specified dates range.    Raises 
 TypeError

If the index is not a DatetimeIndex      See also  at_time

Select values at a particular time of the day.  first

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

Select final periods of time series based on a date offset.  DatetimeIndex.indexer_between_time

Get just the index locations for values between particular times of the day.    Examples 
>>> i = pd.date_range('2018-04-09', periods=4, freq='1D20min')
>>> ts = pd.DataFrame({'A': [1, 2, 3, 4]}, index=i)
>>> ts
                     A
2018-04-09 00:00:00  1
2018-04-10 00:20:00  2
2018-04-11 00:40:00  3
2018-04-12 01:00:00  4
  
>>> ts.between_time('0:15', '0:45')
                     A
2018-04-10 00:20:00  2
2018-04-11 00:40:00  3
  You get the times that are not between two times by setting start_time later than end_time: 
>>> ts.between_time('0:45', '0:15')
                     A
2018-04-09 00:00:00  1
2018-04-12 01:00:00  4
pandas.Series.bfill   Series.bfill(axis=None, inplace=False, limit=None, downcast=None)[source]
 
Synonym for DataFrame.fillna() with method='bfill'.  Returns 
 Series/DataFrame or None

Object with missing values filled or None if inplace=True.
pandas.Series.bool   Series.bool()[source]
 
Return the bool of a single element Series or DataFrame. This must be a boolean scalar value, either True or False. It will raise a ValueError if the Series or DataFrame does not have exactly 1 element, or that element is not boolean (integer values 0 and 1 will also raise an exception).  Returns 
 bool

The value in the Series or DataFrame.      See also  Series.astype

Change the data type of a Series, including to boolean.  DataFrame.astype

Change the data type of a DataFrame, including to boolean.  numpy.bool_

NumPy boolean data type, used by pandas for boolean values.    Examples The method will only work for single element objects with a boolean value: 
>>> pd.Series([True]).bool()
True
>>> pd.Series([False]).bool()
False
  
>>> pd.DataFrame({'col': [True]}).bool()
True
>>> pd.DataFrame({'col': [False]}).bool()
False
pandas.Series.cat   Series.cat()[source]
 
Accessor object for categorical properties of the Series values. Be aware that assigning to categories is a inplace operation, while all methods return new categorical data per default (but can be called with inplace=True).  Parameters 
 
data:Series or CategoricalIndex

   Examples 
>>> s = pd.Series(list("abbccc")).astype("category")
>>> s
0    a
1    b
2    b
3    c
4    c
5    c
dtype: category
Categories (3, object): ['a', 'b', 'c']
  
>>> s.cat.categories
Index(['a', 'b', 'c'], dtype='object')
  
>>> s.cat.rename_categories(list("cba"))
0    c
1    b
2    b
3    a
4    a
5    a
dtype: category
Categories (3, object): ['c', 'b', 'a']
  
>>> s.cat.reorder_categories(list("cba"))
0    a
1    b
2    b
3    c
4    c
5    c
dtype: category
Categories (3, object): ['c', 'b', 'a']
  
>>> s.cat.add_categories(["d", "e"])
0    a
1    b
2    b
3    c
4    c
5    c
dtype: category
Categories (5, object): ['a', 'b', 'c', 'd', 'e']
  
>>> s.cat.remove_categories(["a", "c"])
0    NaN
1      b
2      b
3    NaN
4    NaN
5    NaN
dtype: category
Categories (1, object): ['b']
  
>>> s1 = s.cat.add_categories(["d", "e"])
>>> s1.cat.remove_unused_categories()
0    a
1    b
2    b
3    c
4    c
5    c
dtype: category
Categories (3, object): ['a', 'b', 'c']
  
>>> s.cat.set_categories(list("abcde"))
0    a
1    b
2    b
3    c
4    c
5    c
dtype: category
Categories (5, object): ['a', 'b', 'c', 'd', 'e']
  
>>> s.cat.as_ordered()
0    a
1    b
2    b
3    c
4    c
5    c
dtype: category
Categories (3, object): ['a' < 'b' < 'c']
  
>>> s.cat.as_unordered()
0    a
1    b
2    b
3    c
4    c
5    c
dtype: category
Categories (3, object): ['a', 'b', 'c']
pandas.Series.cat.add_categories   Series.cat.add_categories(*args, **kwargs)[source]
 
Add new categories. new_categories will be included at the last/highest place in the categories and will be unused directly after this call.  Parameters 
 
new_categories:category or list-like of category


The new categories to be included.  
inplace:bool, default False


Whether or not to add the categories inplace or return a copy of this categorical with added categories.  Deprecated since version 1.3.0.     Returns 
 
cat:Categorical or None


Categorical with new categories added or None if inplace=True.    Raises 
 ValueError

If the new categories include old categories or do not validate as categories      See also  rename_categories

Rename categories.  reorder_categories

Reorder categories.  remove_categories

Remove the specified categories.  remove_unused_categories

Remove categories which are not used.  set_categories

Set the categories to the specified ones.    Examples 
>>> c = pd.Categorical(['c', 'b', 'c'])
>>> c
['c', 'b', 'c']
Categories (2, object): ['b', 'c']
  
>>> c.add_categories(['d', 'a'])
['c', 'b', 'c']
Categories (4, object): ['b', 'c', 'd', 'a']
pandas.Series.cat.as_ordered   Series.cat.as_ordered(*args, **kwargs)[source]
 
Set the Categorical to be ordered.  Parameters 
 
inplace:bool, default False


Whether or not to set the ordered attribute in-place or return a copy of this categorical with ordered set to True.    Returns 
 Categorical or None

Ordered Categorical or None if inplace=True.
pandas.Series.cat.as_unordered   Series.cat.as_unordered(*args, **kwargs)[source]
 
Set the Categorical to be unordered.  Parameters 
 
inplace:bool, default False


Whether or not to set the ordered attribute in-place or return a copy of this categorical with ordered set to False.    Returns 
 Categorical or None

Unordered Categorical or None if inplace=True.
pandas.Series.cat.categories   Series.cat.categories
 
The categories of this categorical. Setting assigns new values to each category (effectively a rename of each individual category). The assigned value has to be a list-like object. All items must be unique and the number of items in the new categories must be the same as the number of items in the old categories. Assigning to categories is a inplace operation!  Raises 
 ValueError

If the new categories do not validate as categories or if the number of new categories is unequal the number of old categories      See also  rename_categories

Rename categories.  reorder_categories

Reorder categories.  add_categories

Add new categories.  remove_categories

Remove the specified categories.  remove_unused_categories

Remove categories which are not used.  set_categories

Set the categories to the specified ones.
pandas.Series.cat.codes   Series.cat.codes
 
Return Series of codes as well as the index.
pandas.Series.cat.ordered   Series.cat.ordered
 
Whether the categories have an ordered relationship.
pandas.Series.cat.remove_categories   Series.cat.remove_categories(*args, **kwargs)[source]
 
Remove the specified categories. removals must be included in the old categories. Values which were in the removed categories will be set to NaN  Parameters 
 
removals:category or list of categories


The categories which should be removed.  
inplace:bool, default False


Whether or not to remove the categories inplace or return a copy of this categorical with removed categories.  Deprecated since version 1.3.0.     Returns 
 
cat:Categorical or None


Categorical with removed categories or None if inplace=True.    Raises 
 ValueError

If the removals are not contained in the categories      See also  rename_categories

Rename categories.  reorder_categories

Reorder categories.  add_categories

Add new categories.  remove_unused_categories

Remove categories which are not used.  set_categories

Set the categories to the specified ones.    Examples 
>>> c = pd.Categorical(['a', 'c', 'b', 'c', 'd'])
>>> c
['a', 'c', 'b', 'c', 'd']
Categories (4, object): ['a', 'b', 'c', 'd']
  
>>> c.remove_categories(['d', 'a'])
[NaN, 'c', 'b', 'c', NaN]
Categories (2, object): ['b', 'c']