neulab/docprompting-conala huggingface dataset:
pandas.StringDtype   classpandas.StringDtype(storage=None)[source]
 
Extension dtype for string data.  New in version 1.0.0.   Warning StringDtype is considered experimental. The implementation and parts of the API may change without warning. In particular, StringDtype.na_value may change to no longer be numpy.nan.   Parameters 
 
storage:{“python”, “pyarrow”}, optional


If not given, the value of pd.options.mode.string_storage.     Examples 
>>> pd.StringDtype()
string[python]
  
>>> pd.StringDtype(storage="pyarrow")
string[pyarrow]
  Attributes       
None     Methods       
None
pandas.test   pandas.test(extra_args=None)[source]
 
Run the pandas test suite using pytest.
pandas.testing.assert_extension_array_equal   pandas.testing.assert_extension_array_equal(left, right, check_dtype=True, index_values=None, check_less_precise=NoDefault.no_default, check_exact=False, rtol=1e-05, atol=1e-08)[source]
 
Check that left and right ExtensionArrays are equal.  Parameters 
 
left, right:ExtensionArray


The two arrays to compare.  
check_dtype:bool, default True


Whether to check if the ExtensionArray dtypes are identical.  
index_values:numpy.ndarray, default None


Optional index (shared by both left and right), used in output.  
check_less_precise:bool or int, default False


Specify comparison precision. Only used when check_exact is False. 5 digits (False) or 3 digits (True) after decimal points are compared. If int, then specify the digits to compare.  Deprecated since version 1.1.0: Use rtol and atol instead to define relative/absolute tolerance, respectively. Similar to math.isclose().   
check_exact:bool, default False


Whether to compare number exactly.  
rtol:float, default 1e-5


Relative tolerance. Only used when check_exact is False.  New in version 1.1.0.   
atol:float, default 1e-8


Absolute tolerance. Only used when check_exact is False.  New in version 1.1.0.      Notes Missing values are checked separately from valid values. A mask of missing values is computed for each and checked to match. The remaining all-valid values are cast to object dtype and checked. Examples 
>>> from pandas import testing as tm
>>> a = pd.Series([1, 2, 3, 4])
>>> b, c = a.array, a.array
>>> tm.assert_extension_array_equal(b, c)
pandas.testing.assert_index_equal   pandas.testing.assert_index_equal(left, right, exact='equiv', check_names=True, check_less_precise=NoDefault.no_default, check_exact=True, check_categorical=True, check_order=True, rtol=1e-05, atol=1e-08, obj='Index')[source]
 
Check that left and right Index are equal.  Parameters 
 
left:Index


right:Index


exact:bool or {‘equiv’}, default ‘equiv’


Whether to check the Index class, dtype and inferred_type are identical. If ‘equiv’, then RangeIndex can be substituted for Int64Index as well.  
check_names:bool, default True


Whether to check the names attribute.  
check_less_precise:bool or int, default False


Specify comparison precision. Only used when check_exact is False. 5 digits (False) or 3 digits (True) after decimal points are compared. If int, then specify the digits to compare.  Deprecated since version 1.1.0: Use rtol and atol instead to define relative/absolute tolerance, respectively. Similar to math.isclose().   
check_exact:bool, default True


Whether to compare number exactly.  
check_categorical:bool, default True


Whether to compare internal Categorical exactly.  
check_order:bool, default True


Whether to compare the order of index entries as well as their values. If True, both indexes must contain the same elements, in the same order. If False, both indexes must contain the same elements, but in any order.  New in version 1.2.0.   
rtol:float, default 1e-5


Relative tolerance. Only used when check_exact is False.  New in version 1.1.0.   
atol:float, default 1e-8


Absolute tolerance. Only used when check_exact is False.  New in version 1.1.0.   
obj:str, default ‘Index’


Specify object name being compared, internally used to show appropriate assertion message.     Examples 
>>> from pandas import testing as tm
>>> a = pd.Index([1, 2, 3])
>>> b = pd.Index([1, 2, 3])
>>> tm.assert_index_equal(a, b)
pandas.testing.assert_series_equal   pandas.testing.assert_series_equal(left, right, check_dtype=True, check_index_type='equiv', check_series_type=True, check_less_precise=NoDefault.no_default, check_names=True, check_exact=False, check_datetimelike_compat=False, check_categorical=True, check_category_order=True, check_freq=True, check_flags=True, rtol=1e-05, atol=1e-08, obj='Series', *, check_index=True)[source]
 
Check that left and right Series are equal.  Parameters 
 
left:Series


right:Series


check_dtype:bool, default True


Whether to check the Series dtype is identical.  
check_index_type:bool or {‘equiv’}, default ‘equiv’


Whether to check the Index class, dtype and inferred_type are identical.  
check_series_type:bool, default True


Whether to check the Series class is identical.  
check_less_precise:bool or int, default False


Specify comparison precision. Only used when check_exact is False. 5 digits (False) or 3 digits (True) after decimal points are compared. If int, then specify the digits to compare. When comparing two numbers, if the first number has magnitude less than 1e-5, we compare the two numbers directly and check whether they are equivalent within the specified precision. Otherwise, we compare the ratio of the second number to the first number and check whether it is equivalent to 1 within the specified precision.  Deprecated since version 1.1.0: Use rtol and atol instead to define relative/absolute tolerance, respectively. Similar to math.isclose().   
check_names:bool, default True


Whether to check the Series and Index names attribute.  
check_exact:bool, default False


Whether to compare number exactly.  
check_datetimelike_compat:bool, default False


Compare datetime-like which is comparable ignoring dtype.  
check_categorical:bool, default True


Whether to compare internal Categorical exactly.  
check_category_order:bool, default True


Whether to compare category order of internal Categoricals.  New in version 1.0.2.   
check_freq:bool, default True


Whether to check the freq attribute on a DatetimeIndex or TimedeltaIndex.  New in version 1.1.0.   
check_flags:bool, default True


Whether to check the flags attribute.  New in version 1.2.0.   
rtol:float, default 1e-5


Relative tolerance. Only used when check_exact is False.  New in version 1.1.0.   
atol:float, default 1e-8


Absolute tolerance. Only used when check_exact is False.  New in version 1.1.0.   
obj:str, default ‘Series’


Specify object name being compared, internally used to show appropriate assertion message.  
check_index:bool, default True


Whether to check index equivalence. If False, then compare only values.  New in version 1.3.0.      Examples 
>>> from pandas import testing as tm
>>> a = pd.Series([1, 2, 3, 4])
>>> b = pd.Series([1, 2, 3, 4])
>>> tm.assert_series_equal(a, b)
pandas.Timedelta   classpandas.Timedelta(value=<object object>, unit=None, **kwargs)
 
Represents a duration, the difference between two dates or times. Timedelta is the pandas equivalent of python’s datetime.timedelta and is interchangeable with it in most cases.  Parameters 
 
value:Timedelta, timedelta, np.timedelta64, str, or int


unit:str, default ‘ns’


Denote the unit of the input, if input is an integer. Possible values:  ‘W’, ‘D’, ‘T’, ‘S’, ‘L’, ‘U’, or ‘N’ ‘days’ or ‘day’ ‘hours’, ‘hour’, ‘hr’, or ‘h’ ‘minutes’, ‘minute’, ‘min’, or ‘m’ ‘seconds’, ‘second’, or ‘sec’ ‘milliseconds’, ‘millisecond’, ‘millis’, or ‘milli’ ‘microseconds’, ‘microsecond’, ‘micros’, or ‘micro’ ‘nanoseconds’, ‘nanosecond’, ‘nanos’, ‘nano’, or ‘ns’.   **kwargs

Available kwargs: {days, seconds, microseconds, milliseconds, minutes, hours, weeks}. Values for construction in compat with datetime.timedelta. Numpy ints and floats will be coerced to python ints and floats.     Notes The constructor may take in either both values of value and unit or kwargs as above. Either one of them must be used during initialization The .value attribute is always in ns. If the precision is higher than nanoseconds, the precision of the duration is truncated to nanoseconds. Examples Here we initialize Timedelta object with both value and unit 
>>> td = pd.Timedelta(1, "d")
>>> td
Timedelta('1 days 00:00:00')
  Here we initialize the Timedelta object with kwargs 
>>> td2 = pd.Timedelta(days=1)
>>> td2
Timedelta('1 days 00:00:00')
  We see that either way we get the same result Attributes       
asm8 Return a numpy timedelta64 array scalar view.  
components Return a components namedtuple-like.  
days Number of days.  
delta Return the timedelta in nanoseconds (ns), for internal compatibility.  
microseconds Number of microseconds (>= 0 and less than 1 second).  
nanoseconds Return the number of nanoseconds (n), where 0 <= n < 1 microsecond.  
resolution_string Return a string representing the lowest timedelta resolution.  
seconds Number of seconds (>= 0 and less than 1 day).          
freq   
is_populated   
value     Methods       
ceil(freq) Return a new Timedelta ceiled to this resolution.  
floor(freq) Return a new Timedelta floored to this resolution.  
isoformat Format Timedelta as ISO 8601 Duration like P[n]Y[n]M[n]DT[n]H[n]M[n]S, where the [n] s are replaced by the values.  
round(freq) Round the Timedelta to the specified resolution.  
to_numpy Convert the Timedelta to a NumPy timedelta64.  
to_pytimedelta Convert a pandas Timedelta object into a python datetime.timedelta object.  
to_timedelta64 Return a numpy.timedelta64 object with 'ns' precision.  
total_seconds Total seconds in the duration.  
view Array view compatibility.
pandas.Timedelta.asm8   Timedelta.asm8
 
Return a numpy timedelta64 array scalar view. Provides access to the array scalar view (i.e. a combination of the value and the units) associated with the numpy.timedelta64().view(), including a 64-bit integer representation of the timedelta in nanoseconds (Python int compatible).  Returns 
 numpy timedelta64 array scalar view

Array scalar view of the timedelta in nanoseconds.     Examples 
>>> td = pd.Timedelta('1 days 2 min 3 us 42 ns')
>>> td.asm8
numpy.timedelta64(86520000003042,'ns')
  
>>> td = pd.Timedelta('2 min 3 s')
>>> td.asm8
numpy.timedelta64(123000000000,'ns')
  
>>> td = pd.Timedelta('3 ms 5 us')
>>> td.asm8
numpy.timedelta64(3005000,'ns')
  
>>> td = pd.Timedelta(42, unit='ns')
>>> td.asm8
numpy.timedelta64(42,'ns')
pandas.Timedelta.ceil   Timedelta.ceil(freq)
 
Return a new Timedelta ceiled to this resolution.  Parameters 
 
freq:str


Frequency string indicating the ceiling resolution.
pandas.Timedelta.components   Timedelta.components
 
Return a components namedtuple-like.
pandas.Timedelta.delta   Timedelta.delta
 
Return the timedelta in nanoseconds (ns), for internal compatibility.  Returns 
 int

Timedelta in nanoseconds.     Examples 
>>> td = pd.Timedelta('1 days 42 ns')
>>> td.delta
86400000000042
  
>>> td = pd.Timedelta('3 s')
>>> td.delta
3000000000
  
>>> td = pd.Timedelta('3 ms 5 us')
>>> td.delta
3005000
  
>>> td = pd.Timedelta(42, unit='ns')
>>> td.delta
42
pandas.Timedelta.floor   Timedelta.floor(freq)
 
Return a new Timedelta floored to this resolution.  Parameters 
 
freq:str


Frequency string indicating the flooring resolution.
pandas.Timedelta.isoformat   Timedelta.isoformat()
 
Format Timedelta as ISO 8601 Duration like P[n]Y[n]M[n]DT[n]H[n]M[n]S, where the [n] s are replaced by the values. See https://en.wikipedia.org/wiki/ISO_8601#Durations.  Returns 
 str
    See also  Timestamp.isoformat

Function is used to convert the given Timestamp object into the ISO format.    Notes The longest component is days, whose value may be larger than 365. Every component is always included, even if its value is 0. Pandas uses nanosecond precision, so up to 9 decimal places may be included in the seconds component. Trailing 0’s are removed from the seconds component after the decimal. We do not 0 pad components, so it’s …T5H…, not …T05H… Examples 
>>> td = pd.Timedelta(days=6, minutes=50, seconds=3,
...                   milliseconds=10, microseconds=10, nanoseconds=12)
  
>>> td.isoformat()
'P6DT0H50M3.010010012S'
>>> pd.Timedelta(hours=1, seconds=10).isoformat()
'P0DT1H0M10S'
>>> pd.Timedelta(days=500.5).isoformat()
'P500DT12H0M0S'
pandas.Timedelta.max   Timedelta.max=Timedelta('106751 days 23:47:16.854775807')
pandas.Timedelta.microseconds   Timedelta.microseconds
 
Number of microseconds (>= 0 and less than 1 second).
pandas.Timedelta.min   Timedelta.min=Timedelta('-106752 days +00:12:43.145224193')
pandas.Timedelta.nanoseconds   Timedelta.nanoseconds
 
Return the number of nanoseconds (n), where 0 <= n < 1 microsecond.  Returns 
 int

Number of nanoseconds.      See also  Timedelta.components

Return all attributes with assigned values (i.e. days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds).    Examples Using string input 
>>> td = pd.Timedelta('1 days 2 min 3 us 42 ns')
  
>>> td.nanoseconds
42
  Using integer input 
>>> td = pd.Timedelta(42, unit='ns')
>>> td.nanoseconds
42
pandas.Timedelta.resolution   Timedelta.resolution=Timedelta('0 days 00:00:00.000000001')
pandas.Timedelta.resolution_string   Timedelta.resolution_string
 
Return a string representing the lowest timedelta resolution. Each timedelta has a defined resolution that represents the lowest OR most granular level of precision. Each level of resolution is represented by a short string as defined below: Resolution: Return value  Days: ‘D’ Hours: ‘H’ Minutes: ‘T’ Seconds: ‘S’ Milliseconds: ‘L’ Microseconds: ‘U’ Nanoseconds: ‘N’   Returns 
 str

Timedelta resolution.     Examples 
>>> td = pd.Timedelta('1 days 2 min 3 us 42 ns')
>>> td.resolution_string
'N'
  
>>> td = pd.Timedelta('1 days 2 min 3 us')
>>> td.resolution_string
'U'
  
>>> td = pd.Timedelta('2 min 3 s')
>>> td.resolution_string
'S'
  
>>> td = pd.Timedelta(36, unit='us')
>>> td.resolution_string
'U'
pandas.Timedelta.round   Timedelta.round(freq)
 
Round the Timedelta to the specified resolution.  Parameters 
 
freq:str


Frequency string indicating the rounding resolution.    Returns 
 a new Timedelta rounded to the given resolution of freq

  Raises 
 ValueError if the freq cannot be converted
pandas.Timedelta.seconds   Timedelta.seconds
 
Number of seconds (>= 0 and less than 1 day).
pandas.Timedelta.to_numpy   Timedelta.to_numpy()
 
Convert the Timedelta to a NumPy timedelta64.  New in version 0.25.0.  This is an alias method for Timedelta.to_timedelta64(). The dtype and copy parameters are available here only for compatibility. Their values will not affect the return value.  Returns 
 numpy.timedelta64
    See also  Series.to_numpy

Similar method for Series.
pandas.Timedelta.to_pytimedelta   Timedelta.to_pytimedelta()
 
Convert a pandas Timedelta object into a python datetime.timedelta object. Timedelta objects are internally saved as numpy datetime64[ns] dtype. Use to_pytimedelta() to convert to object dtype.  Returns 
 datetime.timedelta or numpy.array of datetime.timedelta
    See also  to_timedelta

Convert argument to Timedelta type.    Notes Any nanosecond resolution will be lost.
pandas.Timedelta.to_timedelta64   Timedelta.to_timedelta64()
 
Return a numpy.timedelta64 object with ‘ns’ precision.
pandas.Timedelta.total_seconds   Timedelta.total_seconds()
 
Total seconds in the duration.
pandas.Timedelta.view   Timedelta.view()
 
Array view compatibility.
pandas.timedelta_range   pandas.timedelta_range(start=None, end=None, periods=None, freq=None, name=None, closed=None)[source]
 
Return a fixed frequency TimedeltaIndex, with day as the default frequency.  Parameters 
 
start:str or timedelta-like, default None


Left bound for generating timedeltas.  
end:str or timedelta-like, default None


Right bound for generating timedeltas.  
periods:int, default None


Number of periods to generate.  
freq:str or DateOffset, default ‘D’


Frequency strings can have multiples, e.g. ‘5H’.  
name:str, default None


Name of the resulting TimedeltaIndex.  
closed:str, default None


Make the interval closed with respect to the given frequency to the ‘left’, ‘right’, or both sides (None).    Returns 
 TimedeltaIndex
   Notes Of the four parameters start, end, periods, and freq, exactly three must be specified. If freq is omitted, the resulting TimedeltaIndex will have periods linearly spaced elements between start and end (closed on both sides). To learn more about the frequency strings, please see this link. Examples 
>>> pd.timedelta_range(start='1 day', periods=4)
TimedeltaIndex(['1 days', '2 days', '3 days', '4 days'],
               dtype='timedelta64[ns]', freq='D')
  The closed parameter specifies which endpoint is included. The default behavior is to include both endpoints. 
>>> pd.timedelta_range(start='1 day', periods=4, closed='right')
TimedeltaIndex(['2 days', '3 days', '4 days'],
               dtype='timedelta64[ns]', freq='D')
  The freq parameter specifies the frequency of the TimedeltaIndex. Only fixed frequencies can be passed, non-fixed frequencies such as ‘M’ (month end) will raise. 
>>> pd.timedelta_range(start='1 day', end='2 days', freq='6H')
TimedeltaIndex(['1 days 00:00:00', '1 days 06:00:00', '1 days 12:00:00',
                '1 days 18:00:00', '2 days 00:00:00'],
               dtype='timedelta64[ns]', freq='6H')
  Specify start, end, and periods; the frequency is generated automatically (linearly spaced). 
>>> pd.timedelta_range(start='1 day', end='5 days', periods=4)
TimedeltaIndex(['1 days 00:00:00', '2 days 08:00:00', '3 days 16:00:00',
                '5 days 00:00:00'],
               dtype='timedelta64[ns]', freq=None)
pandas.TimedeltaIndex   classpandas.TimedeltaIndex(data=None, unit=None, freq=NoDefault.no_default, closed=None, dtype=dtype('<m8[ns]'), copy=False, name=None)[source]
 
Immutable ndarray of timedelta64 data, represented internally as int64, and which can be boxed to timedelta objects.  Parameters 
 
data:array-like (1-dimensional), optional


Optional timedelta-like data to construct index with.  
unit:unit of the arg (D,h,m,s,ms,us,ns) denote the unit, optional


Which is an integer/float number.  
freq:str or pandas offset object, optional


One of pandas date offset strings or corresponding objects. The string ‘infer’ can be passed in order to set the frequency of the index as the inferred frequency upon creation.  
copy:bool


Make a copy of input ndarray.  
name:object


Name to be stored in the index.      See also  Index

The base pandas Index type.  Timedelta

Represents a duration between two dates or times.  DatetimeIndex

Index of datetime64 data.  PeriodIndex

Index of Period data.  timedelta_range

Create a fixed-frequency TimedeltaIndex.    Notes To learn more about the frequency strings, please see this link. Attributes       
days Number of days for each element.  
seconds Number of seconds (>= 0 and less than 1 day) for each element.  
microseconds Number of microseconds (>= 0 and less than 1 second) for each element.  
nanoseconds Number of nanoseconds (>= 0 and less than 1 microsecond) for each element.  
components Return a dataframe of the components (days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds) of the Timedeltas.  
inferred_freq Tries to return a string representing a frequency guess, generated by infer_freq.    Methods       
to_pytimedelta(*args, **kwargs) Return Timedelta Array/Index as object ndarray of datetime.timedelta objects.  
to_series([index, name]) Create a Series with both index and values equal to the index keys.  
round(*args, **kwargs) Perform round operation on the data to the specified freq.  
floor(*args, **kwargs) Perform floor operation on the data to the specified freq.  
ceil(*args, **kwargs) Perform ceil operation on the data to the specified freq.  
to_frame([index, name]) Create a DataFrame with a column containing the Index.  
mean(*args, **kwargs) Return the mean value of the Array.
pandas.TimedeltaIndex.ceil   TimedeltaIndex.ceil(*args, **kwargs)[source]
 
Perform ceil operation on the data to the specified freq.  Parameters 
 
freq:str or Offset


The frequency level to ceil the index to. Must be a fixed frequency like ‘S’ (second) not ‘ME’ (month end). See frequency aliases for a list of possible freq values.  
ambiguous:‘infer’, bool-ndarray, ‘NaT’, default ‘raise’


Only relevant for DatetimeIndex:  ‘infer’ will attempt to infer fall dst-transition hours based on order bool-ndarray where True signifies a DST time, False designates a non-DST time (note that this flag is only applicable for ambiguous times) ‘NaT’ will return NaT where there are ambiguous times ‘raise’ will raise an AmbiguousTimeError if there are ambiguous times.   
nonexistent:‘shift_forward’, ‘shift_backward’, ‘NaT’, timedelta, default ‘raise’


A nonexistent time does not exist in a particular timezone where clocks moved forward due to DST.  ‘shift_forward’ will shift the nonexistent time forward to the closest existing time ‘shift_backward’ will shift the nonexistent time backward to the closest existing time ‘NaT’ will return NaT where there are nonexistent times timedelta objects will shift nonexistent times by the timedelta ‘raise’ will raise an NonExistentTimeError if there are nonexistent times.     Returns 
 DatetimeIndex, TimedeltaIndex, or Series

Index of the same type for a DatetimeIndex or TimedeltaIndex, or a Series with the same index for a Series.    Raises 
 ValueError if the freq cannot be converted.
   Notes If the timestamps have a timezone, ceiling will take place relative to the local (“wall”) time and re-localized to the same timezone. When ceiling near daylight savings time, use nonexistent and ambiguous to control the re-localization behavior. Examples DatetimeIndex 
>>> rng = pd.date_range('1/1/2018 11:59:00', periods=3, freq='min')
>>> rng
DatetimeIndex(['2018-01-01 11:59:00', '2018-01-01 12:00:00',
               '2018-01-01 12:01:00'],
              dtype='datetime64[ns]', freq='T')
>>> rng.ceil('H')
DatetimeIndex(['2018-01-01 12:00:00', '2018-01-01 12:00:00',
               '2018-01-01 13:00:00'],
              dtype='datetime64[ns]', freq=None)
  Series 
>>> pd.Series(rng).dt.ceil("H")
0   2018-01-01 12:00:00
1   2018-01-01 12:00:00
2   2018-01-01 13:00:00
dtype: datetime64[ns]
  When rounding near a daylight savings time transition, use ambiguous or nonexistent to control how the timestamp should be re-localized. 
>>> rng_tz = pd.DatetimeIndex(["2021-10-31 01:30:00"], tz="Europe/Amsterdam")
  
>>> rng_tz.ceil("H", ambiguous=False)
DatetimeIndex(['2021-10-31 02:00:00+01:00'],
              dtype='datetime64[ns, Europe/Amsterdam]', freq=None)
  
>>> rng_tz.ceil("H", ambiguous=True)
DatetimeIndex(['2021-10-31 02:00:00+02:00'],
              dtype='datetime64[ns, Europe/Amsterdam]', freq=None)
pandas.TimedeltaIndex.components   propertyTimedeltaIndex.components
 
Return a dataframe of the components (days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds) of the Timedeltas.  Returns 
 DataFrame
pandas.TimedeltaIndex.days   propertyTimedeltaIndex.days
 
Number of days for each element.