doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
pandas.Series.str.islower Series.str.islower()[source]
Check whether all characters in each string are lowercase. This is equivalent to running the Python string method str.islower() for each element of the Series/Index. If a string has zero characters, False is returned for that check. Returns
Series or Index o... | pandas.reference.api.pandas.series.str.islower |
pandas.Series.str.isnumeric Series.str.isnumeric()[source]
Check whether all characters in each string are numeric. This is equivalent to running the Python string method str.isnumeric() for each element of the Series/Index. If a string has zero characters, False is returned for that check. Returns
Series or Ind... | pandas.reference.api.pandas.series.str.isnumeric |
pandas.Series.str.isspace Series.str.isspace()[source]
Check whether all characters in each string are whitespace. This is equivalent to running the Python string method str.isspace() for each element of the Series/Index. If a string has zero characters, False is returned for that check. Returns
Series or Index ... | pandas.reference.api.pandas.series.str.isspace |
pandas.Series.str.istitle Series.str.istitle()[source]
Check whether all characters in each string are titlecase. This is equivalent to running the Python string method str.istitle() for each element of the Series/Index. If a string has zero characters, False is returned for that check. Returns
Series or Index o... | pandas.reference.api.pandas.series.str.istitle |
pandas.Series.str.isupper Series.str.isupper()[source]
Check whether all characters in each string are uppercase. This is equivalent to running the Python string method str.isupper() for each element of the Series/Index. If a string has zero characters, False is returned for that check. Returns
Series or Index o... | pandas.reference.api.pandas.series.str.isupper |
pandas.Series.str.join Series.str.join(sep)[source]
Join lists contained as elements in the Series/Index with passed delimiter. If the elements of a Series are lists themselves, join the content of these lists using the delimiter passed to the function. This function is an equivalent to str.join(). Parameters
s... | pandas.reference.api.pandas.series.str.join |
pandas.Series.str.len Series.str.len()[source]
Compute the length of each element in the Series/Index. The element may be a sequence (such as a string, tuple or list) or a collection (such as a dictionary). Returns
Series or Index of int
A Series or Index of integer values indicating the length of each element ... | pandas.reference.api.pandas.series.str.len |
pandas.Series.str.ljust Series.str.ljust(width, fillchar=' ')[source]
Pad right side of strings in the Series/Index. Equivalent to str.ljust(). Parameters
width:int
Minimum width of resulting string; additional characters will be filled with fillchar.
fillchar:str
Additional character for filling, default... | pandas.reference.api.pandas.series.str.ljust |
pandas.Series.str.lower Series.str.lower()[source]
Convert strings in the Series/Index to lowercase. Equivalent to str.lower(). Returns
Series or Index of object
See also Series.str.lower
Converts all characters to lowercase. Series.str.upper
Converts all characters to uppercase. Series.str.title
Conve... | pandas.reference.api.pandas.series.str.lower |
pandas.Series.str.lstrip Series.str.lstrip(to_strip=None)[source]
Remove leading characters. Strip whitespaces (including newlines) or a set of specified characters from each string in the Series/Index from left side. Equivalent to str.lstrip(). Parameters
to_strip:str or None, default None
Specifying the set... | pandas.reference.api.pandas.series.str.lstrip |
pandas.Series.str.match Series.str.match(pat, case=True, flags=0, na=None)[source]
Determine if each string starts with a match of a regular expression. Parameters
pat:str
Character sequence or regular expression.
case:bool, default True
If True, case sensitive.
flags:int, default 0 (no flags)
Regex m... | pandas.reference.api.pandas.series.str.match |
pandas.Series.str.normalize Series.str.normalize(form)[source]
Return the Unicode normal form for the strings in the Series/Index. For more information on the forms, see the unicodedata.normalize(). Parameters
form:{‘NFC’, ‘NFKC’, ‘NFD’, ‘NFKD’}
Unicode form. Returns
normalized:Series/Index of objects | pandas.reference.api.pandas.series.str.normalize |
pandas.Series.str.pad Series.str.pad(width, side='left', fillchar=' ')[source]
Pad strings in the Series/Index up to width. Parameters
width:int
Minimum width of resulting string; additional characters will be filled with character defined in fillchar.
side:{‘left’, ‘right’, ‘both’}, default ‘left’
Side f... | pandas.reference.api.pandas.series.str.pad |
pandas.Series.str.partition Series.str.partition(sep=' ', expand=True)[source]
Split the string at the first occurrence of sep. This method splits the string at the first occurrence of sep, and returns 3 elements containing the part before the separator, the separator itself, and the part after the separator. If th... | pandas.reference.api.pandas.series.str.partition |
pandas.Series.str.removeprefix Series.str.removeprefix(prefix)[source]
Remove a prefix from an object series. If the prefix is not present, the original string will be returned. Parameters
prefix:str
Remove the prefix of the string. Returns
Series/Index: object
The Series or Index with given prefix remo... | pandas.reference.api.pandas.series.str.removeprefix |
pandas.Series.str.removesuffix Series.str.removesuffix(suffix)[source]
Remove a suffix from an object series. If the suffix is not present, the original string will be returned. Parameters
suffix:str
Remove the suffix of the string. Returns
Series/Index: object
The Series or Index with given suffix remo... | pandas.reference.api.pandas.series.str.removesuffix |
pandas.Series.str.repeat Series.str.repeat(repeats)[source]
Duplicate each string in the Series or Index. Parameters
repeats:int or sequence of int
Same value for all (int) or different value per (sequence). Returns
Series or Index of object
Series or Index of repeated string objects specified by input ... | pandas.reference.api.pandas.series.str.repeat |
pandas.Series.str.replace Series.str.replace(pat, repl, n=- 1, case=None, flags=0, regex=None)[source]
Replace each occurrence of pattern/regex in the Series/Index. Equivalent to str.replace() or re.sub(), depending on the regex value. Parameters
pat:str or compiled regex
String can be a character sequence or... | pandas.reference.api.pandas.series.str.replace |
pandas.Series.str.rfind Series.str.rfind(sub, start=0, end=None)[source]
Return highest indexes in each strings in the Series/Index. Each of returned indexes corresponds to the position where the substring is fully contained between [start:end]. Return -1 on failure. Equivalent to standard str.rfind(). Parameters ... | pandas.reference.api.pandas.series.str.rfind |
pandas.Series.str.rindex Series.str.rindex(sub, start=0, end=None)[source]
Return highest indexes in each string in Series/Index. Each of the returned indexes corresponds to the position where the substring is fully contained between [start:end]. This is the same as str.rfind except instead of returning -1, it rais... | pandas.reference.api.pandas.series.str.rindex |
pandas.Series.str.rjust Series.str.rjust(width, fillchar=' ')[source]
Pad left side of strings in the Series/Index. Equivalent to str.rjust(). Parameters
width:int
Minimum width of resulting string; additional characters will be filled with fillchar.
fillchar:str
Additional character for filling, default ... | pandas.reference.api.pandas.series.str.rjust |
pandas.Series.str.rpartition Series.str.rpartition(sep=' ', expand=True)[source]
Split the string at the last occurrence of sep. This method splits the string at the last occurrence of sep, and returns 3 elements containing the part before the separator, the separator itself, and the part after the separator. If th... | pandas.reference.api.pandas.series.str.rpartition |
pandas.Series.str.rsplit Series.str.rsplit(pat=None, n=- 1, expand=False)[source]
Split strings around given separator/delimiter. Splits the string in the Series/Index from the end, at the specified delimiter string. Parameters
pat:str or compiled regex, optional
String or regular expression to split on. If n... | pandas.reference.api.pandas.series.str.rsplit |
pandas.Series.str.rstrip Series.str.rstrip(to_strip=None)[source]
Remove trailing characters. Strip whitespaces (including newlines) or a set of specified characters from each string in the Series/Index from right side. Equivalent to str.rstrip(). Parameters
to_strip:str or None, default None
Specifying the s... | pandas.reference.api.pandas.series.str.rstrip |
pandas.Series.str.slice Series.str.slice(start=None, stop=None, step=None)[source]
Slice substrings from each element in the Series or Index. Parameters
start:int, optional
Start position for slice operation.
stop:int, optional
Stop position for slice operation.
step:int, optional
Step size for slice ... | pandas.reference.api.pandas.series.str.slice |
pandas.Series.str.slice_replace Series.str.slice_replace(start=None, stop=None, repl=None)[source]
Replace a positional slice of a string with another value. Parameters
start:int, optional
Left index position to use for the slice. If not specified (None), the slice is unbounded on the left, i.e. slice from th... | pandas.reference.api.pandas.series.str.slice_replace |
pandas.Series.str.split Series.str.split(pat=None, n=- 1, expand=False, *, regex=None)[source]
Split strings around given separator/delimiter. Splits the string in the Series/Index from the beginning, at the specified delimiter string. Parameters
pat:str or compiled regex, optional
String or regular expressio... | pandas.reference.api.pandas.series.str.split |
pandas.Series.str.startswith Series.str.startswith(pat, na=None)[source]
Test if the start of each string element matches a pattern. Equivalent to str.startswith(). Parameters
pat:str
Character sequence. Regular expressions are not accepted.
na:object, default NaN
Object shown if element tested is not a s... | pandas.reference.api.pandas.series.str.startswith |
pandas.Series.str.strip Series.str.strip(to_strip=None)[source]
Remove leading and trailing characters. Strip whitespaces (including newlines) or a set of specified characters from each string in the Series/Index from left and right sides. Equivalent to str.strip(). Parameters
to_strip:str or None, default None... | pandas.reference.api.pandas.series.str.strip |
pandas.Series.str.swapcase Series.str.swapcase()[source]
Convert strings in the Series/Index to be swapcased. Equivalent to str.swapcase(). Returns
Series or Index of object
See also Series.str.lower
Converts all characters to lowercase. Series.str.upper
Converts all characters to uppercase. Series.str.... | pandas.reference.api.pandas.series.str.swapcase |
pandas.Series.str.title Series.str.title()[source]
Convert strings in the Series/Index to titlecase. Equivalent to str.title(). Returns
Series or Index of object
See also Series.str.lower
Converts all characters to lowercase. Series.str.upper
Converts all characters to uppercase. Series.str.title
Conve... | pandas.reference.api.pandas.series.str.title |
pandas.Series.str.translate Series.str.translate(table)[source]
Map all characters in the string through the given mapping table. Equivalent to standard str.translate(). Parameters
table:dict
Table is a mapping of Unicode ordinals to Unicode ordinals, strings, or None. Unmapped characters are left untouched. ... | pandas.reference.api.pandas.series.str.translate |
pandas.Series.str.upper Series.str.upper()[source]
Convert strings in the Series/Index to uppercase. Equivalent to str.upper(). Returns
Series or Index of object
See also Series.str.lower
Converts all characters to lowercase. Series.str.upper
Converts all characters to uppercase. Series.str.title
Conve... | pandas.reference.api.pandas.series.str.upper |
pandas.Series.str.wrap Series.str.wrap(width, **kwargs)[source]
Wrap strings in Series/Index at specified line width. This method has the same keyword parameters and defaults as textwrap.TextWrapper. Parameters
width:int
Maximum line width.
expand_tabs:bool, optional
If True, tab characters will be expand... | pandas.reference.api.pandas.series.str.wrap |
pandas.Series.str.zfill Series.str.zfill(width)[source]
Pad strings in the Series/Index by prepending ‘0’ characters. Strings in the Series/Index are padded with ‘0’ characters on the left of the string to reach a total string length width. Strings in the Series/Index with length greater or equal to width are uncha... | pandas.reference.api.pandas.series.str.zfill |
pandas.Series.sub Series.sub(other, level=None, fill_value=None, axis=0)[source]
Return Subtraction of series and other, element-wise (binary operator sub). 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 v... | pandas.reference.api.pandas.series.sub |
pandas.Series.subtract Series.subtract(other, level=None, fill_value=None, axis=0)[source]
Return Subtraction of series and other, element-wise (binary operator sub). Equivalent to series - other, but with support to substitute a fill_value for missing data in either one of the inputs. Parameters
other:Series o... | pandas.reference.api.pandas.series.subtract |
pandas.Series.sum Series.sum(axis=None, skipna=True, level=None, numeric_only=None, min_count=0, **kwargs)[source]
Return the sum of the values over the requested axis. This is equivalent to the method numpy.sum. Parameters
axis:{index (0)}
Axis for the function to be applied on.
skipna:bool, default True
... | pandas.reference.api.pandas.series.sum |
pandas.Series.swapaxes Series.swapaxes(axis1, axis2, copy=True)[source]
Interchange axes and swap values axes appropriately. Returns
y:same as input | pandas.reference.api.pandas.series.swapaxes |
pandas.Series.swaplevel Series.swaplevel(i=- 2, j=- 1, copy=True)[source]
Swap levels i and j in a MultiIndex. Default is to swap the two innermost levels of the index. Parameters
i, j:int or str
Levels of the indices to be swapped. Can pass level name as string.
copy:bool, default True
Whether to copy un... | pandas.reference.api.pandas.series.swaplevel |
pandas.Series.T propertySeries.T
Return the transpose, which is by definition self. | pandas.reference.api.pandas.series.t |
pandas.Series.tail Series.tail(n=5)[source]
Return the last n rows. This function returns last n rows from the object based on position. It is useful for quickly verifying data, for example, after sorting or appending rows. For negative values of n, this function returns all rows except the first n rows, equivalent... | pandas.reference.api.pandas.series.tail |
pandas.Series.take Series.take(indices, axis=0, is_copy=None, **kwargs)[source]
Return the elements in the given positional indices along an axis. This means that we are not indexing according to actual values in the index attribute of the object. We are indexing according to the actual position of the element in t... | pandas.reference.api.pandas.series.take |
pandas.Series.to_clipboard Series.to_clipboard(excel=True, sep=None, **kwargs)[source]
Copy object to the system clipboard. Write a text representation of object to the system clipboard. This can be pasted into Excel, for example. Parameters
excel:bool, default True
Produce output in a csv format for easy pas... | pandas.reference.api.pandas.series.to_clipboard |
pandas.Series.to_csv Series.to_csv(path_or_buf=None, sep=',', na_rep='', float_format=None, columns=None, header=True, index=True, index_label=None, mode='w', encoding=None, compression='infer', quoting=None, quotechar='"', line_terminator=None, chunksize=None, date_format=None, doublequote=True, escapechar=None, dec... | pandas.reference.api.pandas.series.to_csv |
pandas.Series.to_dict Series.to_dict(into=<class 'dict'>)[source]
Convert Series to {label -> value} dict or dict-like object. Parameters
into:class, default dict
The collections.abc.Mapping subclass to use as the return object. Can be the actual class or an empty instance of the mapping type you want. If you... | pandas.reference.api.pandas.series.to_dict |
pandas.Series.to_excel Series.to_excel(excel_writer, sheet_name='Sheet1', na_rep='', float_format=None, columns=None, header=True, index=True, index_label=None, startrow=0, startcol=0, engine=None, merge_cells=True, encoding=None, inf_rep='inf', verbose=True, freeze_panes=None, storage_options=None)[source]
Write o... | pandas.reference.api.pandas.series.to_excel |
pandas.Series.to_frame Series.to_frame(name=NoDefault.no_default)[source]
Convert Series to DataFrame. Parameters
name:object, optional
The passed name should substitute for the series name (if it has one). Returns
DataFrame
DataFrame representation of Series. Examples
>>> s = pd.Series(["a", "b", ... | pandas.reference.api.pandas.series.to_frame |
pandas.Series.to_hdf Series.to_hdf(path_or_buf, key, mode='a', complevel=None, complib=None, append=False, format=None, index=True, min_itemsize=None, nan_rep=None, dropna=None, data_columns=None, errors='strict', encoding='UTF-8')[source]
Write the contained data to an HDF5 file using HDFStore. Hierarchical Data F... | pandas.reference.api.pandas.series.to_hdf |
pandas.Series.to_json Series.to_json(path_or_buf=None, orient=None, date_format=None, double_precision=10, force_ascii=True, date_unit='ms', default_handler=None, lines=False, compression='infer', index=True, indent=None, storage_options=None)[source]
Convert the object to a JSON string. Note NaN’s and None will be... | pandas.reference.api.pandas.series.to_json |
pandas.Series.to_latex Series.to_latex(buf=None, columns=None, col_space=None, header=True, index=True, na_rep='NaN', formatters=None, float_format=None, sparsify=None, index_names=True, bold_rows=False, column_format=None, longtable=None, escape=None, encoding=None, decimal='.', multicolumn=None, multicolumn_format=... | pandas.reference.api.pandas.series.to_latex |
pandas.Series.to_list Series.to_list()[source]
Return a list of the values. These are each a scalar type, which is a Python scalar (for str, int, float) or a pandas scalar (for Timestamp/Timedelta/Interval/Period) Returns
list
See also numpy.ndarray.tolist
Return the array as an a.ndim-levels deep nested l... | pandas.reference.api.pandas.series.to_list |
pandas.Series.to_markdown Series.to_markdown(buf=None, mode='wt', index=True, storage_options=None, **kwargs)[source]
Print Series in Markdown-friendly format. New in version 1.0.0. Parameters
buf:str, Path or StringIO-like, optional, default None
Buffer to write to. If None, the output is returned as a str... | pandas.reference.api.pandas.series.to_markdown |
pandas.Series.to_numpy Series.to_numpy(dtype=None, copy=False, na_value=NoDefault.no_default, **kwargs)[source]
A NumPy ndarray representing the values in this Series or Index. Parameters
dtype:str or numpy.dtype, optional
The dtype to pass to numpy.asarray().
copy:bool, default False
Whether to ensure th... | pandas.reference.api.pandas.series.to_numpy |
pandas.Series.to_period Series.to_period(freq=None, copy=True)[source]
Convert Series from DatetimeIndex to PeriodIndex. Parameters
freq:str, default None
Frequency associated with the PeriodIndex.
copy:bool, default True
Whether or not to return a copy. Returns
Series
Series with index converted to... | pandas.reference.api.pandas.series.to_period |
pandas.Series.to_pickle Series.to_pickle(path, compression='infer', protocol=5, storage_options=None)[source]
Pickle (serialize) object to file. Parameters
path:str
File path where the pickled object will be stored.
compression:str or dict, default ‘infer’
For on-the-fly compression of the output data. If... | pandas.reference.api.pandas.series.to_pickle |
pandas.Series.to_sql Series.to_sql(name, con, schema=None, if_exists='fail', index=True, index_label=None, chunksize=None, dtype=None, method=None)[source]
Write records stored in a DataFrame to a SQL database. Databases supported by SQLAlchemy [1] are supported. Tables can be newly created, appended to, or overwri... | pandas.reference.api.pandas.series.to_sql |
pandas.Series.to_string Series.to_string(buf=None, na_rep='NaN', float_format=None, header=True, index=True, length=False, dtype=False, name=False, max_rows=None, min_rows=None)[source]
Render a string representation of the Series. Parameters
buf:StringIO-like, optional
Buffer to write to.
na_rep:str, optio... | pandas.reference.api.pandas.series.to_string |
pandas.Series.to_timestamp Series.to_timestamp(freq=None, how='start', copy=True)[source]
Cast to DatetimeIndex of Timestamps, at beginning of period. Parameters
freq:str, default frequency of PeriodIndex
Desired frequency.
how:{‘s’, ‘e’, ‘start’, ‘end’}
Convention for converting period to timestamp; star... | pandas.reference.api.pandas.series.to_timestamp |
pandas.Series.to_xarray Series.to_xarray()[source]
Return an xarray object from the pandas object. Returns
xarray.DataArray or xarray.Dataset
Data in the pandas structure converted to Dataset if the object is a DataFrame, or a DataArray if the object is a Series. See also DataFrame.to_hdf
Write DataFrame... | pandas.reference.api.pandas.series.to_xarray |
pandas.Series.tolist Series.tolist()[source]
Return a list of the values. These are each a scalar type, which is a Python scalar (for str, int, float) or a pandas scalar (for Timestamp/Timedelta/Interval/Period) Returns
list
See also numpy.ndarray.tolist
Return the array as an a.ndim-levels deep nested lis... | pandas.reference.api.pandas.series.tolist |
pandas.Series.transform Series.transform(func, axis=0, *args, **kwargs)[source]
Call func on self producing a Series with the same axis shape as self. Parameters
func:function, str, list-like or dict-like
Function to use for transforming the data. If a function, must either work when passed a Series or when p... | pandas.reference.api.pandas.series.transform |
pandas.Series.transpose Series.transpose(*args, **kwargs)[source]
Return the transpose, which is by definition self. Returns
%(klass)s | pandas.reference.api.pandas.series.transpose |
pandas.Series.truediv Series.truediv(other, level=None, fill_value=None, axis=0)[source]
Return Floating division of series and other, element-wise (binary operator truediv). Equivalent to series / other, but with support to substitute a fill_value for missing data in either one of the inputs. Parameters
other:... | pandas.reference.api.pandas.series.truediv |
pandas.Series.truncate Series.truncate(before=None, after=None, axis=None, copy=True)[source]
Truncate a Series or DataFrame before and after some index value. This is a useful shorthand for boolean indexing based on index values above or below certain thresholds. Parameters
before:date, str, int
Truncate all... | pandas.reference.api.pandas.series.truncate |
pandas.Series.tshift Series.tshift(periods=1, freq=None, axis=0)[source]
Shift the time index, using the index’s frequency if available. Deprecated since version 1.1.0: Use shift instead. Parameters
periods:int
Number of periods to move, can be positive or negative.
freq:DateOffset, timedelta, or str, def... | pandas.reference.api.pandas.series.tshift |
pandas.Series.tz_convert Series.tz_convert(tz, axis=0, level=None, copy=True)[source]
Convert tz-aware axis to target time zone. Parameters
tz:str or tzinfo object
axis:the axis to convert
level:int, str, default None
If axis is a MultiIndex, convert a specific level. Otherwise must be None.
copy:bool, ... | pandas.reference.api.pandas.series.tz_convert |
pandas.Series.tz_localize Series.tz_localize(tz, axis=0, level=None, copy=True, ambiguous='raise', nonexistent='raise')[source]
Localize tz-naive index of a Series or DataFrame to target time zone. This operation localizes the Index. To localize the values in a timezone-naive Series, use Series.dt.tz_localize(). P... | pandas.reference.api.pandas.series.tz_localize |
pandas.Series.unique Series.unique()[source]
Return unique values of Series object. Uniques are returned in order of appearance. Hash table-based unique, therefore does NOT sort. Returns
ndarray or ExtensionArray
The unique values returned as a NumPy array. See Notes. See also unique
Top-level unique met... | pandas.reference.api.pandas.series.unique |
pandas.Series.unstack Series.unstack(level=- 1, fill_value=None)[source]
Unstack, also known as pivot, Series with MultiIndex to produce DataFrame. Parameters
level:int, str, or list of these, default last level
Level(s) to unstack, can pass level name.
fill_value:scalar value, default None
Value to use w... | pandas.reference.api.pandas.series.unstack |
pandas.Series.update Series.update(other)[source]
Modify Series in place using values from passed Series. Uses non-NA values from passed Series to make updates. Aligns on index. Parameters
other:Series, or object coercible into Series
Examples
>>> s = pd.Series([1, 2, 3])
>>> s.update(pd.Series([4, 5, 6]))... | pandas.reference.api.pandas.series.update |
pandas.Series.value_counts Series.value_counts(normalize=False, sort=True, ascending=False, bins=None, dropna=True)[source]
Return a Series containing counts of unique values. The resulting object will be in descending order so that the first element is the most frequently-occurring element. Excludes NA values by d... | pandas.reference.api.pandas.series.value_counts |
pandas.Series.values propertySeries.values
Return Series as ndarray or ndarray-like depending on the dtype. Warning We recommend using Series.array or Series.to_numpy(), depending on whether you need a reference to the underlying data or a NumPy array. Returns
numpy.ndarray or ndarray-like
See also Series... | pandas.reference.api.pandas.series.values |
pandas.Series.var Series.var(axis=None, skipna=True, level=None, ddof=1, numeric_only=None, **kwargs)[source]
Return unbiased variance over requested axis. Normalized by N-1 by default. This can be changed using the ddof argument. Parameters
axis:{index (0)}
skipna:bool, default True
Exclude NA/null values.... | pandas.reference.api.pandas.series.var |
pandas.Series.view Series.view(dtype=None)[source]
Create a new view of the Series. This function will return a new Series with a view of the same underlying values in memory, optionally reinterpreted with a new data type. The new data type must preserve the same size in bytes as to not cause index misalignment. P... | pandas.reference.api.pandas.series.view |
pandas.Series.where Series.where(cond, other=NoDefault.no_default, inplace=False, axis=None, level=None, errors=NoDefault.no_default, try_cast=NoDefault.no_default)[source]
Replace values where the condition is False. Parameters
cond:bool Series/DataFrame, array-like, or callable
Where cond is True, keep the ... | pandas.reference.api.pandas.series.where |
pandas.Series.xs Series.xs(key, axis=0, level=None, drop_level=True)[source]
Return cross-section from the Series/DataFrame. This method takes a key argument to select data at a particular level of a MultiIndex. Parameters
key:label or tuple of label
Label contained in the index, or partially in a MultiIndex.... | pandas.reference.api.pandas.series.xs |
pandas.set_option pandas.set_option(pat, value)=<pandas._config.config.CallableDynamicDoc object>
Sets the value of the specified option. Available options: compute.[use_bottleneck, use_numba, use_numexpr] display.[chop_threshold, colheader_justify, column_space, date_dayfirst, date_yearfirst, encoding, expand_fra... | pandas.reference.api.pandas.set_option |
pandas.show_versions pandas.show_versions(as_json=False)[source]
Provide useful information, important for bug reports. It comprises info about hosting operation system, pandas version, and versions of other installed relative packages. Parameters
as_json:str or bool, default False
If False, outputs info in ... | pandas.reference.api.pandas.show_versions |
pandas.SparseDtype classpandas.SparseDtype(dtype=<class 'numpy.float64'>, fill_value=None)[source]
Dtype for data stored in SparseArray. This dtype implements the pandas ExtensionDtype interface. Parameters
dtype:str, ExtensionDtype, numpy.dtype, type, default numpy.float64
The dtype of the underlying array s... | pandas.reference.api.pandas.sparsedtype |
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. P... | pandas.reference.api.pandas.stringdtype |
pandas.test pandas.test(extra_args=None)[source]
Run the pandas test suite using pytest. | pandas.reference.api.pandas.test |
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:Extens... | pandas.reference.api.pandas.testing.assert_extension_array_equal |
pandas.testing.assert_frame_equal pandas.testing.assert_frame_equal(left, right, check_dtype=True, check_index_type='equiv', check_column_type='equiv', check_frame_type=True, check_less_precise=NoDefault.no_default, check_names=True, by_blocks=False, check_exact=False, check_datetimelike_compat=False, check_categoric... | pandas.reference.api.pandas.testing.assert_frame_equal |
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
... | pandas.reference.api.pandas.testing.assert_index_equal |
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... | pandas.reference.api.pandas.testing.assert_series_equal |
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.timedelta... | pandas.reference.api.pandas.timedelta |
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... | pandas.reference.api.pandas.timedelta.asm8 |
pandas.Timedelta.ceil Timedelta.ceil(freq)
Return a new Timedelta ceiled to this resolution. Parameters
freq:str
Frequency string indicating the ceiling resolution. | pandas.reference.api.pandas.timedelta.ceil |
pandas.Timedelta.components Timedelta.components
Return a components namedtuple-like. | pandas.reference.api.pandas.timedelta.components |
pandas.Timedelta.days Timedelta.days
Number of days. | pandas.reference.api.pandas.timedelta.days |
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 m... | pandas.reference.api.pandas.timedelta.delta |
pandas.Timedelta.floor Timedelta.floor(freq)
Return a new Timedelta floored to this resolution. Parameters
freq:str
Frequency string indicating the flooring resolution. | pandas.reference.api.pandas.timedelta.floor |
pandas.Timedelta.freq Timedelta.freq | pandas.reference.api.pandas.timedelta.freq |
pandas.Timedelta.is_populated Timedelta.is_populated | pandas.reference.api.pandas.timedelta.is_populated |
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 ... | pandas.reference.api.pandas.timedelta.isoformat |
pandas.Timedelta.max Timedelta.max=Timedelta('106751 days 23:47:16.854775807') | pandas.reference.api.pandas.timedelta.max |
pandas.Timedelta.microseconds Timedelta.microseconds
Number of microseconds (>= 0 and less than 1 second). | pandas.reference.api.pandas.timedelta.microseconds |
pandas.Timedelta.min Timedelta.min=Timedelta('-106752 days +00:12:43.145224193') | pandas.reference.api.pandas.timedelta.min |
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).... | pandas.reference.api.pandas.timedelta.nanoseconds |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.