id
int64
0
2.13k
file_path
stringlengths
38
93
function_signature
stringlengths
9
64
body
stringlengths
6
16.2k
parameters
stringlengths
8
16.8k
examples
stringlengths
2
6.12k
content
stringlengths
31
16.3k
embeddings
listlengths
768
768
0
..\pandas\reference\api\pandas.Series.cat.reorder_categories.html
pandas.Series.cat.reorder_categories
Series.cat.reorder_categories(*args, **kwargs)[source]# Reorder categories as specified in new_categories. new_categories need to include all old categories and no new category items.
Parameters: new_categoriesIndex-likeThe categories in new order. orderedbool, optionalWhether or not the categorical is treated as a ordered categorical. If not given, do not change the ordered information. Returns: CategoricalCategorical with reordered categories. Raises: ValueErrorIf the new categories do not contain...
[">>> ser = pd.Series(['a', 'b', 'c', 'a'], dtype='category')\n>>> ser = ser.cat.reorder_categories(['c', 'b', 'a'], ordered=True)\n>>> ser\n0 a\n1 b\n2 c\n3 a\ndtype: category\nCategories (3, object): ['c' < 'b' < 'a']", ">>> ser.sort_values()\n2 c\n1 b\n0 a\n3 a\ndtype: category\nCategories (3, object...
pandas.Series.cat.reorder_categories Series.cat.reorder_categories(*args, **kwargs)[source]# Reorder categories as specified in new_categories. new_categories need to include all old categories and no new category items.
[ 0.1743732988834381, 0.010410141199827194, -0.20261168479919434, -0.029423292726278305, 0.19112850725650787, 0.2476331740617752, 0.07028717547655106, 0.41453731060028076, -0.10115280002355576, -0.054558802396059036, -0.17567071318626404, 0.22543145716190338, 0.059176329523324966, -0.0656451...
1
..\pandas\reference\api\pandas.Index.union.html
pandas.Index.union
final Index.union(other, sort=None)[source]# Form the union of two Index objects. If the Index objects are incompatible, both Index objects will be cast to dtype(‘object’) first.
Parameters: otherIndex or array-like sortbool or None, default NoneWhether to sort the resulting Index. None : Sort the result, except when self and other are equal. self or other has length 0. Some values in self or other cannot be compared. A RuntimeWarning is issued in this case. False : do not sort the result. True...
[">>> idx1 = pd.Index([1, 2, 3, 4])\n>>> idx2 = pd.Index([3, 4, 5, 6])\n>>> idx1.union(idx2)\nIndex([1, 2, 3, 4, 5, 6], dtype='int64')", ">>> idx1 = pd.Index(['a', 'b', 'c', 'd'])\n>>> idx2 = pd.Index([1, 2, 3, 4])\n>>> idx1.union(idx2)\nIndex(['a', 'b', 'c', 'd', 1, 2, 3, 4], dtype='object')", '>>> idx1 = pd.MultiInde...
pandas.Index.union final Index.union(other, sort=None)[source]# Form the union of two Index objects. If the Index objects are incompatible, both Index objects will be cast to dtype(‘object’) first.
[ 0.06122520938515663, -0.39517271518707275, -0.11384187638759613, 0.050392135977745056, 0.06906662881374359, 0.28888291120529175, 0.08519402891397476, 0.2582961916923523, 0.03239767625927925, 0.06703005731105804, -0.3115507662296295, 0.03497869148850441, 0.16140946745872498, 0.0508351102471...
2
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.argsort.html
pandas.api.extensions.ExtensionArray.argsort
ExtensionArray.argsort(*, ascending=True, kind='quicksort', na_position='last', **kwargs)[source]# Return the indices that would sort this array.
Parameters: ascendingbool, default TrueWhether the indices should result in an ascending or descending sort. kind{‘quicksort’, ‘mergesort’, ‘heapsort’, ‘stable’}, optionalSorting algorithm. na_position{‘first’, ‘last’}, default ‘last’If 'first', put NaN values at the beginning. If 'last', put NaN values at the end. *ar...
['>>> arr = pd.array([3, 1, 2, 5, 4])\n>>> arr.argsort()\narray([1, 2, 0, 4, 3])']
pandas.api.extensions.ExtensionArray.argsort ExtensionArray.argsort(*, ascending=True, kind='quicksort', na_position='last', **kwargs)[source]# Return the indices that would sort this array.
[ 0.42583590745925903, -0.45916426181793213, -0.2389986664056778, 0.037390466779470444, 0.2420763224363327, 0.28333768248558044, -0.1429510861635208, 0.33295923471450806, -0.015330441296100616, 0.3166268467903137, -0.23578789830207825, 0.24674224853515625, 0.07156559824943542, -0.06646988540...
3
..\pandas\reference\api\pandas.DataFrame.reset_index.html
pandas.DataFrame.reset_index
DataFrame.reset_index(level=None, *, drop=False, inplace=False, col_level=0, col_fill='', allow_duplicates=<no_default>, names=None)[source]# Reset the index, or a level of it. Reset the index of the DataFrame, and use the default one instead. If the DataFrame has a MultiIndex, this method can remove one or more levels...
Parameters: levelint, str, tuple, or list, default NoneOnly remove the given levels from the index. Removes all levels by default. dropbool, default FalseDo not try to insert index into dataframe columns. This resets the index to the default integer index. inplacebool, default FalseWhether to modify the DataFrame rathe...
[">>> df = pd.DataFrame([('bird', 389.0),\n... ('bird', 24.0),\n... ('mammal', 80.5),\n... ('mammal', np.nan)],\n... index=['falcon', 'parrot', 'lion', 'monkey'],\n... columns=('class', 'max_speed'))\n>>> df\n class ma...
pandas.DataFrame.reset_index DataFrame.reset_index(level=None, *, drop=False, inplace=False, col_level=0, col_fill='', allow_duplicates=<no_default>, names=None)[source]# Reset the index, or a level of it. Reset the index of the DataFrame, and use the default one instead. If the DataFrame has a MultiIndex, this method ...
[ 0.02651648223400116, -0.26891571283340454, -0.1850941777229309, 0.021301522850990295, 0.06572160869836807, 0.21839478611946106, 0.4030283987522125, 0.249111607670784, 0.05866248905658722, 0.33151566982269287, -0.2785235643386841, 0.2798389494419098, 0.1359468251466751, 0.23915448784828186,...
4
..\pandas\reference\api\pandas.Series.cat.set_categories.html
pandas.Series.cat.set_categories
Series.cat.set_categories(*args, **kwargs)[source]# Set the categories to the specified new categories. new_categories can include new categories (which will result in unused categories) or remove old categories (which results in values set to NaN). If rename=True, the categories will simply be renamed (less or more it...
Parameters: new_categoriesIndex-likeThe categories in new order. orderedbool, default FalseWhether or not the categorical is treated as a ordered categorical. If not given, do not change the ordered information. renamebool, default FalseWhether or not the new_categories should be considered as a rename of the old categ...
[">>> raw_cat = pd.Categorical(['a', 'b', 'c', 'A'],\n... categories=['a', 'b', 'c'], ordered=True)\n>>> ser = pd.Series(raw_cat)\n>>> ser\n0 a\n1 b\n2 c\n3 NaN\ndtype: category\nCategories (3, object): ['a' < 'b' < 'c']", ">>> ser.cat.set_categories(['A', 'B', 'C'], rename=True)\n0 ...
pandas.Series.cat.set_categories Series.cat.set_categories(*args, **kwargs)[source]# Set the categories to the specified new categories. new_categories can include new categories (which will result in unused categories) or remove old categories (which results in values set to NaN). If rename=True, the categories will s...
[ 0.2757214605808258, -0.07529807835817337, -0.14921633899211884, -0.09256383031606674, 0.12990713119506836, 0.31438833475112915, 0.23177385330200195, 0.24116931855678558, -0.30898964405059814, 0.10925377160310745, -0.3287297189235687, 0.18066655099391937, 0.04052772745490074, -0.12488977611...
5
..\pandas\reference\api\pandas.Series.to_csv.html
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='"', lineterminator=None, chunksize=None, date_format=None, doublequote=True, escapechar=None, decimal='.', errors='str...
Parameters: path_or_bufstr, path object, file-like object, or None, default NoneString, path object (implementing os.PathLike[str]), or file-like object implementing a write() function. If None, the result is returned as a string. If a non-binary file object is passed, it should be opened with newline=’’, disabling uni...
[">>> df = pd.DataFrame({'name': ['Raphael', 'Donatello'],\n... 'mask': ['red', 'purple'],\n... 'weapon': ['sai', 'bo staff']})\n>>> df.to_csv('out.csv', index=False)", ">>> df.to_csv(index=False)\n'name,mask,weapon\\nRaphael,red,sai\\nDonatello,purple,bo staff\\n'\n>>> compression...
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='"', lineterminator=None, chunksize=None, date_format=None, doublequote=True, escapechar=None, dec...
[ 0.0003060437156818807, -0.10263757407665253, -0.2104552835226059, 0.07009566575288773, 0.35673844814300537, 0.2621782124042511, 0.20084398984909058, 0.5478160381317139, 0.05385109782218933, 0.1304100751876831, 0.0460737980902195, 0.2863556742668152, 0.06558741629123688, 0.19931679964065552...
6
..\pandas\reference\api\pandas.tseries.offsets.Milli.delta.html
pandas.tseries.offsets.Milli.delta
Milli.delta#
No parameters found
[]
pandas.tseries.offsets.Milli.delta Milli.delta#
[ -0.2962976098060608, -0.6011965870857239, -0.27237850427627563, 0.0012208892730996013, 0.08896516263484955, 0.06200403347611427, 0.31093695759773254, 0.055634237825870514, -0.3121865689754486, 0.2483321577310562, 0.1478181928396225, 0.15999971330165863, 0.1228051409125328, 0.36816886067390...
7
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.ngroup.html
pandas.core.groupby.SeriesGroupBy.ngroup
SeriesGroupBy.ngroup(ascending=True)[source]# Number each group from 0 to the number of groups - 1. This is the enumerative complement of cumcount. Note that the numbers given to the groups match the order in which the groups would be seen when iterating over the groupby object, not the order they are first observed. ...
Parameters: ascendingbool, default TrueIf False, number in reverse, from number of group - 1 to 0. Returns: SeriesUnique numbers for each group.
['>>> df = pd.DataFrame({"color": ["red", None, "red", "blue", "blue", "red"]})\n>>> df\n color\n0 red\n1 None\n2 red\n3 blue\n4 blue\n5 red\n>>> df.groupby("color").ngroup()\n0 1.0\n1 NaN\n2 1.0\n3 0.0\n4 0.0\n5 1.0\ndtype: float64\n>>> df.groupby("color", dropna=False).ngroup()\n0 ...
pandas.core.groupby.SeriesGroupBy.ngroup SeriesGroupBy.ngroup(ascending=True)[source]# Number each group from 0 to the number of groups - 1. This is the enumerative complement of cumcount. Note that the numbers given to the groups match the order in which the groups would be seen when iterating over the groupby object...
[ -0.061997901648283005, -0.2727109491825104, -0.15349817276000977, 0.09646670520305634, -0.13349242508411407, 0.3637765645980835, 0.22620482742786407, 0.005550822243094444, 0.015044666826725006, 0.23986129462718964, -0.15020033717155457, -0.06924748420715332, 0.3183963894844055, -0.03784231...
8
..\pandas\reference\api\pandas.tseries.offsets.BYearBegin.freqstr.html
pandas.tseries.offsets.BYearBegin.freqstr
BYearBegin.freqstr# Return a string representing the frequency.
No parameters found
[">>> pd.DateOffset(5).freqstr\n'<5 * DateOffsets>'", ">>> pd.offsets.BusinessHour(2).freqstr\n'2bh'", ">>> pd.offsets.Nano().freqstr\n'ns'", ">>> pd.offsets.Nano(-3).freqstr\n'-3ns'"]
pandas.tseries.offsets.BYearBegin.freqstr BYearBegin.freqstr# Return a string representing the frequency.
[ -0.2928342819213867, -0.6248272657394409, -0.1807110756635666, 0.01242088433355093, 0.0965292677283287, -0.0068465727381408215, 0.14047442376613617, 0.12596817314624786, -0.23005536198616028, 0.30317872762680054, -0.15295591950416565, -0.0164842139929533, 0.056463491171598434, 0.1880466938...
9
..\pandas\reference\api\pandas.Index.unique.html
pandas.Index.unique
Index.unique(level=None)[source]# Return unique values in the index. Unique values are returned in order of appearance, this does NOT sort.
Parameters: levelint or hashable, optionalOnly return values from specified level (for MultiIndex). If int, gets the level by integer position, else by level name. Returns: Index
[">>> idx = pd.Index([1, 1, 2, 3, 3])\n>>> idx.unique()\nIndex([1, 2, 3], dtype='int64')"]
pandas.Index.unique Index.unique(level=None)[source]# Return unique values in the index. Unique values are returned in order of appearance, this does NOT sort.
[ 0.250370055437088, -0.4259299635887146, -0.204690083861351, 0.17691700160503387, 0.09586609899997711, 0.15956319868564606, 0.2561158835887909, 0.1849251389503479, -0.11676943302154541, 0.27294978499412537, -0.25583815574645996, 0.3397311866283417, 0.02956288494169712, 0.10479648411273956, ...
10
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.astype.html
pandas.api.extensions.ExtensionArray.astype
ExtensionArray.astype(dtype, copy=True)[source]# Cast to a NumPy array or ExtensionArray with ‘dtype’.
Parameters: dtypestr or dtypeTypecode or data-type to which the array is cast. copybool, default TrueWhether to copy the data, even if not necessary. If False, a copy is made only if the old dtype does not match the new dtype. Returns: np.ndarray or pandas.api.extensions.ExtensionArrayAn ExtensionArray if dtype is Exte...
['>>> arr = pd.array([1, 2, 3])\n>>> arr\n<IntegerArray>\n[1, 2, 3]\nLength: 3, dtype: Int64', ">>> arr1 = arr.astype('Float64')\n>>> arr1\n<FloatingArray>\n[1.0, 2.0, 3.0]\nLength: 3, dtype: Float64\n>>> arr1.dtype\nFloat64Dtype()", ">>> arr2 = arr.astype('float64')\n>>> arr2\narray([1., 2., 3.])\n>>> arr2.dtype\ndtyp...
pandas.api.extensions.ExtensionArray.astype ExtensionArray.astype(dtype, copy=True)[source]# Cast to a NumPy array or ExtensionArray with ‘dtype’.
[ 0.10765499621629715, -0.43835732340812683, -0.11284776031970978, 0.04972665756940842, 0.5462608337402344, 0.22064009308815002, 0.1701744645833969, 0.33484914898872375, 0.0939728170633316, 0.0323631577193737, -0.17115174233913422, 0.4402351975440979, -0.3562995493412018, 0.07489725947380066...
11
..\pandas\reference\api\pandas.DataFrame.rfloordiv.html
pandas.DataFrame.rfloordiv
DataFrame.rfloordiv(other, axis='columns', level=None, fill_value=None)[source]# Get Integer division of dataframe and other, element-wise (binary operator rfloordiv). Equivalent to other // dataframe, but with support to substitute a fill_value for missing data in one of the inputs. With reverse version, floordiv. Amo...
Parameters: otherscalar, sequence, Series, dict or DataFrameAny single or multiple element data structure, or list-like object. axis{0 or ‘index’, 1 or ‘columns’}Whether to compare by the index (0 or ‘index’) or columns. (1 or ‘columns’). For Series input, axis to match Series index on. levelint or labelBroadcast acros...
[">>> df = pd.DataFrame({'angles': [0, 3, 4],\n... 'degrees': [360, 180, 360]},\n... index=['circle', 'triangle', 'rectangle'])\n>>> df\n angles degrees\ncircle 0 360\ntriangle 3 180\nrectangle 4 360", '>>> df + 1\n angles d...
pandas.DataFrame.rfloordiv DataFrame.rfloordiv(other, axis='columns', level=None, fill_value=None)[source]# Get Integer division of dataframe and other, element-wise (binary operator rfloordiv). Equivalent to other // dataframe, but with support to substitute a fill_value for missing data in one of the inputs. With rev...
[ -0.04919286444783211, -0.13006043434143066, -0.11758352816104889, 0.08172391355037689, 0.04115249216556549, 0.2646414041519165, 0.08702301979064941, 0.24021627008914948, -0.09901171922683716, 0.2871772348880768, -0.3917086124420166, 0.3148137331008911, 0.09382210671901703, 0.08885973691940...
12
..\pandas\reference\api\pandas.Series.clip.html
pandas.Series.clip
Series.clip(lower=None, upper=None, *, axis=None, inplace=False, **kwargs)[source]# Trim values at input threshold(s). Assigns values outside boundary to boundary values. Thresholds can be singular values or array like, and in the latter case the clipping is performed element-wise in the specified axis.
Parameters: lowerfloat or array-like, default NoneMinimum threshold value. All values below this threshold will be set to it. A missing threshold (e.g NA) will not clip the value. upperfloat or array-like, default NoneMaximum threshold value. All values above this threshold will be set to it. A missing threshold (e.g N...
[">>> data = {'col_0': [9, -3, 0, -1, 5], 'col_1': [-2, -7, 6, 8, -5]}\n>>> df = pd.DataFrame(data)\n>>> df\n col_0 col_1\n0 9 -2\n1 -3 -7\n2 0 6\n3 -1 8\n4 5 -5", '>>> df.clip(-4, 6)\n col_0 col_1\n0 6 -2\n1 -3 -4\n2 0 6\n3 -1 6\n4 ...
pandas.Series.clip Series.clip(lower=None, upper=None, *, axis=None, inplace=False, **kwargs)[source]# Trim values at input threshold(s). Assigns values outside boundary to boundary values. Thresholds can be singular values or array like, and in the latter case the clipping is performed element-wise in the specified ax...
[ 0.031968675553798676, -0.6090909242630005, -0.22448857128620148, -0.2513089179992676, -0.030374301597476006, -0.08775061368942261, 0.28994104266166687, 0.4766363799571991, -0.06809932738542557, 0.5268424153327942, -0.2709980607032776, 0.4561999440193176, 0.25499242544174194, 0.504651248455...
13
..\pandas\reference\api\pandas.Series.to_dict.html
pandas.Series.to_dict
Series.to_dict(*, into=<class 'dict'>)[source]# Convert Series to {label -> value} dict or dict-like object.
Parameters: intoclass, default dictThe collections.abc.MutableMapping subclass to use as the return object. Can be the actual class or an empty instance of the mapping type you want. If you want a collections.defaultdict, you must pass it initialized. Returns: collections.abc.MutableMappingKey-value representation of ...
[">>> s = pd.Series([1, 2, 3, 4])\n>>> s.to_dict()\n{0: 1, 1: 2, 2: 3, 3: 4}\n>>> from collections import OrderedDict, defaultdict\n>>> s.to_dict(into=OrderedDict)\nOrderedDict([(0, 1), (1, 2), (2, 3), (3, 4)])\n>>> dd = defaultdict(list)\n>>> s.to_dict(into=dd)\ndefaultdict(<class 'list'>, {0: 1, 1: 2, 2: 3, 3: 4})"]
pandas.Series.to_dict Series.to_dict(*, into=<class 'dict'>)[source]# Convert Series to {label -> value} dict or dict-like object.
[ -0.15140914916992188, -0.2270398885011673, -0.1553826928138733, 0.11584924161434174, 0.2700466513633728, 0.19723021984100342, 0.1368613988161087, 0.39726436138153076, 0.06601240485906601, 0.26851963996887207, -0.23228876292705536, 0.4432410001754761, -0.10479127615690231, 0.413385063409805...
14
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.copy.html
pandas.api.extensions.ExtensionArray.copy
ExtensionArray.copy()[source]# Return a copy of the array.
Returns: ExtensionArray
['>>> arr = pd.array([1, 2, 3])\n>>> arr2 = arr.copy()\n>>> arr[0] = 2\n>>> arr2\n<IntegerArray>\n[1, 2, 3]\nLength: 3, dtype: Int64']
pandas.api.extensions.ExtensionArray.copy ExtensionArray.copy()[source]# Return a copy of the array.
[ 0.2552269995212555, -0.2023015320301056, -0.19286924600601196, -0.03729274123907089, 0.019409621134400368, 0.01086873933672905, 0.113193579018116, 0.3704909384250641, -0.08522770553827286, 0.2661875784397125, -0.05285705253481865, 0.4271886348724365, -0.0009380162227898836, 0.0452181622385...
15
..\pandas\reference\api\pandas.tseries.offsets.BYearBegin.html
pandas.tseries.offsets.BYearBegin
class pandas.tseries.offsets.BYearBegin# DateOffset increments between the first business day of the year. Examples Attributes base Returns a copy of the calling offset object with n=1 and all other attributes equal. freqstr Return a string representing the frequency. kwds Return a dict of extra parameters for the offs...
Parameters: nint, default 1The number of years represented. normalizebool, default FalseNormalize start/end dates to midnight before generating date range. monthint, default 1A specific integer for the month of the year.
[">>> from pandas.tseries.offsets import BYearBegin\n>>> ts = pd.Timestamp('2020-05-24 05:01:15')\n>>> ts + BYearBegin()\nTimestamp('2021-01-01 05:01:15')\n>>> ts - BYearBegin()\nTimestamp('2020-01-01 05:01:15')\n>>> ts + BYearBegin(-1)\nTimestamp('2020-01-01 05:01:15')\n>>> ts + BYearBegin(2)\nTimestamp('2022-01-03 05...
pandas.tseries.offsets.BYearBegin class pandas.tseries.offsets.BYearBegin# DateOffset increments between the first business day of the year. Examples Attributes base Returns a copy of the calling offset object with n=1 and all other attributes equal. freqstr Return a string representing the frequency. kwds Return a dic...
[ -0.09185703098773956, -0.36200612783432007, -0.0850796028971672, -0.15839233994483948, 0.06509282439947128, 0.15356627106666565, 0.2735942602157593, 0.09530893713235855, -0.34460288286209106, 0.21137097477912903, 0.19896067678928375, 0.13464629650115967, 0.06430061161518097, 0.326881408691...
16
..\pandas\reference\api\pandas.Index.values.html
pandas.Index.values
property Index.values[source]# Return an array representing the data in the Index. Warning We recommend using Index.array or Index.to_numpy(), depending on whether you need a reference to the underlying data or a NumPy array.
Returns: array: numpy.ndarray or ExtensionArray
[">>> idx = pd.Index([1, 2, 3])\n>>> idx\nIndex([1, 2, 3], dtype='int64')\n>>> idx.values\narray([1, 2, 3])", '>>> idx = pd.interval_range(start=0, end=5)\n>>> idx.values\n<IntervalArray>\n[(0, 1], (1, 2], (2, 3], (3, 4], (4, 5]]\nLength: 5, dtype: interval[int64, right]']
pandas.Index.values property Index.values[source]# Return an array representing the data in the Index. Warning We recommend using Index.array or Index.to_numpy(), depending on whether you need a reference to the underlying data or a NumPy array.
[ -0.0503767654299736, -0.17869669198989868, -0.2083379179239273, 0.09205209463834763, 0.13113601505756378, 0.13407276570796967, 0.36157116293907166, 0.45853498578071594, -0.003298767376691103, 0.25328201055526733, -0.32029420137405396, 0.5525062084197998, 0.13677063584327698, 0.196670591831...
17
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.nlargest.html
pandas.core.groupby.SeriesGroupBy.nlargest
SeriesGroupBy.nlargest(n=5, keep='first')[source]# Return the largest n elements. Notes Faster than .sort_values(ascending=False).head(n) for small n relative to the size of the Series object.
Parameters: nint, default 5Return this many descending sorted values. keep{‘first’, ‘last’, ‘all’}, default ‘first’When there are duplicate values that cannot all fit in a Series of n elements: first : return the first n occurrences in order of appearance. last : return the last n occurrences in reverse order of appear...
['>>> countries_population = {"Italy": 59000000, "France": 65000000,\n... "Malta": 434000, "Maldives": 434000,\n... "Brunei": 434000, "Iceland": 337000,\n... "Nauru": 11300, "Tuvalu": 11300,\n... "Anguilla": 11300, "Montserr...
pandas.core.groupby.SeriesGroupBy.nlargest SeriesGroupBy.nlargest(n=5, keep='first')[source]# Return the largest n elements. Notes Faster than .sort_values(ascending=False).head(n) for small n relative to the size of the Series object.
[ -0.21743741631507874, -0.4628458321094513, -0.22167296707630157, 0.212827667593956, -0.22912755608558655, 0.2268533706665039, -0.21074822545051575, 0.3196616768836975, 0.16902391612529755, 0.23585620522499084, -0.21752111613750458, 0.13598522543907166, -0.026800664141774178, 0.136490061879...
18
..\pandas\reference\api\pandas.DataFrame.rmod.html
pandas.DataFrame.rmod
DataFrame.rmod(other, axis='columns', level=None, fill_value=None)[source]# Get Modulo of dataframe and other, element-wise (binary operator rmod). Equivalent to other % dataframe, but with support to substitute a fill_value for missing data in one of the inputs. With reverse version, mod. Among flexible wrappers (add,...
Parameters: otherscalar, sequence, Series, dict or DataFrameAny single or multiple element data structure, or list-like object. axis{0 or ‘index’, 1 or ‘columns’}Whether to compare by the index (0 or ‘index’) or columns. (1 or ‘columns’). For Series input, axis to match Series index on. levelint or labelBroadcast acros...
[">>> df = pd.DataFrame({'angles': [0, 3, 4],\n... 'degrees': [360, 180, 360]},\n... index=['circle', 'triangle', 'rectangle'])\n>>> df\n angles degrees\ncircle 0 360\ntriangle 3 180\nrectangle 4 360", '>>> df + 1\n angles d...
pandas.DataFrame.rmod DataFrame.rmod(other, axis='columns', level=None, fill_value=None)[source]# Get Modulo of dataframe and other, element-wise (binary operator rmod). Equivalent to other % dataframe, but with support to substitute a fill_value for missing data in one of the inputs. With reverse version, mod. Among f...
[ -0.13130605220794678, -0.14468830823898315, -0.08704252541065216, 0.060045622289180756, -0.029186395928263664, 0.2991948425769806, 0.28415295481681824, 0.4216545820236206, -0.16902759671211243, 0.2154640555381775, -0.40935733914375305, 0.3190644681453705, 0.16863760352134705, -0.0694283470...
19
..\pandas\reference\api\pandas.tseries.offsets.Milli.freqstr.html
pandas.tseries.offsets.Milli.freqstr
Milli.freqstr# Return a string representing the frequency.
No parameters found
[">>> pd.DateOffset(5).freqstr\n'<5 * DateOffsets>'", ">>> pd.offsets.BusinessHour(2).freqstr\n'2bh'", ">>> pd.offsets.Nano().freqstr\n'ns'", ">>> pd.offsets.Nano(-3).freqstr\n'-3ns'"]
pandas.tseries.offsets.Milli.freqstr Milli.freqstr# Return a string representing the frequency.
[ -0.20331160724163055, -0.5466115474700928, -0.20772986114025116, -0.0020623954478651285, 0.16957013309001923, -0.00595617713406682, 0.21752388775348663, 0.09185800701379776, -0.3241743743419647, 0.3970036804676056, 0.02137695997953415, 0.15929867327213287, -0.01689823716878891, 0.249680295...
20
..\pandas\reference\api\pandas.Series.combine.html
pandas.Series.combine
Series.combine(other, func, fill_value=None)[source]# Combine the Series with a Series or scalar according to func. Combine the Series and other using func to perform elementwise selection for combined Series. fill_value is assumed when value is missing at some index from one of the two objects being combined.
Parameters: otherSeries or scalarThe value(s) to be combined with the Series. funcfunctionFunction that takes two scalars as inputs and returns an element. fill_valuescalar, optionalThe value to assume when an index is missing from one Series or the other. The default specifies to use the appropriate NaN value for the ...
[">>> s1 = pd.Series({'falcon': 330.0, 'eagle': 160.0})\n>>> s1\nfalcon 330.0\neagle 160.0\ndtype: float64\n>>> s2 = pd.Series({'falcon': 345.0, 'eagle': 200.0, 'duck': 30.0})\n>>> s2\nfalcon 345.0\neagle 200.0\nduck 30.0\ndtype: float64", '>>> s1.combine(s2, max)\nduck NaN\neagle 200.0\n...
pandas.Series.combine Series.combine(other, func, fill_value=None)[source]# Combine the Series with a Series or scalar according to func. Combine the Series and other using func to perform elementwise selection for combined Series. fill_value is assumed when value is missing at some index from one of the two objects be...
[ -0.06632059067487717, -0.26039665937423706, -0.10634869337081909, 0.0673750564455986, -0.045240189880132675, 0.26937276124954224, -0.008097588084638119, 0.3461974561214447, -0.01714937388896942, 0.4006600081920624, -0.15592201054096222, 0.3908197283744812, 0.26869627833366394, 0.0067926584...
21
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.dropna.html
pandas.api.extensions.ExtensionArray.dropna
ExtensionArray.dropna()[source]# Return ExtensionArray without NA values.
Returns:
['>>> pd.array([1, 2, np.nan]).dropna()\n<IntegerArray>\n[1, 2]\nLength: 2, dtype: Int64']
pandas.api.extensions.ExtensionArray.dropna ExtensionArray.dropna()[source]# Return ExtensionArray without NA values.
[ 0.25537538528442383, -0.3061290383338928, -0.213585764169693, -0.0647536963224411, 0.14212195575237274, -0.2140991985797882, -0.14359594881534576, 0.44784075021743774, 0.0257350392639637, 0.41627055406570435, -0.23099210858345032, 0.45552459359169006, -0.032762859016656876, 0.1715437024831...
22
..\pandas\reference\api\pandas.Series.to_excel.html
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, inf_rep='inf', freeze_panes=None, storage_options=None, engine_kwargs=None)[source]# Write object to an Excel sheet. To writ...
Parameters: excel_writerpath-like, file-like, or ExcelWriter objectFile path or existing ExcelWriter. sheet_namestr, default ‘Sheet1’Name of sheet which will contain DataFrame. na_repstr, default ‘’Missing data representation. float_formatstr, optionalFormat string for floating point numbers. For example float_format="...
['>>> df1 = pd.DataFrame([[\'a\', \'b\'], [\'c\', \'d\']],\n... index=[\'row 1\', \'row 2\'],\n... columns=[\'col 1\', \'col 2\'])\n>>> df1.to_excel("output.xlsx")', '>>> df1.to_excel("output.xlsx",\n... sheet_name=\'Sheet_name_1\')', ">>> df2 = df1.copy()\n>>> with pd...
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, inf_rep='inf', freeze_panes=None, storage_options=None, engine_kwargs=None)[source]# Write object to ...
[ -0.044217903167009354, -0.20696216821670532, -0.07804185897111893, -0.01756676658987999, 0.18764415383338928, 0.16110464930534363, 0.1691712588071823, 0.6006916165351868, 0.054070886224508286, 0.050380297005176544, -0.12607620656490326, 0.09312110394239426, 0.22385768592357635, 0.368968576...
23
..\pandas\reference\api\pandas.tseries.offsets.BYearBegin.is_anchored.html
pandas.tseries.offsets.BYearBegin.is_anchored
BYearBegin.is_anchored()# Return boolean whether the frequency is a unit frequency (n=1). Deprecated since version 2.2.0: is_anchored is deprecated and will be removed in a future version. Use obj.n == 1 instead.
No parameters found
['>>> pd.DateOffset().is_anchored()\nTrue\n>>> pd.DateOffset(2).is_anchored()\nFalse']
pandas.tseries.offsets.BYearBegin.is_anchored BYearBegin.is_anchored()# Return boolean whether the frequency is a unit frequency (n=1). Deprecated since version 2.2.0: is_anchored is deprecated and will be removed in a future version. Use obj.n == 1 instead.
[ -0.23843134939670563, -0.7682912945747375, -0.13180282711982727, -0.11841455847024918, -0.03126904368400574, -0.1586248278617859, 0.38794952630996704, 0.24366138875484467, -0.20049291849136353, 0.2554876506328583, -0.07089570164680481, -0.09745495021343231, -0.014111661352217197, 0.1449301...
24
..\pandas\reference\api\pandas.Index.value_counts.html
pandas.Index.value_counts
Index.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 default.
Parameters: normalizebool, default FalseIf True then the object returned will contain the relative frequencies of the unique values. sortbool, default TrueSort by frequencies when True. Preserve the order of the data when False. ascendingbool, default FalseSort in ascending order. binsint, optionalRather than count val...
['>>> index = pd.Index([3, 1, 2, 3, 4, np.nan])\n>>> index.value_counts()\n3.0 2\n1.0 1\n2.0 1\n4.0 1\nName: count, dtype: int64', '>>> s = pd.Series([3, 1, 2, 3, 4, np.nan])\n>>> s.value_counts(normalize=True)\n3.0 0.4\n1.0 0.2\n2.0 0.2\n4.0 0.2\nName: proportion, dtype: float64', '>>> s.value_...
pandas.Index.value_counts Index.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 defaul...
[ -0.09713111072778702, -0.404043585062027, -0.23536548018455505, 0.1608218550682068, -0.03697705641388893, 0.1089136078953743, 0.039155926555395126, 0.08559777587652206, -0.005295124836266041, 0.4145324230194092, -0.2419060319662094, 0.23491601645946503, 0.007388388738036156, 0.274684190750...
25
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.nsmallest.html
pandas.core.groupby.SeriesGroupBy.nsmallest
SeriesGroupBy.nsmallest(n=5, keep='first')[source]# Return the smallest n elements. Notes Faster than .sort_values().head(n) for small n relative to the size of the Series object.
Parameters: nint, default 5Return this many ascending sorted values. keep{‘first’, ‘last’, ‘all’}, default ‘first’When there are duplicate values that cannot all fit in a Series of n elements: first : return the first n occurrences in order of appearance. last : return the last n occurrences in reverse order of appeara...
['>>> countries_population = {"Italy": 59000000, "France": 65000000,\n... "Brunei": 434000, "Malta": 434000,\n... "Maldives": 434000, "Iceland": 337000,\n... "Nauru": 11300, "Tuvalu": 11300,\n... "Anguilla": 11300, "Montserr...
pandas.core.groupby.SeriesGroupBy.nsmallest SeriesGroupBy.nsmallest(n=5, keep='first')[source]# Return the smallest n elements. Notes Faster than .sort_values().head(n) for small n relative to the size of the Series object.
[ -0.1764701008796692, -0.3193742036819458, -0.2313763052225113, 0.06676914542913437, -0.04651512950658798, 0.17168676853179932, -0.12165577709674835, 0.42658892273902893, -0.029910018667578697, 0.26865994930267334, -0.14364702999591827, 0.02692009136080742, 0.013742071576416492, 0.070096313...
26
..\pandas\reference\api\pandas.DataFrame.rmul.html
pandas.DataFrame.rmul
DataFrame.rmul(other, axis='columns', level=None, fill_value=None)[source]# Get Multiplication of dataframe and other, element-wise (binary operator rmul). Equivalent to other * dataframe, but with support to substitute a fill_value for missing data in one of the inputs. With reverse version, mul. Among flexible wrappe...
Parameters: otherscalar, sequence, Series, dict or DataFrameAny single or multiple element data structure, or list-like object. axis{0 or ‘index’, 1 or ‘columns’}Whether to compare by the index (0 or ‘index’) or columns. (1 or ‘columns’). For Series input, axis to match Series index on. levelint or labelBroadcast acros...
[">>> df = pd.DataFrame({'angles': [0, 3, 4],\n... 'degrees': [360, 180, 360]},\n... index=['circle', 'triangle', 'rectangle'])\n>>> df\n angles degrees\ncircle 0 360\ntriangle 3 180\nrectangle 4 360", '>>> df + 1\n angles d...
pandas.DataFrame.rmul DataFrame.rmul(other, axis='columns', level=None, fill_value=None)[source]# Get Multiplication of dataframe and other, element-wise (binary operator rmul). Equivalent to other * dataframe, but with support to substitute a fill_value for missing data in one of the inputs. With reverse version, mul....
[ -0.09674134105443954, -0.33191439509391785, -0.06361249089241028, 0.09268709272146225, -0.053423598408699036, 0.3482145369052887, 0.30554696917533875, 0.20125925540924072, -0.12678691744804382, 0.3159809410572052, -0.28729671239852905, 0.3254895806312561, 0.02737044170498848, 0.16496655344...
27
..\pandas\reference\api\pandas.Series.combine_first.html
pandas.Series.combine_first
Series.combine_first(other)[source]# Update null elements with value in the same location in ‘other’. Combine two Series objects by filling null values in one Series with non-null values from the other Series. Result index will be the union of the two indexes.
Parameters: otherSeriesThe value(s) to be used for filling null values. Returns: SeriesThe result of combining the provided Series with the other object.
['>>> s1 = pd.Series([1, np.nan])\n>>> s2 = pd.Series([3, 4, 5])\n>>> s1.combine_first(s2)\n0 1.0\n1 4.0\n2 5.0\ndtype: float64', ">>> s1 = pd.Series({'falcon': np.nan, 'eagle': 160.0})\n>>> s2 = pd.Series({'eagle': 200.0, 'duck': 30.0})\n>>> s1.combine_first(s2)\nduck 30.0\neagle 160.0\nfalcon ...
pandas.Series.combine_first Series.combine_first(other)[source]# Update null elements with value in the same location in ‘other’. Combine two Series objects by filling null values in one Series with non-null values from the other Series. Result index will be the union of the two indexes.
[ -0.12954925000667572, -0.19500048458576202, -0.18828530609607697, 0.06209808215498924, -0.19993159174919128, 0.4851006865501404, 0.02443564496934414, 0.43896806240081787, -0.08299414813518524, 0.15423732995986938, -0.25955551862716675, 0.15812894701957703, 0.2681475579738617, 0.04246776178...
28
..\pandas\reference\api\pandas.tseries.offsets.BYearBegin.is_month_end.html
pandas.tseries.offsets.BYearBegin.is_month_end
BYearBegin.is_month_end(ts)# Return boolean whether a timestamp occurs on the month end.
No parameters found
['>>> ts = pd.Timestamp(2022, 1, 1)\n>>> freq = pd.offsets.Hour(5)\n>>> freq.is_month_end(ts)\nFalse']
pandas.tseries.offsets.BYearBegin.is_month_end BYearBegin.is_month_end(ts)# Return boolean whether a timestamp occurs on the month end.
[ 0.006314068101346493, -0.5230922698974609, -0.20678433775901794, -0.20769910514354706, -0.24808673560619354, 0.016149133443832397, 0.19829559326171875, 0.28848740458488464, 0.041388772428035736, 0.1541263312101364, 0.3002278506755829, 0.28945475816726685, 0.18362407386302948, 0.14486882090...
29
..\pandas\reference\api\pandas.Series.to_frame.html
pandas.Series.to_frame
Series.to_frame(name=<no_default>)[source]# Convert Series to DataFrame.
Parameters: nameobject, optionalThe passed name should substitute for the series name (if it has one). Returns: DataFrameDataFrame representation of Series.
['>>> s = pd.Series(["a", "b", "c"],\n... name="vals")\n>>> s.to_frame()\n vals\n0 a\n1 b\n2 c']
pandas.Series.to_frame Series.to_frame(name=<no_default>)[source]# Convert Series to DataFrame.
[ -0.33149948716163635, -0.14917001128196716, -0.07823330909013748, -0.11798621714115143, 0.4257878065109253, 0.29082438349723816, 0.3448687195777893, 0.4863070249557495, -0.14201027154922485, 0.12377271801233292, -0.00031738082179799676, 0.33807599544525146, -0.11950656026601791, 0.32315912...
30
..\pandas\reference\api\pandas.Index.view.html
pandas.Index.view
Index.view(cls=None)[source]#
No parameters found
[]
pandas.Index.view Index.view(cls=None)[source]#
[ -0.04290459305047989, -0.30245140194892883, -0.11894883215427399, -0.19308438897132874, 0.24112167954444885, 0.023486066609621048, 0.4192395806312561, 0.36801302433013916, 0.28513303399086, 0.2548106908798218, -0.28188344836235046, 0.2624701261520386, 0.002979064593091607, 0.22046738862991...
31
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.dtype.html
pandas.api.extensions.ExtensionArray.dtype
property ExtensionArray.dtype[source]# An instance of ExtensionDtype.
No parameters found
['>>> pd.array([1, 2, 3]).dtype\nInt64Dtype()']
pandas.api.extensions.ExtensionArray.dtype property ExtensionArray.dtype[source]# An instance of ExtensionDtype.
[ 0.12339970469474792, -0.4930247366428375, -0.19641481339931488, 0.15607671439647675, 0.3733149468898773, 0.15745888650417328, 0.2295379787683487, 0.24953989684581757, -0.02721593715250492, 0.2962948977947235, 0.09536480158567429, 0.30415409803390503, -0.15830539166927338, 0.093385010957717...
32
..\pandas\reference\api\pandas.tseries.offsets.Milli.html
pandas.tseries.offsets.Milli
class pandas.tseries.offsets.Milli# Offset n milliseconds. Examples You can use the parameter n to represent a shift of n milliseconds. Attributes base Returns a copy of the calling offset object with n=1 and all other attributes equal. delta freqstr Return a string representing the frequency. kwds Return a dict of ext...
Parameters: nint, default 1The number of milliseconds represented.
[">>> from pandas.tseries.offsets import Milli\n>>> ts = pd.Timestamp(2022, 12, 9, 15)\n>>> ts\nTimestamp('2022-12-09 15:00:00')", ">>> ts + Milli(n=10)\nTimestamp('2022-12-09 15:00:00.010000')", ">>> ts - Milli(n=10)\nTimestamp('2022-12-09 14:59:59.990000')", ">>> ts + Milli(n=-10)\nTimestamp('2022-12-09 14:59:59.9900...
pandas.tseries.offsets.Milli class pandas.tseries.offsets.Milli# Offset n milliseconds. Examples You can use the parameter n to represent a shift of n milliseconds. Attributes base Returns a copy of the calling offset object with n=1 and all other attributes equal. delta freqstr Return a string representing the frequen...
[ -0.30208078026771545, -0.6350206732749939, -0.1068340465426445, -0.12979727983474731, 0.01091797649860382, 0.0031466721557080746, 0.16883784532546997, 0.11809758841991425, -0.40569132566452026, 0.21215495467185974, 0.22086749970912933, 0.08271773159503937, -0.07983780652284622, 0.115186445...
33
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.nth.html
pandas.core.groupby.SeriesGroupBy.nth
property SeriesGroupBy.nth[source]# Take the nth row from each group if n is an int, otherwise a subset of rows. Can be either a call or an index. dropna is not available with index notation. Index notation accepts a comma separated list of integers and slices. If dropna, will take the nth non-null row, dropna is eithe...
Parameters: nint, slice or list of ints and slicesA single nth value for the row or a list of nth values or slices. Changed in version 1.4.0: Added slice and lists containing slices. Added index notation. dropna{‘any’, ‘all’, None}, default NoneApply the specified dropna operation before counting which row is the nth r...
[">>> df = pd.DataFrame({'A': [1, 1, 2, 1, 2],\n... 'B': [np.nan, 2, 3, 4, 5]}, columns=['A', 'B'])\n>>> g = df.groupby('A')\n>>> g.nth(0)\n A B\n0 1 NaN\n2 2 3.0\n>>> g.nth(1)\n A B\n1 1 2.0\n4 2 5.0\n>>> g.nth(-1)\n A B\n3 1 4.0\n4 2 5.0\n>>> g.nth([0, 1])\n A B\n0 1 NaN\n1 ...
pandas.core.groupby.SeriesGroupBy.nth property SeriesGroupBy.nth[source]# Take the nth row from each group if n is an int, otherwise a subset of rows. Can be either a call or an index. dropna is not available with index notation. Index notation accepts a comma separated list of integers and slices. If dropna, will take...
[ -0.07211601734161377, -0.39182889461517334, -0.1505139023065567, 0.11000378429889679, -0.23693639039993286, 0.1958564668893814, 0.038296233862638474, 0.2434806525707245, 0.10201609134674072, 0.1883752942085266, -0.19942227005958557, 0.2944192588329315, 0.136381134390831, 0.2446809560060501...
34
..\pandas\reference\api\pandas.DataFrame.rolling.html
pandas.DataFrame.rolling
DataFrame.rolling(window, min_periods=None, center=False, win_type=None, on=None, axis=<no_default>, closed=None, step=None, method='single')[source]# Provide rolling window calculations. Notes See Windowing Operations for further usage details and examples.
Parameters: windowint, timedelta, str, offset, or BaseIndexer subclassSize of the moving window. If an integer, the fixed number of observations used for each window. If a timedelta, str, or offset, the time period of each window. Each window will be a variable sized based on the observations included in the time-perio...
[">>> df = pd.DataFrame({'B': [0, 1, 2, np.nan, 4]})\n>>> df\n B\n0 0.0\n1 1.0\n2 2.0\n3 NaN\n4 4.0", '>>> df.rolling(2).sum()\n B\n0 NaN\n1 1.0\n2 3.0\n3 NaN\n4 NaN', ">>> df_time = pd.DataFrame({'B': [0, 1, 2, np.nan, 4]},\n... index=[pd.Timestamp('20130101 09:00:00'),\n... ...
pandas.DataFrame.rolling DataFrame.rolling(window, min_periods=None, center=False, win_type=None, on=None, axis=<no_default>, closed=None, step=None, method='single')[source]# Provide rolling window calculations. Notes See Windowing Operations for further usage details and examples.
[ -0.3198776841163635, -0.3607669770717621, -0.08784804493188858, -0.26267409324645996, -0.016345780342817307, -0.010237699374556541, 0.3137364685535431, -0.009117442183196545, -0.10060858726501465, 0.22102928161621094, 0.11325967311859131, 0.3677438795566559, 0.1617562174797058, 0.253634870...
35
..\pandas\reference\api\pandas.Series.compare.html
pandas.Series.compare
Series.compare(other, align_axis=1, keep_shape=False, keep_equal=False, result_names=('self', 'other'))[source]# Compare to another Series and show the differences. Notes Matching NaNs will not appear as a difference.
Parameters: otherSeriesObject to compare with. align_axis{0 or ‘index’, 1 or ‘columns’}, default 1Determine which axis to align the comparison on. 0, or ‘index’Resulting differences are stacked verticallywith rows drawn alternately from self and other. 1, or ‘columns’Resulting differences are aligned horizontallywith c...
['>>> s1 = pd.Series(["a", "b", "c", "d", "e"])\n>>> s2 = pd.Series(["a", "a", "c", "b", "e"])', '>>> s1.compare(s2)\n self other\n1 b a\n3 d b', '>>> s1.compare(s2, align_axis=0)\n1 self b\n other a\n3 self d\n other b\ndtype: object', '>>> s1.compare(s2, keep_shape=True)\n self oth...
pandas.Series.compare Series.compare(other, align_axis=1, keep_shape=False, keep_equal=False, result_names=('self', 'other'))[source]# Compare to another Series and show the differences. Notes Matching NaNs will not appear as a difference.
[ -0.11273635178804398, -0.34619203209877014, -0.1556672304868698, 0.230185404419899, -0.12902607023715973, 0.10412775725126266, 0.19788917899131775, 0.4405233860015869, -0.10527140647172928, 0.25897881388664246, -0.4188879728317261, 0.0970526859164238, 0.23934131860733032, -0.07775337994098...
36
..\pandas\reference\api\pandas.Series.to_hdf.html
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 Format (HDF) is self-d...
Parameters: path_or_bufstr or pandas.HDFStoreFile path or HDFStore object. keystrIdentifier for the group in the store. mode{‘a’, ‘w’, ‘r+’}, default ‘a’Mode to open file: ‘w’: write, a new file is created (an existing file with the same name would be deleted). ‘a’: append, an existing file is opened for reading and wr...
[">>> df = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]},\n... index=['a', 'b', 'c']) \n>>> df.to_hdf('data.h5', key='df', mode='w')", ">>> s = pd.Series([1, 2, 3, 4]) \n>>> s.to_hdf('data.h5', key='s')", ">>> pd.read_hdf('data.h5', 'df') \nA B\na 1 4\nb 2 5\nc 3 6\n>>> pd.read_hdf('data.h5'...
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...
[ -0.2594890296459198, 0.06357968598604202, -0.10324613749980927, 0.1740209013223648, 0.24980442225933075, 0.4176344573497772, 0.2028018683195114, 0.48160815238952637, 0.09896465390920639, -0.019982516765594482, -0.4920138716697693, -0.0060877506621181965, 0.10795619338750839, 0.341928571462...
37
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.nunique.html
pandas.core.groupby.SeriesGroupBy.nunique
SeriesGroupBy.nunique(dropna=True)[source]# Return number of unique elements in the group.
Returns: SeriesNumber of unique values within each group.
[">>> lst = ['a', 'a', 'b', 'b']\n>>> ser = pd.Series([1, 2, 3, 3], index=lst)\n>>> ser\na 1\na 2\nb 3\nb 3\ndtype: int64\n>>> ser.groupby(level=0).nunique()\na 2\nb 1\ndtype: int64", ">>> ser = pd.Series([1, 2, 3, 3], index=pd.DatetimeIndex(\n... ['2023-01-01', '2023-01-15', '2023-02-...
pandas.core.groupby.SeriesGroupBy.nunique SeriesGroupBy.nunique(dropna=True)[source]# Return number of unique elements in the group.
[ -0.10791902989149094, -0.2517579197883606, -0.2508554458618164, 0.2595655620098114, -0.08137436211109161, 0.15239763259887695, 0.184404656291008, 0.16060702502727509, -0.17464075982570648, 0.32900017499923706, -0.3394775986671448, 0.32433637976646423, -0.0898326113820076, 0.053696732968091...
38
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.duplicated.html
pandas.api.extensions.ExtensionArray.duplicated
ExtensionArray.duplicated(keep='first')[source]# Return boolean ndarray denoting duplicate values.
Parameters: keep{‘first’, ‘last’, False}, default ‘first’ first : Mark duplicates as True except for the first occurrence. last : Mark duplicates as True except for the last occurrence. False : Mark all duplicates as True. Returns: ndarray[bool]
['>>> pd.array([1, 1, 2, 3, 3], dtype="Int64").duplicated()\narray([False, True, False, False, True])']
pandas.api.extensions.ExtensionArray.duplicated ExtensionArray.duplicated(keep='first')[source]# Return boolean ndarray denoting duplicate values.
[ 0.3829425573348999, -0.39015528559684753, -0.21379682421684265, 0.04999741539359093, 0.03378976881504059, 0.17987655103206635, 0.1682766079902649, 0.35078415274620056, -0.029957180842757225, 0.20129600167274475, -0.14723725616931915, 0.47409704327583313, 0.033450447022914886, 0.08330772817...
39
..\pandas\reference\api\pandas.tseries.offsets.BYearBegin.is_month_start.html
pandas.tseries.offsets.BYearBegin.is_month_start
BYearBegin.is_month_start(ts)# Return boolean whether a timestamp occurs on the month start.
No parameters found
['>>> ts = pd.Timestamp(2022, 1, 1)\n>>> freq = pd.offsets.Hour(5)\n>>> freq.is_month_start(ts)\nTrue']
pandas.tseries.offsets.BYearBegin.is_month_start BYearBegin.is_month_start(ts)# Return boolean whether a timestamp occurs on the month start.
[ -0.11444079875946045, -0.45542916655540466, -0.16117672622203827, -0.14014026522636414, -0.25416451692581177, -0.03081931732594967, 0.2847978472709656, 0.21234500408172607, 0.030340855941176414, 0.0441562794148922, 0.3628859519958496, 0.24220409989356995, 0.08479268103837967, 0.16040456295...
40
..\pandas\reference\api\pandas.DataFrame.round.html
pandas.DataFrame.round
DataFrame.round(decimals=0, *args, **kwargs)[source]# Round a DataFrame to a variable number of decimal places.
Parameters: decimalsint, dict, SeriesNumber of decimal places to round each column to. If an int is given, round each column to the same number of places. Otherwise dict and Series round to variable numbers of places. Column names should be in the keys if decimals is a dict-like, or in the index if decimals is a Series...
[">>> df = pd.DataFrame([(.21, .32), (.01, .67), (.66, .03), (.21, .18)],\n... columns=['dogs', 'cats'])\n>>> df\n dogs cats\n0 0.21 0.32\n1 0.01 0.67\n2 0.66 0.03\n3 0.21 0.18", '>>> df.round(1)\n dogs cats\n0 0.2 0.3\n1 0.0 0.7\n2 0.7 0.0\n3 0.2 0.2', ">>> df.round({'...
pandas.DataFrame.round DataFrame.round(decimals=0, *args, **kwargs)[source]# Round a DataFrame to a variable number of decimal places.
[ -0.017653202638030052, -0.4366144835948944, -0.1661326289176941, -0.3215222656726837, 0.15906496345996857, 0.020226845517754555, 0.1645774245262146, 0.2805204391479492, -0.2932821810245514, 0.2358146607875824, -0.109610415995121, 0.2144141048192978, 0.2635979652404785, 0.06563055515289307,...
41
..\pandas\reference\api\pandas.Index.where.html
pandas.Index.where
final Index.where(cond, other=None)[source]# Replace values where the condition is False. The replacement is taken from other.
Parameters: condbool array-like with the same length as selfCondition to select the values on. otherscalar, or array-like, default NoneReplacement if the condition is False. Returns: pandas.IndexA copy of self with values replaced from other where the condition is False.
[">>> idx = pd.Index(['car', 'bike', 'train', 'tractor'])\n>>> idx\nIndex(['car', 'bike', 'train', 'tractor'], dtype='object')\n>>> idx.where(idx.isin(['car', 'train']), 'other')\nIndex(['car', 'other', 'train', 'other'], dtype='object')"]
pandas.Index.where final Index.where(cond, other=None)[source]# Replace values where the condition is False. The replacement is taken from other.
[ 0.20888236165046692, -0.01955145224928856, -0.2597218453884125, -0.14091181755065918, -0.1300530731678009, 0.03612615540623665, 0.18061456084251404, 0.35246211290359497, -0.04641147330403328, 0.13720585405826569, -0.305303692817688, 0.25763970613479614, 0.2687981128692627, -0.0606680847704...
42
..\pandas\reference\api\pandas.tseries.offsets.Milli.is_anchored.html
pandas.tseries.offsets.Milli.is_anchored
Milli.is_anchored()# Return False. Deprecated since version 2.2.0: is_anchored is deprecated and will be removed in a future version. Use False instead.
No parameters found
['>>> pd.offsets.Hour().is_anchored()\nFalse\n>>> pd.offsets.Hour(2).is_anchored()\nFalse']
pandas.tseries.offsets.Milli.is_anchored Milli.is_anchored()# Return False. Deprecated since version 2.2.0: is_anchored is deprecated and will be removed in a future version. Use False instead.
[ -0.34629738330841064, -0.7079617977142334, -0.18475714325904846, -0.10093075037002563, 0.0293272752314806, -0.1456950157880783, 0.5676390528678894, 0.24162720143795013, -0.1761787235736847, 0.3060610890388489, -0.015278773382306099, 0.15671250224113464, 0.04702381417155266, 0.0034124676603...
43
..\pandas\reference\api\pandas.Series.convert_dtypes.html
pandas.Series.convert_dtypes
Series.convert_dtypes(infer_objects=True, convert_string=True, convert_integer=True, convert_boolean=True, convert_floating=True, dtype_backend='numpy_nullable')[source]# Convert columns to the best possible dtypes using dtypes supporting pd.NA. Notes By default, convert_dtypes will attempt to convert a Series (or each...
Parameters: infer_objectsbool, default TrueWhether object dtypes should be converted to the best possible types. convert_stringbool, default TrueWhether object dtypes should be converted to StringDtype(). convert_integerbool, default TrueWhether, if possible, conversion can be done to integer extension types. convert_b...
['>>> df = pd.DataFrame(\n... {\n... "a": pd.Series([1, 2, 3], dtype=np.dtype("int32")),\n... "b": pd.Series(["x", "y", "z"], dtype=np.dtype("O")),\n... "c": pd.Series([True, False, np.nan], dtype=np.dtype("O")),\n... "d": pd.Series(["h", "i", np.nan], dtype=np.dtype("O")),\n... ...
pandas.Series.convert_dtypes Series.convert_dtypes(infer_objects=True, convert_string=True, convert_integer=True, convert_boolean=True, convert_floating=True, dtype_backend='numpy_nullable')[source]# Convert columns to the best possible dtypes using dtypes supporting pd.NA. Notes By default, convert_dtypes will attempt...
[ -0.13318802416324615, -0.3157169818878174, -0.12565051019191742, 0.24171121418476105, 0.31444501876831055, 0.00809322390705347, 0.15593630075454712, 0.4222545921802521, -0.029989685863256454, 0.2169550061225891, -0.27500268816947937, 0.3529782295227051, 0.16694286465644836, 0.1047279685735...
44
..\pandas\reference\api\pandas.Series.to_json.html
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=None, indent=None, storage_options=None, mode='w')[source]# Convert the object to a JSON string. Note NaN’s and None will be converted t...
Parameters: path_or_bufstr, path object, file-like object, or None, default NoneString, path object (implementing os.PathLike[str]), or file-like object implementing a write() function. If None, the result is returned as a string. orientstrIndication of expected JSON string format. Series: default is ‘index’ allowed va...
['>>> from json import loads, dumps\n>>> df = pd.DataFrame(\n... [["a", "b"], ["c", "d"]],\n... index=["row 1", "row 2"],\n... columns=["col 1", "col 2"],\n... )', '>>> result = df.to_json(orient="split")\n>>> parsed = loads(result)\n>>> dumps(parsed, indent=4) \n{\n "columns": [\n "col 1",\n ...
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=None, indent=None, storage_options=None, mode='w')[source]# Convert the object to a JSON string. Note NaN’s and No...
[ 0.04317653551697731, 0.037846218794584274, -0.16474592685699463, 0.11332355439662933, 0.08907568454742432, 0.26120805740356445, 0.10395654290914536, 0.6668785810470581, -0.035063598304986954, 0.07280750572681427, -0.07814409583806992, 0.5538936257362366, 0.1980443149805069, 0.0549179390072...
45
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.equals.html
pandas.api.extensions.ExtensionArray.equals
ExtensionArray.equals(other)[source]# Return if another array is equivalent to this array. Equivalent means that both arrays have the same shape and dtype, and all values compare equal. Missing values in the same location are considered equal (in contrast with normal equality).
Parameters: otherExtensionArrayArray to compare to this Array. Returns: booleanWhether the arrays are equivalent.
['>>> arr1 = pd.array([1, 2, np.nan])\n>>> arr2 = pd.array([1, 2, np.nan])\n>>> arr1.equals(arr2)\nTrue']
pandas.api.extensions.ExtensionArray.equals ExtensionArray.equals(other)[source]# Return if another array is equivalent to this array. Equivalent means that both arrays have the same shape and dtype, and all values compare equal. Missing values in the same location are considered equal (in contrast with normal equality...
[ 0.18796971440315247, -0.42837637662887573, -0.276410311460495, 0.09775102883577347, -0.035857632756233215, 0.05087586119771004, -0.06435947865247726, 0.3581198453903198, 0.04105689004063606, 0.24335122108459473, -0.1282123178243637, 0.2505730986595154, 0.11148792505264282, 0.00740860542282...
46
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.ohlc.html
pandas.core.groupby.SeriesGroupBy.ohlc
SeriesGroupBy.ohlc()[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: DataFrameOpen, high, low and close values within each group.
[">>> lst = ['SPX', 'CAC', 'SPX', 'CAC', 'SPX', 'CAC', 'SPX', 'CAC',]\n>>> ser = pd.Series([3.4, 9.0, 7.2, 5.2, 8.8, 9.4, 0.1, 0.5], index=lst)\n>>> ser\nSPX 3.4\nCAC 9.0\nSPX 7.2\nCAC 5.2\nSPX 8.8\nCAC 9.4\nSPX 0.1\nCAC 0.5\ndtype: float64\n>>> ser.groupby(level=0).ohlc()\n open hi...
pandas.core.groupby.SeriesGroupBy.ohlc SeriesGroupBy.ohlc()[source]# Compute open, high, low and close values of a group, excluding missing values. For multiple groupings, the result index will be a MultiIndex
[ -0.43957945704460144, -0.3352562487125397, -0.15197928249835968, 0.12752912938594818, -0.3220074474811554, 0.39106515049934387, 0.29687079787254333, 0.1408589780330658, 0.2633294463157654, 0.2296975702047348, -0.5751190185546875, 0.11572126299142838, 0.22155344486236572, 0.0351733639836311...
47
..\pandas\reference\api\pandas.tseries.offsets.BYearBegin.is_on_offset.html
pandas.tseries.offsets.BYearBegin.is_on_offset
BYearBegin.is_on_offset(dt)# Return boolean whether a timestamp intersects with this frequency.
Parameters: dtdatetime.datetimeTimestamp to check intersections with frequency.
['>>> ts = pd.Timestamp(2022, 1, 1)\n>>> freq = pd.offsets.Day(1)\n>>> freq.is_on_offset(ts)\nTrue', ">>> ts = pd.Timestamp(2022, 8, 6)\n>>> ts.day_name()\n'Saturday'\n>>> freq = pd.offsets.BusinessDay(1)\n>>> freq.is_on_offset(ts)\nFalse"]
pandas.tseries.offsets.BYearBegin.is_on_offset BYearBegin.is_on_offset(dt)# Return boolean whether a timestamp intersects with this frequency.
[ -0.2369130700826645, -0.6124756336212158, -0.15325087308883667, -0.009553790092468262, -0.2661823332309723, -0.14639168977737427, 0.23471324145793915, 0.2854216992855072, -0.12664270401000977, 0.0326482355594635, 0.2080540508031845, 0.0307905413210392, -0.07671581953763962, 0.1815597414970...
48
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.pct_change.html
pandas.core.groupby.SeriesGroupBy.pct_change
SeriesGroupBy.pct_change(periods=1, fill_method=<no_default>, limit=<no_default>, freq=None, axis=<no_default>)[source]# Calculate pct_change of each value to previous entry in group.
Returns: Series or DataFramePercentage changes within each group.
[">>> lst = ['a', 'a', 'b', 'b']\n>>> ser = pd.Series([1, 2, 3, 4], index=lst)\n>>> ser\na 1\na 2\nb 3\nb 4\ndtype: int64\n>>> ser.groupby(level=0).pct_change()\na NaN\na 1.000000\nb NaN\nb 0.333333\ndtype: float64", '>>> data = [[1, 2, 3], [1, 5, 6], [2, 5, 8], [2, 6, 9]]\n>>> df = pd...
pandas.core.groupby.SeriesGroupBy.pct_change SeriesGroupBy.pct_change(periods=1, fill_method=<no_default>, limit=<no_default>, freq=None, axis=<no_default>)[source]# Calculate pct_change of each value to previous entry in group.
[ -0.3548208773136139, -0.2521568238735199, -0.10425781458616257, 0.09028010070323944, -0.2155774086713791, 0.2704325020313263, 0.20801031589508057, 0.13848276436328888, -0.06408365070819855, 0.0864478126168251, 0.12773893773555756, 0.23902097344398499, 0.18960826098918915, 0.315238237380981...
49
..\pandas\reference\api\pandas.Series.to_latex.html
pandas.Series.to_latex
Series.to_latex(buf=None, *, columns=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=None, multirow=None, caption=None, lab...
Parameters: bufstr, Path or StringIO-like, optional, default NoneBuffer to write to. If None, the output is returned as a string. columnslist of label, optionalThe subset of columns to write. Writes all columns by default. headerbool or list of str, default TrueWrite out the column names. If a list of strings is given,...
['>>> df = pd.DataFrame(dict(name=[\'Raphael\', \'Donatello\'],\n... age=[26, 45],\n... height=[181.23, 177.65]))\n>>> print(df.to_latex(index=False,\n... formatters={"name": str.upper},\n... float_format="{:.1f}".format,\n... )) \n\\beg...
pandas.Series.to_latex Series.to_latex(buf=None, *, columns=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=None, multirow=...
[ -0.13938887417316437, -0.1915835440158844, -0.16128675639629364, 0.0494748093187809, 0.2478054016828537, 0.1658899486064911, 0.10587037354707718, 0.7645797729492188, -0.09793590009212494, 0.13417764008045197, -0.306387335062027, 0.3591686487197876, 0.21569567918777466, 0.25468766689300537,...
50
..\pandas\reference\api\pandas.DataFrame.rpow.html
pandas.DataFrame.rpow
DataFrame.rpow(other, axis='columns', level=None, fill_value=None)[source]# Get Exponential power of dataframe and other, element-wise (binary operator rpow). Equivalent to other ** dataframe, but with support to substitute a fill_value for missing data in one of the inputs. With reverse version, pow. Among flexible wr...
Parameters: otherscalar, sequence, Series, dict or DataFrameAny single or multiple element data structure, or list-like object. axis{0 or ‘index’, 1 or ‘columns’}Whether to compare by the index (0 or ‘index’) or columns. (1 or ‘columns’). For Series input, axis to match Series index on. levelint or labelBroadcast acros...
[">>> df = pd.DataFrame({'angles': [0, 3, 4],\n... 'degrees': [360, 180, 360]},\n... index=['circle', 'triangle', 'rectangle'])\n>>> df\n angles degrees\ncircle 0 360\ntriangle 3 180\nrectangle 4 360", '>>> df + 1\n angles d...
pandas.DataFrame.rpow DataFrame.rpow(other, axis='columns', level=None, fill_value=None)[source]# Get Exponential power of dataframe and other, element-wise (binary operator rpow). Equivalent to other ** dataframe, but with support to substitute a fill_value for missing data in one of the inputs. With reverse version, ...
[ -0.16810432076454163, -0.27544960379600525, -0.07474469393491745, 0.08928369730710983, -0.013033725321292877, 0.21488015353679657, 0.004422282800078392, 0.3593023717403412, 0.14548170566558838, 0.18281510472297668, -0.1352616846561432, 0.06354763358831406, 0.03137020766735077, 0.3864151239...
51
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.factorize.html
pandas.api.extensions.ExtensionArray.factorize
ExtensionArray.factorize(use_na_sentinel=True)[source]# Encode the extension array as an enumerated type. Notes pandas.factorize() offers a sort keyword as well.
Parameters: use_na_sentinelbool, default TrueIf True, the sentinel -1 will be used for NaN values. If False, NaN values will be encoded as non-negative integers and will not drop the NaN from the uniques of the values. Added in version 1.5.0. Returns: codesndarrayAn integer NumPy array that’s an indexer into the origin...
['>>> idx1 = pd.PeriodIndex(["2014-01", "2014-01", "2014-02", "2014-02",\n... "2014-03", "2014-03"], freq="M")\n>>> arr, idx = idx1.factorize()\n>>> arr\narray([0, 0, 1, 1, 2, 2])\n>>> idx\nPeriodIndex([\'2014-01\', \'2014-02\', \'2014-03\'], dtype=\'period[M]\')']
pandas.api.extensions.ExtensionArray.factorize ExtensionArray.factorize(use_na_sentinel=True)[source]# Encode the extension array as an enumerated type. Notes pandas.factorize() offers a sort keyword as well.
[ 0.12031231820583344, -0.40128034353256226, -0.15748094022274017, 0.01473311334848404, 0.1879706233739853, 0.16976548731327057, 0.024657713249325752, 0.24145512282848358, 0.048076000064611435, 0.28253933787345886, -0.17918193340301514, 0.25747042894363403, -0.033103492110967636, 0.098921254...
52
..\pandas\reference\api\pandas.tseries.offsets.Milli.is_month_end.html
pandas.tseries.offsets.Milli.is_month_end
Milli.is_month_end(ts)# Return boolean whether a timestamp occurs on the month end.
No parameters found
['>>> ts = pd.Timestamp(2022, 1, 1)\n>>> freq = pd.offsets.Hour(5)\n>>> freq.is_month_end(ts)\nFalse']
pandas.tseries.offsets.Milli.is_month_end Milli.is_month_end(ts)# Return boolean whether a timestamp occurs on the month end.
[ -0.030291566625237465, -0.5640547871589661, -0.2191922515630722, -0.20807285606861115, -0.21431797742843628, -0.0016075718449428678, 0.19940339028835297, 0.24112440645694733, -0.03332319110631943, 0.23242685198783875, 0.40866997838020325, 0.38793516159057617, 0.12209201604127884, 0.1988924...
53
..\pandas\reference\api\pandas.Series.copy.html
pandas.Series.copy
Series.copy(deep=True)[source]# Make a copy of this object’s indices and data. When deep=True (default), a new object will be created with a copy of the calling object’s data and indices. Modifications to the data or indices of the copy will not be reflected in the original object (see notes below). When deep=False, a ...
Parameters: deepbool, default TrueMake a deep copy, including a copy of the data and the indices. With deep=False neither the indices nor the data are copied. Returns: Series or DataFrameObject type matches caller.
['>>> s = pd.Series([1, 2], index=["a", "b"])\n>>> s\na 1\nb 2\ndtype: int64', '>>> s_copy = s.copy()\n>>> s_copy\na 1\nb 2\ndtype: int64', '>>> s = pd.Series([1, 2], index=["a", "b"])\n>>> deep = s.copy()\n>>> shallow = s.copy(deep=False)', '>>> s is shallow\nFalse\n>>> s.values is shallow.values and s.ind...
pandas.Series.copy Series.copy(deep=True)[source]# Make a copy of this object’s indices and data. When deep=True (default), a new object will be created with a copy of the calling object’s data and indices. Modifications to the data or indices of the copy will not be reflected in the original object (see notes below). ...
[ 0.03925415128469467, -0.4298054575920105, -0.10634952038526535, 0.06634686887264252, -0.09217073768377304, -0.11195550113916397, 0.15014337003231049, 0.25732240080833435, -0.24300982058048248, 0.31400179862976074, -0.28970417380332947, 0.2260473221540451, 0.2598373591899872, 0.045970451086...
54
..\pandas\reference\api\pandas.IndexSlice.html
pandas.IndexSlice
pandas.IndexSlice = <pandas.core.indexing._IndexSlice object># Create an object to more easily perform multi-index slicing. Notes See Defined Levels for further info on slicing a MultiIndex.
No parameters found
[">>> midx = pd.MultiIndex.from_product([['A0','A1'], ['B0','B1','B2','B3']])\n>>> columns = ['foo', 'bar']\n>>> dfmi = pd.DataFrame(np.arange(16).reshape((len(midx), len(columns))),\n... index=midx, columns=columns)", ">>> dfmi.loc[(slice(None), slice('B0', 'B1')), :]\n foo bar\n A0 B...
pandas.IndexSlice pandas.IndexSlice = <pandas.core.indexing._IndexSlice object># Create an object to more easily perform multi-index slicing. Notes See Defined Levels for further info on slicing a MultiIndex.
[ 0.07447535544633865, -0.32098323106765747, -0.22229734063148499, 0.03966568037867546, 0.18882441520690918, 0.43534597754478455, 0.39625731110572815, 0.19166453182697296, 0.27844324707984924, 0.43580153584480286, -0.25282254815101624, 0.4728591740131378, 0.02975074015557766, 0.3626461029052...
55
..\pandas\reference\api\pandas.tseries.offsets.BYearBegin.is_quarter_end.html
pandas.tseries.offsets.BYearBegin.is_quarter_end
BYearBegin.is_quarter_end(ts)# Return boolean whether a timestamp occurs on the quarter end.
No parameters found
['>>> ts = pd.Timestamp(2022, 1, 1)\n>>> freq = pd.offsets.Hour(5)\n>>> freq.is_quarter_end(ts)\nFalse']
pandas.tseries.offsets.BYearBegin.is_quarter_end BYearBegin.is_quarter_end(ts)# Return boolean whether a timestamp occurs on the quarter end.
[ -0.17303624749183655, -0.42020943760871887, -0.2070642113685608, -0.08649303764104843, -0.28774914145469666, -0.0501626692712307, 0.23164445161819458, 0.28072217106819153, -0.09889881312847137, -0.0002451538748573512, 0.19767741858959198, 0.17870545387268066, 0.13164906203746796, 0.0418031...
56
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.pipe.html
pandas.core.groupby.SeriesGroupBy.pipe
SeriesGroupBy.pipe(func, *args, **kwargs)[source]# Apply a func with arguments to this GroupBy object and return its result. Use .pipe when you want to improve readability by chaining together functions that expect Series, DataFrames, GroupBy or Resampler objects. Instead of writing You can write which is much more rea...
Parameters: funccallable or tuple of (callable, str)Function to apply to this GroupBy object or, alternatively, a (callable, data_keyword) tuple where data_keyword is a string indicating the keyword of callable that expects the GroupBy object. argsiterable, optionalPositional arguments passed into func. kwargsdict, opt...
['>>> h = lambda x, arg2, arg3: x + 1 - arg2 * arg3\n>>> g = lambda x, arg1: x * 5 / arg1\n>>> f = lambda x: x ** 4\n>>> df = pd.DataFrame([["a", 4], ["b", 5]], columns=["group", "value"])\n>>> h(g(f(df.groupby(\'group\')), arg1=1), arg2=2, arg3=3)', ">>> (df.groupby('group')\n... .pipe(f)\n... .pipe(g, arg1=1)\n...
pandas.core.groupby.SeriesGroupBy.pipe SeriesGroupBy.pipe(func, *args, **kwargs)[source]# Apply a func with arguments to this GroupBy object and return its result. Use .pipe when you want to improve readability by chaining together functions that expect Series, DataFrames, GroupBy or Resampler objects. Instead of writi...
[ -0.007191408425569534, -0.09241419285535812, -0.12258073687553406, -0.03317654877901077, 0.20504826307296753, 0.27817079424858093, 0.19927015900611877, 0.03693340718746185, -0.13633973896503448, 0.2355421781539917, -0.052456989884376526, 0.2596721947193146, 0.0967969223856926, -0.006364862...
57
..\pandas\reference\api\pandas.Series.to_list.html
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
['>>> s = pd.Series([1, 2, 3])\n>>> s.to_list()\n[1, 2, 3]', ">>> idx = pd.Index([1, 2, 3])\n>>> idx\nIndex([1, 2, 3], dtype='int64')", '>>> idx.to_list()\n[1, 2, 3]']
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)
[ -0.05339159443974495, -0.5116212368011475, -0.27403515577316284, 0.16777338087558746, 0.2978720963001251, 0.2782030701637268, 0.1803893744945526, 0.31115105748176575, -0.027576347813010216, 0.2413930594921112, -0.20003922283649445, 0.3407663106918335, 0.07763988524675369, 0.184034481644630...
58
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.fillna.html
pandas.api.extensions.ExtensionArray.fillna
ExtensionArray.fillna(value=None, method=None, limit=None, copy=True)[source]# Fill NA/NaN values using the specified method.
Parameters: valuescalar, array-likeIf a scalar value is passed it is used to fill all missing values. Alternatively, an array-like “value” can be given. It’s expected that the array-like have the same length as ‘self’. method{‘backfill’, ‘bfill’, ‘pad’, ‘ffill’, None}, default NoneMethod to use for filling holes in rei...
['>>> arr = pd.array([np.nan, np.nan, 2, 3, np.nan, np.nan])\n>>> arr.fillna(0)\n<IntegerArray>\n[0, 0, 2, 3, 0, 0]\nLength: 6, dtype: Int64']
pandas.api.extensions.ExtensionArray.fillna ExtensionArray.fillna(value=None, method=None, limit=None, copy=True)[source]# Fill NA/NaN values using the specified method.
[ 0.31672510504722595, -0.2007848471403122, -0.17356005311012268, -0.14498652517795563, -0.1552714854478836, -0.16584157943725586, 0.11416393518447876, 0.30978894233703613, -0.09053385257720947, 0.4912838041782379, -0.03476199507713318, 0.22317776083946228, 0.3912893533706665, 0.229041352868...
59
..\pandas\reference\api\pandas.Series.corr.html
pandas.Series.corr
Series.corr(other, method='pearson', min_periods=None)[source]# Compute correlation with other Series, excluding missing values. The two Series objects are not required to be the same length and will be aligned internally before the correlation function is applied. Notes Pearson, Kendall and Spearman correlation are cu...
Parameters: otherSeriesSeries with which to compute the correlation. method{‘pearson’, ‘kendall’, ‘spearman’} or callableMethod used to compute correlation: pearson : Standard correlation coefficient kendall : Kendall Tau correlation coefficient spearman : Spearman rank correlation callable: Callable with input two 1d ...
['>>> def histogram_intersection(a, b):\n... v = np.minimum(a, b).sum().round(decimals=1)\n... return v\n>>> s1 = pd.Series([.2, .0, .6, .2])\n>>> s2 = pd.Series([.3, .6, .0, .1])\n>>> s1.corr(s2, method=histogram_intersection)\n0.3', '>>> s1 = pd.Series([1, 2, 3], index=[0, 1, 2])\n>>> s2 = pd.Series([1, 2, 3]...
pandas.Series.corr Series.corr(other, method='pearson', min_periods=None)[source]# Compute correlation with other Series, excluding missing values. The two Series objects are not required to be the same length and will be aligned internally before the correlation function is applied. Notes Pearson, Kendall and Spearman...
[ -0.05565953627228737, -0.32981571555137634, 0.012728823348879814, 0.03046347014605999, -0.29931649565696716, 0.22808018326759338, 0.1159818097949028, 0.02214481122791767, 0.17149819433689117, 0.3429228961467743, -0.48361220955848694, 0.1302504539489746, 0.37160924077033997, -0.159805119037...
60
..\pandas\reference\api\pandas.tseries.offsets.BYearBegin.is_quarter_start.html
pandas.tseries.offsets.BYearBegin.is_quarter_start
BYearBegin.is_quarter_start(ts)# Return boolean whether a timestamp occurs on the quarter start.
No parameters found
['>>> ts = pd.Timestamp(2022, 1, 1)\n>>> freq = pd.offsets.Hour(5)\n>>> freq.is_quarter_start(ts)\nTrue']
pandas.tseries.offsets.BYearBegin.is_quarter_start BYearBegin.is_quarter_start(ts)# Return boolean whether a timestamp occurs on the quarter start.
[ -0.2939758598804474, -0.3328196108341217, -0.16903185844421387, 0.006344327237457037, -0.2738332450389862, -0.0706484392285347, 0.29906854033470154, 0.24187633395195007, -0.13136069476604462, -0.08262239396572113, 0.2963658571243286, 0.16820816695690155, 0.0665866956114769, 0.0708804652094...
61
..\pandas\reference\api\pandas.infer_freq.html
pandas.infer_freq
pandas.infer_freq(index)[source]# Infer the most likely frequency given the input index.
Parameters: indexDatetimeIndex, TimedeltaIndex, Series or array-likeIf passed a Series will use the values of the series (NOT THE INDEX). Returns: str or NoneNone if no discernible frequency. Raises: TypeErrorIf the index is not datetime-like. ValueErrorIf there are fewer than three values.
[">>> idx = pd.date_range(start='2020/12/01', end='2020/12/30', periods=30)\n>>> pd.infer_freq(idx)\n'D'"]
pandas.infer_freq pandas.infer_freq(index)[source]# Infer the most likely frequency given the input index.
[ -0.20814672112464905, -0.7377070784568787, -0.05496711656451225, -0.04757699370384216, 0.04884137213230133, 0.022191548720002174, 0.027667775750160217, 0.3349318504333496, -0.07929530739784241, 0.37406373023986816, 0.012638714164495468, 0.09712071716785431, 0.07875463366508484, 0.057514045...
62
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.plot.html
pandas.core.groupby.SeriesGroupBy.plot
property SeriesGroupBy.plot[source]# Make plots of Series or DataFrame. Uses the backend specified by the option plotting.backend. By default, matplotlib is used. Notes See matplotlib documentation online for more on this subject If kind = ‘bar’ or ‘barh’, you can specify relative alignments for bar plot layout by posi...
Parameters: dataSeries or DataFrameThe object for which the method is called. xlabel or position, default NoneOnly used if data is a DataFrame. ylabel, position or list of label, positions, default NoneAllows plotting of one column versus another. Only used if data is a DataFrame. kindstrThe kind of plot to produce: ‘l...
['>>> ser = pd.Series([1, 2, 3, 3])\n>>> plot = ser.plot(kind=\'hist\', title="My plot")', '>>> df = pd.DataFrame({\'length\': [1.5, 0.5, 1.2, 0.9, 3],\n... \'width\': [0.7, 0.2, 0.15, 0.2, 1.1]},\n... index=[\'pig\', \'rabbit\', \'duck\', \'chicken\', \'horse\'])\n>>> plot = df.plot...
pandas.core.groupby.SeriesGroupBy.plot property SeriesGroupBy.plot[source]# Make plots of Series or DataFrame. Uses the backend specified by the option plotting.backend. By default, matplotlib is used. Notes See matplotlib documentation online for more on this subject If kind = ‘bar’ or ‘barh’, you can specify relative...
[ -0.32453957200050354, -0.33388447761535645, -0.13352783024311066, -0.0929003655910492, -0.18237856030464172, 0.27274608612060547, 0.4270579218864441, 0.21751472353935242, -0.07060469686985016, 0.19761326909065247, -0.3867509365081787, 0.2071634829044342, 0.22196343541145325, 0.337174206972...
63
..\pandas\reference\api\pandas.tseries.offsets.Milli.is_month_start.html
pandas.tseries.offsets.Milli.is_month_start
Milli.is_month_start(ts)# Return boolean whether a timestamp occurs on the month start.
No parameters found
['>>> ts = pd.Timestamp(2022, 1, 1)\n>>> freq = pd.offsets.Hour(5)\n>>> freq.is_month_start(ts)\nTrue']
pandas.tseries.offsets.Milli.is_month_start Milli.is_month_start(ts)# Return boolean whether a timestamp occurs on the month start.
[ -0.16875168681144714, -0.5035843849182129, -0.17228256165981293, -0.13164183497428894, -0.2237841933965683, -0.044342610985040665, 0.30377933382987976, 0.15300758183002472, -0.0482943169772625, 0.12843413650989532, 0.4772928059101105, 0.3494406044483185, 0.03381737694144249, 0.222309410572...
64
..\pandas\reference\api\pandas.Series.to_markdown.html
pandas.Series.to_markdown
Series.to_markdown(buf=None, mode='wt', index=True, storage_options=None, **kwargs)[source]# Print Series in Markdown-friendly format. Notes Requires the tabulate package.
Parameters: bufstr, Path or StringIO-like, optional, default NoneBuffer to write to. If None, the output is returned as a string. modestr, optionalMode in which file is opened, “wt” by default. indexbool, optional, default TrueAdd index (row) labels. storage_optionsdict, optionalExtra options that make sense for a part...
['>>> s = pd.Series(["elk", "pig", "dog", "quetzal"], name="animal")\n>>> print(s.to_markdown())\n| | animal |\n|---:|:---------|\n| 0 | elk |\n| 1 | pig |\n| 2 | dog |\n| 3 | quetzal |', '>>> print(s.to_markdown(tablefmt="grid"))\n+----+----------+\n| | animal |\n+====+==========+\n| 0 |...
pandas.Series.to_markdown Series.to_markdown(buf=None, mode='wt', index=True, storage_options=None, **kwargs)[source]# Print Series in Markdown-friendly format. Notes Requires the tabulate package.
[ -0.2710273563861847, -0.19883762300014496, -0.16697213053703308, -0.0879206508398056, 0.2621128559112549, 0.43806949257850647, 0.11272601038217545, 0.5361465215682983, 0.05028095096349716, 0.1888369768857956, -0.15794624388217926, 0.43932098150253296, -0.11398562043905258, 0.21536698937416...
65
..\pandas\reference\api\pandas.DataFrame.rsub.html
pandas.DataFrame.rsub
DataFrame.rsub(other, axis='columns', level=None, fill_value=None)[source]# Get Subtraction of dataframe and other, element-wise (binary operator rsub). Equivalent to other - dataframe, but with support to substitute a fill_value for missing data in one of the inputs. With reverse version, sub. Among flexible wrappers ...
Parameters: otherscalar, sequence, Series, dict or DataFrameAny single or multiple element data structure, or list-like object. axis{0 or ‘index’, 1 or ‘columns’}Whether to compare by the index (0 or ‘index’) or columns. (1 or ‘columns’). For Series input, axis to match Series index on. levelint or labelBroadcast acros...
[">>> df = pd.DataFrame({'angles': [0, 3, 4],\n... 'degrees': [360, 180, 360]},\n... index=['circle', 'triangle', 'rectangle'])\n>>> df\n angles degrees\ncircle 0 360\ntriangle 3 180\nrectangle 4 360", '>>> df + 1\n angles d...
pandas.DataFrame.rsub DataFrame.rsub(other, axis='columns', level=None, fill_value=None)[source]# Get Subtraction of dataframe and other, element-wise (binary operator rsub). Equivalent to other - dataframe, but with support to substitute a fill_value for missing data in one of the inputs. With reverse version, sub. Am...
[ -0.04593639075756073, -0.17254236340522766, -0.07658407837152481, 0.052658095955848694, -0.22976067662239075, 0.2187534123659134, 0.13500814139842987, 0.22235044836997986, 0.03195831552147865, 0.28787320852279663, -0.21343103051185608, 0.23415903747081757, 0.1762535125017166, 0.27817299962...
66
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.html
pandas.api.extensions.ExtensionArray
class pandas.api.extensions.ExtensionArray[source]# Abstract base class for custom 1-D array types. pandas will recognize instances of this class as proper arrays with a custom type and will not attempt to coerce them to objects. They may be stored directly inside a DataFrame or Series. Attributes dtype An instance of ...
No parameters found
[]
pandas.api.extensions.ExtensionArray class pandas.api.extensions.ExtensionArray[source]# Abstract base class for custom 1-D array types. pandas will recognize instances of this class as proper arrays with a custom type and will not attempt to coerce them to objects. They may be stored directly inside a DataFrame or Ser...
[ 0.07646344602108002, -0.3325943052768707, -0.3476572036743164, 0.07469093799591064, 0.17403544485569, 0.08992239832878113, 0.12678559124469757, 0.16131165623664856, 0.07819733768701553, 0.35279417037963867, -0.030880730599164963, 0.2372918725013733, 0.0463455431163311, 0.005676881410181522...
67
..\pandas\reference\api\pandas.Series.count.html
pandas.Series.count
Series.count()[source]# Return number of non-NA/null observations in the Series.
Returns: intNumber of non-null values in the Series.
['>>> s = pd.Series([0.0, 1.0, np.nan])\n>>> s.count()\n2']
pandas.Series.count Series.count()[source]# Return number of non-NA/null observations in the Series.
[ -0.1670270413160324, -0.4149026870727539, -0.13524414598941803, -0.06325946748256683, -0.11424483358860016, 0.10509410500526428, 0.15228521823883057, 0.2177039533853531, -0.10323098301887512, 0.11175590008497238, -0.13638949394226074, 0.06904594600200653, 0.035960204899311066, 0.2257182598...
68
..\pandas\reference\api\pandas.tseries.offsets.BYearBegin.is_year_end.html
pandas.tseries.offsets.BYearBegin.is_year_end
BYearBegin.is_year_end(ts)# Return boolean whether a timestamp occurs on the year end.
No parameters found
['>>> ts = pd.Timestamp(2022, 1, 1)\n>>> freq = pd.offsets.Hour(5)\n>>> freq.is_year_end(ts)\nFalse']
pandas.tseries.offsets.BYearBegin.is_year_end BYearBegin.is_year_end(ts)# Return boolean whether a timestamp occurs on the year end.
[ -0.14077475666999817, -0.3605037331581116, -0.18296340107917786, -0.0022813596297055483, -0.2608541250228882, -0.11560992896556854, 0.16411426663398743, 0.3167762756347656, -0.005165231414139271, -0.044745560735464096, 0.3702397644519806, 0.17616291344165802, 0.09320558607578278, 0.0833524...
69
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.prod.html
pandas.core.groupby.SeriesGroupBy.prod
SeriesGroupBy.prod(numeric_only=False, min_count=0)[source]# Compute prod of group values.
Parameters: numeric_onlybool, default FalseInclude only float, int, boolean columns. Changed in version 2.0.0: numeric_only no longer accepts None. min_countint, default 0The 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: Serie...
[">>> lst = ['a', 'a', 'b', 'b']\n>>> ser = pd.Series([1, 2, 3, 4], index=lst)\n>>> ser\na 1\na 2\nb 3\nb 4\ndtype: int64\n>>> ser.groupby(level=0).prod()\na 2\nb 12\ndtype: int64", '>>> data = [[1, 8, 2], [1, 2, 5], [2, 5, 8], [2, 6, 9]]\n>>> df = pd.DataFrame(data, columns=["a", "b", "c"],\n... ...
pandas.core.groupby.SeriesGroupBy.prod SeriesGroupBy.prod(numeric_only=False, min_count=0)[source]# Compute prod of group values.
[ -0.34890902042388916, -0.5457055568695068, -0.1738121211528778, 0.1081177219748497, -0.17927546799182892, 0.10413794964551926, 0.39084291458129883, 0.026777295395731926, -0.04645063728094101, 0.40045058727264404, -0.26929494738578796, 0.21514016389846802, 0.016494493931531906, 0.3473140001...
70
..\pandas\reference\api\pandas.Series.cov.html
pandas.Series.cov
Series.cov(other, min_periods=None, ddof=1)[source]# Compute covariance with Series, excluding missing values. The two Series objects are not required to be the same length and will be aligned internally before the covariance is calculated.
Parameters: otherSeriesSeries with which to compute the covariance. min_periodsint, optionalMinimum number of observations needed to have a valid result. ddofint, default 1Delta degrees of freedom. The divisor used in calculations is N - ddof, where N represents the number of elements. Returns: floatCovariance between...
['>>> s1 = pd.Series([0.90010907, 0.13484424, 0.62036035])\n>>> s2 = pd.Series([0.12528585, 0.26962463, 0.51111198])\n>>> s1.cov(s2)\n-0.01685762652715874']
pandas.Series.cov Series.cov(other, min_periods=None, ddof=1)[source]# Compute covariance with Series, excluding missing values. The two Series objects are not required to be the same length and will be aligned internally before the covariance is calculated.
[ -0.05782139301300049, -0.5351572036743164, 0.0008159332210198045, -0.007767837028950453, -0.22183723747730255, 0.3230714797973633, 0.11768564581871033, 0.062253549695014954, 0.04032569006085396, 0.3610716164112091, -0.08879176527261734, 0.10766759514808655, 0.13678964972496033, -0.00850134...
71
..\pandas\reference\api\pandas.DataFrame.rtruediv.html
pandas.DataFrame.rtruediv
DataFrame.rtruediv(other, axis='columns', level=None, fill_value=None)[source]# Get Floating division of dataframe and other, element-wise (binary operator rtruediv). Equivalent to other / dataframe, but with support to substitute a fill_value for missing data in one of the inputs. With reverse version, truediv. Among ...
Parameters: otherscalar, sequence, Series, dict or DataFrameAny single or multiple element data structure, or list-like object. axis{0 or ‘index’, 1 or ‘columns’}Whether to compare by the index (0 or ‘index’) or columns. (1 or ‘columns’). For Series input, axis to match Series index on. levelint or labelBroadcast acros...
[">>> df = pd.DataFrame({'angles': [0, 3, 4],\n... 'degrees': [360, 180, 360]},\n... index=['circle', 'triangle', 'rectangle'])\n>>> df\n angles degrees\ncircle 0 360\ntriangle 3 180\nrectangle 4 360", '>>> df + 1\n angles d...
pandas.DataFrame.rtruediv DataFrame.rtruediv(other, axis='columns', level=None, fill_value=None)[source]# Get Floating division of dataframe and other, element-wise (binary operator rtruediv). Equivalent to other / dataframe, but with support to substitute a fill_value for missing data in one of the inputs. With revers...
[ -0.07323997467756271, -0.43314996361732483, -0.07086724042892456, 0.023833222687244415, 0.0635254979133606, 0.2032863348722458, 0.10602908581495285, 0.34936872124671936, -0.17731976509094238, 0.24424614012241364, -0.4453646242618561, 0.3301968276500702, 0.10082444548606873, 0.0854895785450...
72
..\pandas\reference\api\pandas.Int16Dtype.html
pandas.Int16Dtype
class pandas.Int16Dtype[source]# An ExtensionDtype for int16 integer data. Uses pandas.NA as its missing value, rather than numpy.nan. Attributes None Methods None
No parameters found
['>>> ser = pd.Series([2, pd.NA], dtype=pd.Int8Dtype())\n>>> ser.dtype\nInt8Dtype()', '>>> ser = pd.Series([2, pd.NA], dtype=pd.Int16Dtype())\n>>> ser.dtype\nInt16Dtype()', '>>> ser = pd.Series([2, pd.NA], dtype=pd.Int32Dtype())\n>>> ser.dtype\nInt32Dtype()', '>>> ser = pd.Series([2, pd.NA], dtype=pd.Int64Dtype())\n>>>...
pandas.Int16Dtype class pandas.Int16Dtype[source]# An ExtensionDtype for int16 integer data. Uses pandas.NA as its missing value, rather than numpy.nan. Attributes None Methods None
[ 0.15449360013008118, -0.41414159536361694, -0.15318135917186737, 0.27898088097572327, 0.5062121748924255, 0.26814669370651245, 0.39530253410339355, 0.3134981393814087, 0.21016381680965424, 0.33100372552871704, 0.09789126366376877, -0.10724630206823349, -0.061889030039310455, 0.002795190783...
72
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.insert.html
pandas.api.extensions.ExtensionArray.insert
ExtensionArray.insert(loc, item)[source]# Insert an item at the given position. Notes This method should be both type and dtype-preserving. If the item cannot be held in an array of this type/dtype, either ValueError or TypeError should be raised. The default implementation relies on _from_sequence to raise on invalid...
Parameters: locint itemscalar-like Returns: same type as self
['>>> arr = pd.array([1, 2, 3])\n>>> arr.insert(2, -1)\n<IntegerArray>\n[1, 2, -1, 3]\nLength: 4, dtype: Int64']
pandas.api.extensions.ExtensionArray.insert ExtensionArray.insert(loc, item)[source]# Insert an item at the given position. Notes This method should be both type and dtype-preserving. If the item cannot be held in an array of this type/dtype, either ValueError or TypeError should be raised. The default implementation ...
[ 0.45206665992736816, -0.5374671816825867, -0.09425076097249985, -0.05667131021618843, -0.051358018070459366, 0.08271520584821701, 0.10921597480773926, 0.011280260048806667, 0.15446428954601288, 0.11095140874385834, 0.18090318143367767, 0.2579449415206909, 0.07633861899375916, 0.03150223568...
74
..\pandas\reference\api\pandas.Series.to_numpy.html
pandas.Series.to_numpy
Series.to_numpy(dtype=None, copy=False, na_value=<no_default>, **kwargs)[source]# A NumPy ndarray representing the values in this Series or Index. Notes The returned array will be the same up to equality (values equal in self will be equal in the returned array; likewise for values that are not equal). When self contai...
Parameters: dtypestr or numpy.dtype, optionalThe dtype to pass to numpy.asarray(). copybool, default FalseWhether to ensure that the returned value is not a view on another array. Note that copy=False does not ensure that to_numpy() is no-copy. Rather, copy=True ensure that a copy is made, even if not strictly necessar...
[">>> ser = pd.Series(pd.Categorical(['a', 'b', 'a']))\n>>> ser.to_numpy()\narray(['a', 'b', 'a'], dtype=object)", '>>> ser = pd.Series(pd.date_range(\'2000\', periods=2, tz="CET"))\n>>> ser.to_numpy(dtype=object)\narray([Timestamp(\'2000-01-01 00:00:00+0100\', tz=\'CET\'),\n Timestamp(\'2000-01-02 00:00:00+0100\...
pandas.Series.to_numpy Series.to_numpy(dtype=None, copy=False, na_value=<no_default>, **kwargs)[source]# A NumPy ndarray representing the values in this Series or Index. Notes The returned array will be the same up to equality (values equal in self will be equal in the returned array; likewise for values that are not e...
[ 0.007561724167317152, -0.10450219362974167, -0.16465750336647034, -0.0005316526512615383, 0.1339997500181198, 0.19651441276073456, 0.07454990595579147, 0.3588082790374756, -0.06124240532517433, 0.17454800009727478, -0.23109371960163116, 0.39562952518463135, 0.07334236055612564, -0.00109303...
75
..\pandas\reference\api\pandas.tseries.offsets.Milli.is_on_offset.html
pandas.tseries.offsets.Milli.is_on_offset
Milli.is_on_offset(dt)# Return boolean whether a timestamp intersects with this frequency.
Parameters: dtdatetime.datetimeTimestamp to check intersections with frequency.
['>>> ts = pd.Timestamp(2022, 1, 1)\n>>> freq = pd.offsets.Day(1)\n>>> freq.is_on_offset(ts)\nTrue', ">>> ts = pd.Timestamp(2022, 8, 6)\n>>> ts.day_name()\n'Saturday'\n>>> freq = pd.offsets.BusinessDay(1)\n>>> freq.is_on_offset(ts)\nFalse"]
pandas.tseries.offsets.Milli.is_on_offset Milli.is_on_offset(dt)# Return boolean whether a timestamp intersects with this frequency.
[ -0.26747095584869385, -0.6083695292472839, -0.1646234542131424, -0.015919124707579613, -0.22750414907932281, -0.156777024269104, 0.25442448258399963, 0.2570873498916626, -0.18887415528297424, 0.11408165097236633, 0.34299805760383606, 0.16108845174312592, -0.12305077910423279, 0.22276629507...
76
..\pandas\reference\api\pandas.tseries.offsets.BYearBegin.is_year_start.html
pandas.tseries.offsets.BYearBegin.is_year_start
BYearBegin.is_year_start(ts)# Return boolean whether a timestamp occurs on the year start.
No parameters found
['>>> ts = pd.Timestamp(2022, 1, 1)\n>>> freq = pd.offsets.Hour(5)\n>>> freq.is_year_start(ts)\nTrue']
pandas.tseries.offsets.BYearBegin.is_year_start BYearBegin.is_year_start(ts)# Return boolean whether a timestamp occurs on the year start.
[ -0.23949268460273743, -0.3206510543823242, -0.14516466856002808, 0.07058463990688324, -0.2783242166042328, -0.1053539365530014, 0.2683584690093994, 0.23763060569763184, -0.018626870587468147, -0.1515052616596222, 0.44927558302879333, 0.11821532249450684, 0.03617892041802406, 0.106109775602...
77
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.quantile.html
pandas.core.groupby.SeriesGroupBy.quantile
SeriesGroupBy.quantile(q=0.5, interpolation='linear', numeric_only=False)[source]# Return group values at the given quantile, a la numpy.percentile.
Parameters: qfloat or array-like, default 0.5 (50% quantile)Value(s) between 0 and 1 providing the quantile(s) to compute. interpolation{‘linear’, ‘lower’, ‘higher’, ‘midpoint’, ‘nearest’}Method to use when the desired quantile falls between two points. numeric_onlybool, default FalseInclude only float, int or boolean ...
[">>> df = pd.DataFrame([\n... ['a', 1], ['a', 2], ['a', 3],\n... ['b', 1], ['b', 3], ['b', 5]\n... ], columns=['key', 'val'])\n>>> df.groupby('key').quantile()\n val\nkey\na 2.0\nb 3.0"]
pandas.core.groupby.SeriesGroupBy.quantile SeriesGroupBy.quantile(q=0.5, interpolation='linear', numeric_only=False)[source]# Return group values at the given quantile, a la numpy.percentile.
[ -0.37741121649742126, -0.07632367312908173, -0.1663055270910263, 0.021261068060994148, 0.09067869186401367, 0.17515161633491516, 0.07544893026351929, 0.47422370314598083, -0.03880852833390236, 0.2941252291202545, -0.513741135597229, 0.2905884385108948, 0.17076094448566437, 0.02194037102162...
78
..\pandas\reference\api\pandas.Series.cummax.html
pandas.Series.cummax
Series.cummax(axis=None, skipna=True, *args, **kwargs)[source]# Return cumulative maximum over a DataFrame or Series axis. Returns a DataFrame or Series of the same size containing the cumulative maximum.
Parameters: axis{0 or ‘index’, 1 or ‘columns’}, default 0The index or the name of the axis. 0 is equivalent to None or ‘index’. For Series this parameter is unused and defaults to 0. skipnabool, default TrueExclude NA/null values. If an entire row/column is NA, the result will be NA. *args, **kwargsAdditional keywords ...
['>>> s = pd.Series([2, np.nan, 5, -1, 0])\n>>> s\n0 2.0\n1 NaN\n2 5.0\n3 -1.0\n4 0.0\ndtype: float64', '>>> s.cummax()\n0 2.0\n1 NaN\n2 5.0\n3 5.0\n4 5.0\ndtype: float64', '>>> s.cummax(skipna=False)\n0 2.0\n1 NaN\n2 NaN\n3 NaN\n4 NaN\ndtype: float64', ">>> df = pd.DataFrame...
pandas.Series.cummax Series.cummax(axis=None, skipna=True, *args, **kwargs)[source]# Return cumulative maximum over a DataFrame or Series axis. Returns a DataFrame or Series of the same size containing the cumulative maximum.
[ -0.2318311631679535, -0.39764338731765747, -0.1296285092830658, 0.14397715032100677, 0.18195320665836334, 0.020667390897870064, -0.0205288827419281, 0.3482076823711395, 0.20016488432884216, 0.22709283232688904, -0.2018091380596161, 0.2692829370498657, 0.10324721783399582, 0.185765743255615...
79
..\pandas\reference\api\pandas.DataFrame.sample.html
pandas.DataFrame.sample
DataFrame.sample(n=None, frac=None, replace=False, weights=None, random_state=None, axis=None, ignore_index=False)[source]# Return a random sample of items from an axis of object. You can use random_state for reproducibility. Notes If frac > 1, replacement should be set to True.
Parameters: nint, optionalNumber of items from axis to return. Cannot be used with frac. Default = 1 if frac = None. fracfloat, optionalFraction of axis items to return. Cannot be used with n. replacebool, default FalseAllow or disallow sampling of the same row more than once. weightsstr or ndarray-like, optionalDefaul...
[">>> df = pd.DataFrame({'num_legs': [2, 4, 8, 0],\n... 'num_wings': [2, 0, 0, 0],\n... 'num_specimen_seen': [10, 2, 1, 8]},\n... index=['falcon', 'dog', 'spider', 'fish'])\n>>> df\n num_legs num_wings num_specimen_seen\nfalcon 2 2 ...
pandas.DataFrame.sample DataFrame.sample(n=None, frac=None, replace=False, weights=None, random_state=None, axis=None, ignore_index=False)[source]# Return a random sample of items from an axis of object. You can use random_state for reproducibility. Notes If frac > 1, replacement should be set to True.
[ 0.019590290263295174, -0.3365422189235687, -0.10109981149435043, 0.011462977156043053, 0.031831685453653336, 0.11560516804456711, 0.3784247636795044, 0.3081706464290619, 0.2785770893096924, 0.31060102581977844, 0.14927826821804047, 0.5994406938552856, -0.003043383825570345, 0.2227704823017...
80
..\pandas\reference\api\pandas.Series.to_period.html
pandas.Series.to_period
Series.to_period(freq=None, copy=None)[source]# Convert Series from DatetimeIndex to PeriodIndex.
Parameters: freqstr, default NoneFrequency associated with the PeriodIndex. copybool, default TrueWhether or not to return a copy. Note The copy keyword will change behavior in pandas 3.0. Copy-on-Write will be enabled by default, which means that all methods with a copy keyword will use a lazy copy mechanism to defer ...
[">>> idx = pd.DatetimeIndex(['2023', '2024', '2025'])\n>>> s = pd.Series([1, 2, 3], index=idx)\n>>> s = s.to_period()\n>>> s\n2023 1\n2024 2\n2025 3\nFreq: Y-DEC, dtype: int64", ">>> s.index\nPeriodIndex(['2023', '2024', '2025'], dtype='period[Y-DEC]')"]
pandas.Series.to_period Series.to_period(freq=None, copy=None)[source]# Convert Series from DatetimeIndex to PeriodIndex.
[ -0.09816259145736694, -0.0733388215303421, -0.1277504563331604, -0.0279103834182024, 0.14338763058185577, 0.3292906582355499, 0.23395183682441711, 0.471644788980484, -0.35731732845306396, 0.12006562203168869, -0.05146399512887001, 0.16324684023857117, 0.06392255425453186, 0.159141734242439...
81
..\pandas\reference\api\pandas.Series.cummin.html
pandas.Series.cummin
Series.cummin(axis=None, skipna=True, *args, **kwargs)[source]# Return cumulative minimum over a DataFrame or Series axis. Returns a DataFrame or Series of the same size containing the cumulative minimum.
Parameters: axis{0 or ‘index’, 1 or ‘columns’}, default 0The index or the name of the axis. 0 is equivalent to None or ‘index’. For Series this parameter is unused and defaults to 0. skipnabool, default TrueExclude NA/null values. If an entire row/column is NA, the result will be NA. *args, **kwargsAdditional keywords ...
['>>> s = pd.Series([2, np.nan, 5, -1, 0])\n>>> s\n0 2.0\n1 NaN\n2 5.0\n3 -1.0\n4 0.0\ndtype: float64', '>>> s.cummin()\n0 2.0\n1 NaN\n2 2.0\n3 -1.0\n4 -1.0\ndtype: float64', '>>> s.cummin(skipna=False)\n0 2.0\n1 NaN\n2 NaN\n3 NaN\n4 NaN\ndtype: float64', ">>> df = pd.DataFrame...
pandas.Series.cummin Series.cummin(axis=None, skipna=True, *args, **kwargs)[source]# Return cumulative minimum over a DataFrame or Series axis. Returns a DataFrame or Series of the same size containing the cumulative minimum.
[ -0.3539058268070221, -0.45204970240592957, -0.0701114758849144, -0.017715124413371086, 0.22716368734836578, 0.02455775812268257, 0.06329675018787384, 0.3896169364452362, -0.08792936056852341, 0.17230559885501862, -0.18135464191436768, 0.27994266152381897, 0.11665564030408859, 0.00364518933...
82
..\pandas\reference\api\pandas.tseries.offsets.Milli.is_quarter_end.html
pandas.tseries.offsets.Milli.is_quarter_end
Milli.is_quarter_end(ts)# Return boolean whether a timestamp occurs on the quarter end.
No parameters found
['>>> ts = pd.Timestamp(2022, 1, 1)\n>>> freq = pd.offsets.Hour(5)\n>>> freq.is_quarter_end(ts)\nFalse']
pandas.tseries.offsets.Milli.is_quarter_end Milli.is_quarter_end(ts)# Return boolean whether a timestamp occurs on the quarter end.
[ -0.2104828655719757, -0.4817192256450653, -0.22226233780384064, -0.09640312939882278, -0.26078689098358154, -0.059838518500328064, 0.22723448276519775, 0.24505580961704254, -0.14622806012630463, 0.08627114444971085, 0.3227127492427826, 0.2891220450401306, 0.059231776744127274, 0.1055016368...
83
..\pandas\reference\api\pandas.Int32Dtype.html
pandas.Int32Dtype
class pandas.Int32Dtype[source]# An ExtensionDtype for int32 integer data. Uses pandas.NA as its missing value, rather than numpy.nan. Attributes None Methods None
No parameters found
['>>> ser = pd.Series([2, pd.NA], dtype=pd.Int8Dtype())\n>>> ser.dtype\nInt8Dtype()', '>>> ser = pd.Series([2, pd.NA], dtype=pd.Int16Dtype())\n>>> ser.dtype\nInt16Dtype()', '>>> ser = pd.Series([2, pd.NA], dtype=pd.Int32Dtype())\n>>> ser.dtype\nInt32Dtype()', '>>> ser = pd.Series([2, pd.NA], dtype=pd.Int64Dtype())\n>>>...
pandas.Int32Dtype class pandas.Int32Dtype[source]# An ExtensionDtype for int32 integer data. Uses pandas.NA as its missing value, rather than numpy.nan. Attributes None Methods None
[ 0.17015941441059113, -0.4436626732349396, -0.14914570748806, 0.2601667046546936, 0.4675077497959137, 0.320388525724411, 0.3564099371433258, 0.32521605491638184, 0.07306185364723206, 0.3423459231853485, 0.025168107822537422, -0.0569356344640255, -0.03870601952075958, -0.015582973137497902, ...
84
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.interpolate.html
pandas.api.extensions.ExtensionArray.interpolate
ExtensionArray.interpolate(*, method, axis, index, limit, limit_direction, limit_area, copy, **kwargs)[source]# See DataFrame.interpolate.__doc__.
No parameters found
['>>> arr = pd.arrays.NumpyExtensionArray(np.array([0, 1, np.nan, 3]))\n>>> arr.interpolate(method="linear",\n... limit=3,\n... limit_direction="forward",\n... index=pd.Index([1, 2, 3, 4]),\n... fill_value=1,\n... copy=False,\n... ...
pandas.api.extensions.ExtensionArray.interpolate ExtensionArray.interpolate(*, method, axis, index, limit, limit_direction, limit_area, copy, **kwargs)[source]# See DataFrame.interpolate.__doc__.
[ 0.06378938257694244, -0.31666839122772217, -0.14727933704853058, -0.21473678946495056, -0.046869583427906036, 0.11367536336183548, 0.16323047876358032, 0.3327605724334717, 0.053087782114744186, 0.37672531604766846, -0.07670259475708008, 0.3226410746574402, 0.1546051949262619, 0.06803949922...
85
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.rank.html
pandas.core.groupby.SeriesGroupBy.rank
SeriesGroupBy.rank(method='average', ascending=True, na_option='keep', pct=False, axis=<no_default>)[source]# Provide the rank of values within each group.
Parameters: method{‘average’, ‘min’, ‘max’, ‘first’, ‘dense’}, default ‘average’ average: average rank of group. min: lowest rank in group. max: highest rank in group. first: ranks assigned in order they appear in the array. dense: like ‘min’, but rank always increases by 1 between groups. ascendingbool, default TrueFa...
['>>> df = pd.DataFrame(\n... {\n... "group": ["a", "a", "a", "a", "a", "b", "b", "b", "b", "b"],\n... "value": [2, 4, 2, 3, 5, 1, 2, 4, 1, 5],\n... }\n... )\n>>> df\n group value\n0 a 2\n1 a 4\n2 a 2\n3 a 3\n4 a 5\n5 b 1\n6 b 2\n7...
pandas.core.groupby.SeriesGroupBy.rank SeriesGroupBy.rank(method='average', ascending=True, na_option='keep', pct=False, axis=<no_default>)[source]# Provide the rank of values within each group.
[ -0.35954549908638, -0.28176724910736084, -0.19579161703586578, 0.29965001344680786, 0.0498468317091465, 0.3561514914035797, 0.1617695689201355, 0.08097799867391586, 0.27715936303138733, 0.1900903284549713, -0.21580953896045685, 0.30867114663124084, 0.2066153734922409, 0.2454664260149002, ...
86
..\pandas\reference\api\pandas.tseries.offsets.BYearBegin.kwds.html
pandas.tseries.offsets.BYearBegin.kwds
BYearBegin.kwds# Return a dict of extra parameters for the offset.
No parameters found
['>>> pd.DateOffset(5).kwds\n{}', ">>> pd.offsets.FY5253Quarter().kwds\n{'weekday': 0,\n 'startingMonth': 1,\n 'qtr_with_extra_week': 1,\n 'variation': 'nearest'}"]
pandas.tseries.offsets.BYearBegin.kwds BYearBegin.kwds# Return a dict of extra parameters for the offset.
[ -0.07018858939409256, -0.5757514834403992, -0.14268045127391815, -0.06287901103496552, 0.10506017506122589, 0.0937630757689476, 0.3929561972618103, 0.16894294321537018, -0.10522058606147766, 0.2091352641582489, -0.061426661908626556, 0.15852461755275726, 0.09093153476715088, 0.076653942465...
87
..\pandas\reference\api\pandas.Series.to_pickle.html
pandas.Series.to_pickle
Series.to_pickle(path, *, compression='infer', protocol=5, storage_options=None)[source]# Pickle (serialize) object to file.
Parameters: pathstr, path object, or file-like objectString, path object (implementing os.PathLike[str]), or file-like object implementing a binary write() function. File path where the pickled object will be stored. compressionstr or dict, default ‘infer’For on-the-fly compression of the output data. If ‘infer’ and ‘p...
['>>> original_df = pd.DataFrame({"foo": range(5), "bar": range(5, 10)}) \n>>> original_df \n foo bar\n0 0 5\n1 1 6\n2 2 7\n3 3 8\n4 4 9\n>>> original_df.to_pickle("./dummy.pkl")', '>>> unpickled_df = pd.read_pickle("./dummy.pkl") \n>>> unpickled_df \n foo bar\n0 0 5\n1 ...
pandas.Series.to_pickle Series.to_pickle(path, *, compression='infer', protocol=5, storage_options=None)[source]# Pickle (serialize) object to file.
[ -0.024719655513763428, -0.016766857355833054, -0.08817435055971146, 0.10867880284786224, 0.30898451805114746, 0.08868341147899628, 0.01108771562576294, 0.6141710877418518, 0.17622481286525726, 0.39008331298828125, -0.044367384165525436, 0.7184514403343201, -0.14172348380088806, 0.399515062...
88
..\pandas\reference\api\pandas.DataFrame.select_dtypes.html
pandas.DataFrame.select_dtypes
DataFrame.select_dtypes(include=None, exclude=None)[source]# Return a subset of the DataFrame’s columns based on the column dtypes. Notes To select all numeric types, use np.number or 'number' To select strings you must use the object dtype, but note that this will return all object dtype columns See the numpy dtype hi...
Parameters: include, excludescalar or list-likeA selection of dtypes or strings to be included/excluded. At least one of these parameters must be supplied. Returns: DataFrameThe subset of the frame including the dtypes in include and excluding the dtypes in exclude. Raises: ValueError If both of include and exclude are...
[">>> df = pd.DataFrame({'a': [1, 2] * 3,\n... 'b': [True, False] * 3,\n... 'c': [1.0, 2.0] * 3})\n>>> df\n a b c\n0 1 True 1.0\n1 2 False 2.0\n2 1 True 1.0\n3 2 False 2.0\n4 1 True 1.0\n5 2 False 2.0", ">>> df.select_...
pandas.DataFrame.select_dtypes DataFrame.select_dtypes(include=None, exclude=None)[source]# Return a subset of the DataFrame’s columns based on the column dtypes. Notes To select all numeric types, use np.number or 'number' To select strings you must use the object dtype, but note that this will return all object dtype...
[ -0.11338429152965546, -0.2413373440504074, -0.14576184749603271, 0.23427629470825195, 0.1419454663991928, 0.26429522037506104, 0.25586479902267456, 0.5871514081954956, 0.110561303794384, 0.1277068704366684, -0.23181931674480438, 0.34182098507881165, 0.055395226925611496, 0.1340869516134262...
89
..\pandas\reference\api\pandas.Series.cumprod.html
pandas.Series.cumprod
Series.cumprod(axis=None, skipna=True, *args, **kwargs)[source]# Return cumulative product over a DataFrame or Series axis. Returns a DataFrame or Series of the same size containing the cumulative product.
Parameters: axis{0 or ‘index’, 1 or ‘columns’}, default 0The index or the name of the axis. 0 is equivalent to None or ‘index’. For Series this parameter is unused and defaults to 0. skipnabool, default TrueExclude NA/null values. If an entire row/column is NA, the result will be NA. *args, **kwargsAdditional keywords ...
['>>> s = pd.Series([2, np.nan, 5, -1, 0])\n>>> s\n0 2.0\n1 NaN\n2 5.0\n3 -1.0\n4 0.0\ndtype: float64', '>>> s.cumprod()\n0 2.0\n1 NaN\n2 10.0\n3 -10.0\n4 -0.0\ndtype: float64', '>>> s.cumprod(skipna=False)\n0 2.0\n1 NaN\n2 NaN\n3 NaN\n4 NaN\ndtype: float64', ">>> df = pd.Da...
pandas.Series.cumprod Series.cumprod(axis=None, skipna=True, *args, **kwargs)[source]# Return cumulative product over a DataFrame or Series axis. Returns a DataFrame or Series of the same size containing the cumulative product.
[ -0.3774954378604889, -0.3565249443054199, -0.10741198807954788, 0.060073815286159515, 0.060803696513175964, -0.01224402617663145, 0.3853963315486908, 0.3245071470737457, 0.08204146474599838, 0.14423209428787231, -0.2113666534423828, 0.262606143951416, 0.0977889820933342, 0.3389462530612945...
90
..\pandas\reference\api\pandas.tseries.offsets.Milli.is_quarter_start.html
pandas.tseries.offsets.Milli.is_quarter_start
Milli.is_quarter_start(ts)# Return boolean whether a timestamp occurs on the quarter start.
No parameters found
['>>> ts = pd.Timestamp(2022, 1, 1)\n>>> freq = pd.offsets.Hour(5)\n>>> freq.is_quarter_start(ts)\nTrue']
pandas.tseries.offsets.Milli.is_quarter_start Milli.is_quarter_start(ts)# Return boolean whether a timestamp occurs on the quarter start.
[ -0.34650617837905884, -0.38549330830574036, -0.17820508778095245, -0.0006923751207068563, -0.24389523267745972, -0.08253458887338638, 0.30619195103645325, 0.20173205435276031, -0.1855020970106125, 0.01013969536870718, 0.4242171049118042, 0.30298733711242676, -0.003787510097026825, 0.147842...
91
..\pandas\reference\api\pandas.DataFrame.sem.html
pandas.DataFrame.sem
DataFrame.sem(axis=0, skipna=True, ddof=1, numeric_only=False, **kwargs)[source]# Return unbiased standard error of the mean over requested axis. Normalized by N-1 by default. This can be changed using the ddof argument
Parameters: axis{index (0), columns (1)}For Series this parameter is unused and defaults to 0. Warning The behavior of DataFrame.sem with axis=None is deprecated, in a future version this will reduce over both axes and return a scalar To retain the old behavior, pass axis=0 (or do not pass axis). skipnabool, default Tr...
['>>> s = pd.Series([1, 2, 3])\n>>> s.sem().round(6)\n0.57735', ">>> df = pd.DataFrame({'a': [1, 2], 'b': [2, 3]}, index=['tiger', 'zebra'])\n>>> df\n a b\ntiger 1 2\nzebra 2 3\n>>> df.sem()\na 0.5\nb 0.5\ndtype: float64", '>>> df.sem(axis=1)\ntiger 0.5\nzebra 0.5\ndtype: float64', ">>> df = pd.Da...
pandas.DataFrame.sem DataFrame.sem(axis=0, skipna=True, ddof=1, numeric_only=False, **kwargs)[source]# Return unbiased standard error of the mean over requested axis. Normalized by N-1 by default. This can be changed using the ddof argument
[ -0.21490423381328583, -0.541797935962677, -0.12150460481643677, -0.30485594272613525, 0.03769761696457863, 0.061451349407434464, 0.21392373740673065, 0.18284058570861816, 0.10387657582759857, 0.289482444524765, -0.15270063281059265, 0.45805302262306213, 0.042229101061820984, 0.136214852333...
92
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.isin.html
pandas.api.extensions.ExtensionArray.isin
ExtensionArray.isin(values)[source]# Pointwise comparison for set containment in the given values. Roughly equivalent to np.array([x in values for x in self])
Parameters: valuesnp.ndarray or ExtensionArray Returns: np.ndarray[bool]
['>>> arr = pd.array([1, 2, 3])\n>>> arr.isin([1])\n<BooleanArray>\n[True, False, False]\nLength: 3, dtype: boolean']
pandas.api.extensions.ExtensionArray.isin ExtensionArray.isin(values)[source]# Pointwise comparison for set containment in the given values. Roughly equivalent to np.array([x in values for x in self])
[ -0.15131248533725739, -0.5422431230545044, -0.3083004057407379, 0.06204000115394592, -0.14829517900943756, -0.01338048093020916, -0.0731504037976265, 0.42403438687324524, 0.05369644984602928, 0.2015373259782791, -0.18288666009902954, 0.44950219988822937, 0.05878438428044319, 0.039699964225...
93
..\pandas\reference\api\pandas.tseries.offsets.BYearBegin.month.html
pandas.tseries.offsets.BYearBegin.month
BYearBegin.month#
No parameters found
[]
pandas.tseries.offsets.BYearBegin.month BYearBegin.month#
[ -0.02287842147052288, -0.3895910084247589, -0.24050423502922058, -0.07639241218566895, 0.13853752613067627, 0.28890329599380493, 0.4204651415348053, 0.21607902646064758, -0.10586553812026978, 0.35584044456481934, -0.041864700615406036, 0.1333484649658203, 0.23012152314186096, 0.22361199557...
94
..\pandas\reference\api\pandas.Int64Dtype.html
pandas.Int64Dtype
class pandas.Int64Dtype[source]# An ExtensionDtype for int64 integer data. Uses pandas.NA as its missing value, rather than numpy.nan. Attributes None Methods None
No parameters found
['>>> ser = pd.Series([2, pd.NA], dtype=pd.Int8Dtype())\n>>> ser.dtype\nInt8Dtype()', '>>> ser = pd.Series([2, pd.NA], dtype=pd.Int16Dtype())\n>>> ser.dtype\nInt16Dtype()', '>>> ser = pd.Series([2, pd.NA], dtype=pd.Int32Dtype())\n>>> ser.dtype\nInt32Dtype()', '>>> ser = pd.Series([2, pd.NA], dtype=pd.Int64Dtype())\n>>>...
pandas.Int64Dtype class pandas.Int64Dtype[source]# An ExtensionDtype for int64 integer data. Uses pandas.NA as its missing value, rather than numpy.nan. Attributes None Methods None
[ 0.2548237442970276, -0.4010807275772095, -0.14867936074733734, 0.2780836224555969, 0.45253345370292664, 0.32468390464782715, 0.31248974800109863, 0.40501391887664795, 0.07087042927742004, 0.28258219361305237, 0.09533093124628067, -0.07702982425689697, 0.005824448075145483, -0.0221106894314...
95
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.resample.html
pandas.core.groupby.SeriesGroupBy.resample
SeriesGroupBy.resample(rule, *args, include_groups=True, **kwargs)[source]# Provide resampling when using a TimeGrouper. Given a grouper, the function resamples it according to a string “string” -> “frequency”. See the frequency aliases documentation for more details.
Parameters: rulestr or DateOffsetThe offset string or object representing target grouper conversion. *argsPossible arguments are how, fill_method, limit, kind and on, and other arguments of TimeGrouper. include_groupsbool, default TrueWhen True, will attempt to include the groupings in the operation in the case that th...
[">>> idx = pd.date_range('1/1/2000', periods=4, freq='min')\n>>> df = pd.DataFrame(data=4 * [range(2)],\n... index=idx,\n... columns=['a', 'b'])\n>>> df.iloc[2, 0] = 5\n>>> df\n a b\n2000-01-01 00:00:00 0 1\n2000-01-01 00:01:00 0 1\n2000-01-01 00:02:00 5 1\...
pandas.core.groupby.SeriesGroupBy.resample SeriesGroupBy.resample(rule, *args, include_groups=True, **kwargs)[source]# Provide resampling when using a TimeGrouper. Given a grouper, the function resamples it according to a string “string” -> “frequency”. See the frequency aliases documentation for more details.
[ -0.17250283062458038, -0.28512516617774963, -0.08710424602031708, -0.17384487390518188, -0.005196775309741497, 0.15772131085395813, 0.18498462438583374, 0.1511264592409134, -0.12975099682807922, 0.17355398833751678, -0.40945979952812195, 0.210702583193779, 0.10918853431940079, -0.127663344...
96
..\pandas\reference\api\pandas.Series.to_sql.html
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 overwritten. Notes Timezone ...
Parameters: namestrName of SQL table. consqlalchemy.engine.(Engine or Connection) or sqlite3.ConnectionUsing SQLAlchemy makes it possible to use any DB supported by that library. Legacy support is provided for sqlite3.Connection objects. The user is responsible for engine disposal and connection closure for the SQLAlch...
[">>> from sqlalchemy import create_engine\n>>> engine = create_engine('sqlite://', echo=False)", ">>> df = pd.DataFrame({'name' : ['User 1', 'User 2', 'User 3']})\n>>> df\n name\n0 User 1\n1 User 2\n2 User 3", '>>> df.to_sql(name=\'users\', con=engine)\n3\n>>> from sqlalchemy import text\n>>> with engine.connec...
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...
[ -0.04613310843706131, -0.10232214629650116, -0.10980280488729477, -0.08742910623550415, 0.12862169742584229, 0.2901182174682617, 0.09014225006103516, 0.28087887167930603, 0.11449942737817764, -0.04226228594779968, -0.19778349995613098, 0.09012068808078766, -0.14976085722446442, 0.093573004...
97
..\pandas\reference\api\pandas.Series.cumsum.html
pandas.Series.cumsum
Series.cumsum(axis=None, skipna=True, *args, **kwargs)[source]# Return cumulative sum over a DataFrame or Series axis. Returns a DataFrame or Series of the same size containing the cumulative sum.
Parameters: axis{0 or ‘index’, 1 or ‘columns’}, default 0The index or the name of the axis. 0 is equivalent to None or ‘index’. For Series this parameter is unused and defaults to 0. skipnabool, default TrueExclude NA/null values. If an entire row/column is NA, the result will be NA. *args, **kwargsAdditional keywords ...
['>>> s = pd.Series([2, np.nan, 5, -1, 0])\n>>> s\n0 2.0\n1 NaN\n2 5.0\n3 -1.0\n4 0.0\ndtype: float64', '>>> s.cumsum()\n0 2.0\n1 NaN\n2 7.0\n3 6.0\n4 6.0\ndtype: float64', '>>> s.cumsum(skipna=False)\n0 2.0\n1 NaN\n2 NaN\n3 NaN\n4 NaN\ndtype: float64', ">>> df = pd.DataFrame...
pandas.Series.cumsum Series.cumsum(axis=None, skipna=True, *args, **kwargs)[source]# Return cumulative sum over a DataFrame or Series axis. Returns a DataFrame or Series of the same size containing the cumulative sum.
[ -0.31133323907852173, -0.2488119900226593, -0.08331844210624695, 0.16633641719818115, 0.164164736866951, 0.1934071183204651, 0.054963868111371994, 0.33013343811035156, 0.1413574516773224, 0.25873222947120667, -0.24112264811992645, 0.35709714889526367, 0.21754689514636993, 0.170479580760002...
98
..\pandas\reference\api\pandas.tseries.offsets.Milli.is_year_end.html
pandas.tseries.offsets.Milli.is_year_end
Milli.is_year_end(ts)# Return boolean whether a timestamp occurs on the year end.
No parameters found
['>>> ts = pd.Timestamp(2022, 1, 1)\n>>> freq = pd.offsets.Hour(5)\n>>> freq.is_year_end(ts)\nFalse']
pandas.tseries.offsets.Milli.is_year_end Milli.is_year_end(ts)# Return boolean whether a timestamp occurs on the year end.
[ -0.19111007452011108, -0.37292516231536865, -0.19044309854507446, -0.01671825721859932, -0.2288854718208313, -0.10561465471982956, 0.15680482983589172, 0.2971207797527313, -0.07535433024168015, 0.033730801194906235, 0.49159595370292664, 0.29223471879959106, 0.044150277972221375, 0.14221774...
99
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.isna.html
pandas.api.extensions.ExtensionArray.isna
ExtensionArray.isna()[source]# A 1-D array indicating if each value is missing. Notes If returning an ExtensionArray, then na_values._is_boolean should be True na_values should implement ExtensionArray._reduce() na_values.any and na_values.all should be implemented
Returns: numpy.ndarray or pandas.api.extensions.ExtensionArrayIn most cases, this should return a NumPy ndarray. For exceptional cases like SparseArray, where returning an ndarray would be expensive, an ExtensionArray may be returned.
['>>> arr = pd.array([1, 2, np.nan, np.nan])\n>>> arr.isna()\narray([False, False, True, True])']
pandas.api.extensions.ExtensionArray.isna ExtensionArray.isna()[source]# A 1-D array indicating if each value is missing. Notes If returning an ExtensionArray, then na_values._is_boolean should be True na_values should implement ExtensionArray._reduce() na_values.any and na_values.all should be implemented
[ 0.2893252372741699, -0.4085084795951843, -0.28772100806236267, 0.006774773821234703, 0.05797714367508888, -0.014039839617908001, -0.017490843310952187, 0.3324430584907532, 0.09888613969087601, 0.3466976583003998, 0.1763417273759842, 0.2718733251094818, 0.013368109241127968, -0.000058795347...