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
100
..\pandas\reference\api\pandas.DataFrame.set_axis.html
pandas.DataFrame.set_axis
DataFrame.set_axis(labels, *, axis=0, copy=None)[source]# Assign desired index to given axis. Indexes for column or row labels can be changed by assigning a list-like or Index.
Parameters: labelslist-like, IndexThe values for the new index. axis{0 or ‘index’, 1 or ‘columns’}, default 0The axis to update. The value 0 identifies the rows. For Series this parameter is unused and defaults to 0. copybool, default TrueWhether to make a copy of the underlying data. Note The copy keyword will change ...
['>>> df = pd.DataFrame({"A": [1, 2, 3], "B": [4, 5, 6]})', ">>> df.set_axis(['a', 'b', 'c'], axis='index')\n A B\na 1 4\nb 2 5\nc 3 6", ">>> df.set_axis(['I', 'II'], axis='columns')\n I II\n0 1 4\n1 2 5\n2 3 6"]
pandas.DataFrame.set_axis DataFrame.set_axis(labels, *, axis=0, copy=None)[source]# Assign desired index to given axis. Indexes for column or row labels can be changed by assigning a list-like or Index.
[ -0.049347952008247375, -0.22530300915241241, -0.14463824033737183, -0.043557748198509216, 0.1385825276374817, 0.1689675897359848, 0.559268593788147, 0.3573441803455353, 0.1542334407567978, 0.3725300431251526, -0.3404938578605652, 0.48129117488861084, 0.06616339832544327, 0.4486469030380249...
101
..\pandas\reference\api\pandas.tseries.offsets.BYearBegin.n.html
pandas.tseries.offsets.BYearBegin.n
BYearBegin.n#
No parameters found
[]
pandas.tseries.offsets.BYearBegin.n BYearBegin.n#
[ -0.21270205080509186, -0.6396020650863647, -0.22776007652282715, -0.00019611569587141275, 0.06820230931043625, 0.17455215752124786, 0.374524861574173, 0.09868352860212326, -0.10771367698907852, 0.1539316326379776, -0.03724417835474014, -0.16420409083366394, 0.22550933063030243, 0.250867754...
102
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.rolling.html
pandas.core.groupby.SeriesGroupBy.rolling
SeriesGroupBy.rolling(*args, **kwargs)[source]# Return a rolling grouper, providing rolling functionality per group.
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({'A': [1, 1, 2, 2],\n... 'B': [1, 2, 3, 4],\n... 'C': [0.362, 0.227, 1.267, -0.562]})\n>>> df\n A B C\n0 1 1 0.362\n1 1 2 0.227\n2 2 3 1.267\n3 2 4 -0.562", ">>> df.groupby('A').rolling(2).sum()\n B C\nA\n1 0 NaN ...
pandas.core.groupby.SeriesGroupBy.rolling SeriesGroupBy.rolling(*args, **kwargs)[source]# Return a rolling grouper, providing rolling functionality per group.
[ -0.20371535420417786, -0.37597668170928955, -0.11591846495866776, -0.0034725551959127188, 0.007464784663170576, 0.3307065963745117, 0.30738019943237305, 0.2146024852991104, -0.00833096168935299, 0.18074241280555725, -0.053120795637369156, 0.42425262928009033, -0.08963839709758759, 0.120338...
103
..\pandas\reference\api\pandas.DataFrame.set_flags.html
pandas.DataFrame.set_flags
DataFrame.set_flags(*, copy=False, allows_duplicate_labels=None)[source]# Return a new object with updated flags. Notes This method returns a new object that’s a view on the same data as the input. Mutating the input or the output values will be reflected in the other. This method is intended to be used in method chain...
Parameters: copybool, default FalseSpecify if a copy of the object should be made. 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 the copy and ignore the copy keyword. The copy k...
['>>> df = pd.DataFrame({"A": [1, 2]})\n>>> df.flags.allows_duplicate_labels\nTrue\n>>> df2 = df.set_flags(allows_duplicate_labels=False)\n>>> df2.flags.allows_duplicate_labels\nFalse']
pandas.DataFrame.set_flags DataFrame.set_flags(*, copy=False, allows_duplicate_labels=None)[source]# Return a new object with updated flags. Notes This method returns a new object that’s a view on the same data as the input. Mutating the input or the output values will be reflected in the other. This method is intended...
[ 0.06520535051822662, -0.2806072533130646, -0.11874329298734665, -0.14288772642612457, -0.07177982479333878, -0.0030741747468709946, 0.3653246760368347, 0.33561426401138306, -0.1787278652191162, 0.047111768275499344, -0.24833229184150696, 0.40038764476776123, 0.1575498729944229, 0.181002050...
104
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.nbytes.html
pandas.api.extensions.ExtensionArray.nbytes
property ExtensionArray.nbytes[source]# The number of bytes needed to store this object in memory.
No parameters found
['>>> pd.array([1, 2, 3]).nbytes\n27']
pandas.api.extensions.ExtensionArray.nbytes property ExtensionArray.nbytes[source]# The number of bytes needed to store this object in memory.
[ 0.16592620313167572, -0.389471173286438, -0.24040457606315613, 0.25237658619880676, 0.2656184136867523, 0.12512920796871185, -0.05551110580563545, 0.20571283996105194, -0.01086266990751028, 0.2798592150211334, 0.2883564233779907, 0.008521506562829018, -0.016030380502343178, 0.1349608302116...
105
..\pandas\reference\api\pandas.Series.describe.html
pandas.Series.describe
Series.describe(percentiles=None, include=None, exclude=None)[source]# Generate descriptive statistics. Descriptive statistics include those that summarize the central tendency, dispersion and shape of a dataset’s distribution, excluding NaN values. Analyzes both numeric and object series, as well as DataFrame column s...
Parameters: percentileslist-like of numbers, optionalThe percentiles to include in the output. All should fall between 0 and 1. The default is [.25, .5, .75], which returns the 25th, 50th, and 75th percentiles. include‘all’, list-like of dtypes or None (default), optionalA white list of data types to include in the res...
['>>> s = pd.Series([1, 2, 3])\n>>> s.describe()\ncount 3.0\nmean 2.0\nstd 1.0\nmin 1.0\n25% 1.5\n50% 2.0\n75% 2.5\nmax 3.0\ndtype: float64', ">>> s = pd.Series(['a', 'a', 'b', 'c'])\n>>> s.describe()\ncount 4\nunique 3\ntop a\nfreq 2\ndtype: object", '>>> s = pd.S...
pandas.Series.describe Series.describe(percentiles=None, include=None, exclude=None)[source]# Generate descriptive statistics. Descriptive statistics include those that summarize the central tendency, dispersion and shape of a dataset’s distribution, excluding NaN values. Analyzes both numeric and object series, as wel...
[ -0.3536635935306549, -0.12756088376045227, -0.09317341446876526, 0.1494317501783371, 0.2024131715297699, 0.22050507366657257, -0.12412042170763016, 0.31659457087516785, -0.15061554312705994, 0.14548306167125702, -0.34782740473747253, -0.09979323297739029, 0.174268901348114, 0.1788224875926...
106
..\pandas\reference\api\pandas.Series.to_string.html
pandas.Series.to_string
Series.to_string(buf=None, na_rep='NaN', float_format=None, header=True, index=True, length=False, dtype=False, name=False, max_rows=None, min_rows=None)[source]# Render a string representation of the Series.
Parameters: bufStringIO-like, optionalBuffer to write to. na_repstr, optionalString representation of NaN to use, default ‘NaN’. float_formatone-parameter function, optionalFormatter function to apply to columns’ elements if they are floats, default None. headerbool, default TrueAdd the Series header (index name). inde...
[">>> ser = pd.Series([1, 2, 3]).to_string()\n>>> ser\n'0 1\\n1 2\\n2 3'"]
pandas.Series.to_string Series.to_string(buf=None, na_rep='NaN', float_format=None, header=True, index=True, length=False, dtype=False, name=False, max_rows=None, min_rows=None)[source]# Render a string representation of the Series.
[ -0.12168745696544647, -0.3429397940635681, -0.2473362237215042, 0.02607792429625988, 0.2704486548900604, 0.2355644255876541, 0.21088452637195587, 0.5216038227081299, -0.20483100414276123, 0.16517332196235657, -0.02588428556919098, 0.2376852184534073, 0.147192120552063, 0.2089245617389679, ...
107
..\pandas\reference\api\pandas.Int8Dtype.html
pandas.Int8Dtype
class pandas.Int8Dtype[source]# An ExtensionDtype for int8 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.Int8Dtype class pandas.Int8Dtype[source]# An ExtensionDtype for int8 integer data. Uses pandas.NA as its missing value, rather than numpy.nan. Attributes None Methods None
[ 0.18889637291431427, -0.29643258452415466, -0.18758690357208252, 0.19549156725406647, 0.43717148900032043, 0.2551529109477997, 0.5054182410240173, 0.39939814805984497, 0.26511088013648987, 0.3265291154384613, -0.03984435275197029, -0.10208991914987564, -0.023836927488446236, -0.03518337383...
108
..\pandas\reference\api\pandas.tseries.offsets.Milli.is_year_start.html
pandas.tseries.offsets.Milli.is_year_start
Milli.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.Milli.is_year_start Milli.is_year_start(ts)# Return boolean whether a timestamp occurs on the year start.
[ -0.29222995042800903, -0.34345629811286926, -0.15072816610336304, 0.06171298772096634, -0.24766068160533905, -0.10957057029008865, 0.28786081075668335, 0.2060002088546753, -0.08502352982759476, -0.06845834106206894, 0.5798425674438477, 0.23957280814647675, -0.022746743634343147, 0.16902650...
109
..\pandas\reference\api\pandas.tseries.offsets.BYearBegin.name.html
pandas.tseries.offsets.BYearBegin.name
BYearBegin.name# Return a string representing the base frequency.
No parameters found
[">>> pd.offsets.Hour().name\n'h'", ">>> pd.offsets.Hour(5).name\n'h'"]
pandas.tseries.offsets.BYearBegin.name BYearBegin.name# Return a string representing the base frequency.
[ -0.08689305186271667, -0.592545747756958, -0.13735012710094452, -0.026423506438732147, 0.135916069149971, 0.09569302946329117, 0.3145238161087036, 0.22268956899642944, -0.22434638440608978, 0.2213708758354187, -0.21666887402534485, -0.03707437589764595, 0.08406464755535126, 0.2337498068809...
110
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.sample.html
pandas.core.groupby.SeriesGroupBy.sample
SeriesGroupBy.sample(n=None, frac=None, replace=False, weights=None, random_state=None)[source]# Return a random sample of items from each group. You can use random_state for reproducibility.
Parameters: nint, optionalNumber of items to return for each group. Cannot be used with frac and must be no larger than the smallest group unless replace is True. Default is one if frac is None. fracfloat, optionalFraction of items to return. Cannot be used with n. replacebool, default FalseAllow or disallow sampling o...
['>>> df = pd.DataFrame(\n... {"a": ["red"] * 2 + ["blue"] * 2 + ["black"] * 2, "b": range(6)}\n... )\n>>> df\n a b\n0 red 0\n1 red 1\n2 blue 2\n3 blue 3\n4 black 4\n5 black 5', '>>> df.groupby("a").sample(n=1, random_state=1)\n a b\n4 black 4\n2 blue 2\n1 red 1', '>>> df.gr...
pandas.core.groupby.SeriesGroupBy.sample SeriesGroupBy.sample(n=None, frac=None, replace=False, weights=None, random_state=None)[source]# Return a random sample of items from each group. You can use random_state for reproducibility.
[ -0.12089302390813828, -0.2787938416004181, -0.1515369713306427, -0.019577449187636375, -0.19174282252788544, 0.3738393783569336, 0.4002240002155304, 0.25389841198921204, 0.2013445496559143, 0.16048569977283478, -0.10444022715091705, 0.3588465750217438, -0.02131899818778038, 0.0537787340581...
111
..\pandas\reference\api\pandas.DataFrame.set_index.html
pandas.DataFrame.set_index
DataFrame.set_index(keys, *, drop=True, append=False, inplace=False, verify_integrity=False)[source]# Set the DataFrame index using existing columns. Set the DataFrame index (row labels) using one or more existing columns or arrays (of the correct length). The index can replace the existing index or expand on it.
Parameters: keyslabel or array-like or list of labels/arraysThis parameter can be either a single column key, a single array of the same length as the calling DataFrame, or a list containing an arbitrary combination of column keys and arrays. Here, “array” encompasses Series, Index, np.ndarray, and instances of Iterato...
[">>> df = pd.DataFrame({'month': [1, 4, 7, 10],\n... 'year': [2012, 2014, 2013, 2014],\n... 'sale': [55, 40, 84, 31]})\n>>> df\n month year sale\n0 1 2012 55\n1 4 2014 40\n2 7 2013 84\n3 10 2014 31", ">>> df.set_index('month')\n year s...
pandas.DataFrame.set_index DataFrame.set_index(keys, *, drop=True, append=False, inplace=False, verify_integrity=False)[source]# Set the DataFrame index using existing columns. Set the DataFrame index (row labels) using one or more existing columns or arrays (of the correct length). The index can replace the existing i...
[ 0.00009279958612751216, -0.13135871291160583, -0.16291522979736328, -0.049357011914253235, -0.029862424358725548, 0.2946324944496155, 0.371367484331131, 0.27411341667175293, 0.12391078472137451, 0.2823830842971802, -0.21683260798454285, 0.43789705634117126, 0.08279100805521011, 0.404502153...
112
..\pandas\reference\api\pandas.Interval.closed.html
pandas.Interval.closed
Interval.closed# String describing the inclusive side the intervals. Either left, right, both or neither.
No parameters found
[">>> interval = pd.Interval(left=1, right=2, closed='left')\n>>> interval\nInterval(1, 2, closed='left')\n>>> interval.closed\n'left'"]
pandas.Interval.closed Interval.closed# String describing the inclusive side the intervals. Either left, right, both or neither.
[ -0.25539377331733704, -0.3636680543422699, -0.248112753033638, -0.1395523101091385, -0.06786657869815826, 0.07955057919025421, 0.45138370990753174, -0.022651275619864464, -0.1259891241788864, 0.05859411135315895, -0.11704367399215698, -0.057059396058321, 0.14974214136600494, 0.280574619770...
113
..\pandas\reference\api\pandas.Series.to_timestamp.html
pandas.Series.to_timestamp
Series.to_timestamp(freq=None, how='start', copy=None)[source]# Cast to DatetimeIndex of Timestamps, at beginning of period.
Parameters: freqstr, default frequency of PeriodIndexDesired frequency. how{‘s’, ‘e’, ‘start’, ‘end’}Convention for converting period to timestamp; start of period vs. end. 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 d...
[">>> idx = pd.PeriodIndex(['2023', '2024', '2025'], freq='Y')\n>>> s1 = pd.Series([1, 2, 3], index=idx)\n>>> s1\n2023 1\n2024 2\n2025 3\nFreq: Y-DEC, dtype: int64", '>>> s1 = s1.to_timestamp()\n>>> s1\n2023-01-01 1\n2024-01-01 2\n2025-01-01 3\nFreq: YS-JAN, dtype: int64', ">>> s2 = pd.Series([1, 2, 3...
pandas.Series.to_timestamp Series.to_timestamp(freq=None, how='start', copy=None)[source]# Cast to DatetimeIndex of Timestamps, at beginning of period.
[ -0.2604878842830658, -0.09521035850048065, -0.11697743833065033, -0.17612768709659576, 0.08375424146652222, 0.3005329668521881, 0.20093104243278503, 0.5049480199813843, -0.2901002764701843, 0.04479517415165901, 0.12242823839187622, 0.26967403292655945, -0.11495943367481232, 0.1108447536826...
114
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.ndim.html
pandas.api.extensions.ExtensionArray.ndim
property ExtensionArray.ndim[source]# Extension Arrays are only allowed to be 1-dimensional.
No parameters found
['>>> arr = pd.array([1, 2, 3])\n>>> arr.ndim\n1']
pandas.api.extensions.ExtensionArray.ndim property ExtensionArray.ndim[source]# Extension Arrays are only allowed to be 1-dimensional.
[ 0.10846733301877975, -0.40692681074142456, -0.2531876266002655, 0.15833903849124908, 0.30414852499961853, 0.029153887182474136, 0.32108891010284424, 0.28449735045433044, 0.17839807271957397, 0.41802704334259033, -0.014009972102940083, 0.06484132260084152, -0.006310641765594482, 0.201439529...
115
..\pandas\reference\api\pandas.Series.diff.html
pandas.Series.diff
Series.diff(periods=1)[source]# First discrete difference of element. Calculates the difference of a Series element compared with another element in the Series (default is element in previous row). Notes For boolean dtypes, this uses operator.xor() rather than operator.sub(). The result is calculated according to curre...
Parameters: periodsint, default 1Periods to shift for calculating difference, accepts negative values. Returns: SeriesFirst differences of the Series.
['>>> s = pd.Series([1, 1, 2, 3, 5, 8])\n>>> s.diff()\n0 NaN\n1 0.0\n2 1.0\n3 1.0\n4 2.0\n5 3.0\ndtype: float64', '>>> s.diff(periods=3)\n0 NaN\n1 NaN\n2 NaN\n3 2.0\n4 4.0\n5 6.0\ndtype: float64', '>>> s.diff(periods=-1)\n0 0.0\n1 -1.0\n2 -1.0\n3 -2.0\n4 -3.0\n5 NaN\ndt...
pandas.Series.diff Series.diff(periods=1)[source]# First discrete difference of element. Calculates the difference of a Series element compared with another element in the Series (default is element in previous row). Notes For boolean dtypes, this uses operator.xor() rather than operator.sub(). The result is calculated...
[ -0.16308870911598206, -0.5899338722229004, -0.14647649228572845, 0.12071581184864044, -0.13443905115127563, 0.15641523897647858, 0.18369966745376587, 0.22645863890647888, -0.03681404888629913, 0.10747887194156647, -0.14734835922718048, 0.10971426218748093, 0.3071145713329315, 0.12519302964...
116
..\pandas\reference\api\pandas.tseries.offsets.BYearBegin.nanos.html
pandas.tseries.offsets.BYearBegin.nanos
BYearBegin.nanos#
No parameters found
[]
pandas.tseries.offsets.BYearBegin.nanos BYearBegin.nanos#
[ -0.06009342148900032, -0.574616014957428, -0.20853349566459656, -0.13670383393764496, 0.17883089184761047, 0.08347170799970627, 0.5410082936286926, 0.1054137647151947, -0.18098045885562897, 0.20329692959785461, -0.04636228829622269, -0.030409226194024086, 0.15162186324596405, 0.40527015924...
117
..\pandas\reference\api\pandas.tseries.offsets.Milli.kwds.html
pandas.tseries.offsets.Milli.kwds
Milli.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.Milli.kwds Milli.kwds# Return a dict of extra parameters for the offset.
[ -0.07330473512411118, -0.5435619950294495, -0.14138081669807434, -0.023820748552680016, 0.16528648138046265, 0.10014189779758453, 0.4219939112663269, 0.07373445481061935, -0.28833362460136414, 0.2997889816761017, 0.08912868052721024, 0.3457138240337372, 0.05267266556620598, 0.1279050111770...
118
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.sem.html
pandas.core.groupby.SeriesGroupBy.sem
SeriesGroupBy.sem(ddof=1, numeric_only=False)[source]# Compute standard error of the mean of groups, excluding missing values. For multiple groupings, the result index will be a MultiIndex.
Parameters: ddofint, default 1Degrees of freedom. numeric_onlybool, default FalseInclude only float, int or boolean data. Added in version 1.5.0. Changed in version 2.0.0: numeric_only now defaults to False. Returns: Series or DataFrameStandard error of the mean of values within each group.
[">>> lst = ['a', 'a', 'b', 'b']\n>>> ser = pd.Series([5, 10, 8, 14], index=lst)\n>>> ser\na 5\na 10\nb 8\nb 14\ndtype: int64\n>>> ser.groupby(level=0).sem()\na 2.5\nb 3.0\ndtype: float64", '>>> data = [[1, 12, 11], [1, 15, 2], [2, 5, 8], [2, 6, 12]]\n>>> df = pd.DataFrame(data, columns=["a", "b", "...
pandas.core.groupby.SeriesGroupBy.sem SeriesGroupBy.sem(ddof=1, numeric_only=False)[source]# Compute standard error of the mean of groups, excluding missing values. For multiple groupings, the result index will be a MultiIndex.
[ -0.2320951521396637, -0.49450212717056274, -0.0324222557246685, 0.08347255736589432, -0.2257775217294693, 0.4996761977672577, 0.2237648367881775, 0.13180534541606903, 0.267866849899292, 0.28565114736557007, -0.22702661156654358, 0.014121665619313717, -0.02225336991250515, -0.12448443472385...
119
..\pandas\reference\api\pandas.DataFrame.shape.html
pandas.DataFrame.shape
property DataFrame.shape[source]# Return a tuple representing the dimensionality of the DataFrame.
No parameters found
[">>> df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})\n>>> df.shape\n(2, 2)", ">>> df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4],\n... 'col3': [5, 6]})\n>>> df.shape\n(2, 3)"]
pandas.DataFrame.shape property DataFrame.shape[source]# Return a tuple representing the dimensionality of the DataFrame.
[ -0.14621463418006897, -0.39883875846862793, -0.1681690365076065, 0.3053697645664215, 0.16056370735168457, 0.020669184625148773, 0.428261399269104, 0.28721511363983154, 0.011101349256932735, 0.28838780522346497, -0.028828104957938194, 0.14325065910816193, -0.03240043297410011, 0.52412211894...
120
..\pandas\reference\api\pandas.Interval.closed_left.html
pandas.Interval.closed_left
Interval.closed_left# Check if the interval is closed on the left side. For the meaning of closed and open see Interval.
Returns: boolTrue if the Interval is closed on the left-side.
[">>> iv = pd.Interval(0, 5, closed='left')\n>>> iv.closed_left\nTrue", ">>> iv = pd.Interval(0, 5, closed='right')\n>>> iv.closed_left\nFalse"]
pandas.Interval.closed_left Interval.closed_left# Check if the interval is closed on the left side. For the meaning of closed and open see Interval.
[ -0.3117763102054596, -0.4805062711238861, -0.240861713886261, -0.09952814131975174, -0.18768347799777985, 0.024319438263773918, 0.42858049273490906, 0.11095608025789261, -0.021988797932863235, 0.1305028647184372, -0.09988225996494293, 0.02240533009171486, 0.21646223962306976, 0.23973323404...
121
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.ravel.html
pandas.api.extensions.ExtensionArray.ravel
ExtensionArray.ravel(order='C')[source]# Return a flattened view on this array. Notes Because ExtensionArrays are 1D-only, this is a no-op. The “order” argument is ignored, is for compatibility with NumPy.
Parameters: order{None, ‘C’, ‘F’, ‘A’, ‘K’}, default ‘C’ Returns: ExtensionArray
['>>> pd.array([1, 2, 3]).ravel()\n<IntegerArray>\n[1, 2, 3]\nLength: 3, dtype: Int64']
pandas.api.extensions.ExtensionArray.ravel ExtensionArray.ravel(order='C')[source]# Return a flattened view on this array. Notes Because ExtensionArrays are 1D-only, this is a no-op. The “order” argument is ignored, is for compatibility with NumPy.
[ 0.1727564036846161, -0.6612840294837952, -0.17097392678260803, 0.03754034265875816, -0.024247685447335243, 0.04023878648877144, -0.066596619784832, 0.2995107173919678, 0.18412691354751587, 0.2752600908279419, -0.0537189245223999, 0.4257509112358093, -0.1625419557094574, -0.0564134381711483...
122
..\pandas\reference\api\pandas.Series.div.html
pandas.Series.div
Series.div(other, level=None, fill_value=None, axis=0)[source]# Return Floating division of series and other, element-wise (binary operator truediv). Equivalent to series / other, but with support to substitute a fill_value for missing data in either one of the inputs.
Parameters: otherSeries or scalar value levelint or nameBroadcast across a level, matching Index values on the passed MultiIndex level. fill_valueNone or float value, default None (NaN)Fill existing missing (NaN) values, and any new element needed for successful Series alignment, with this value before computation. If ...
[">>> a = pd.Series([1, 1, 1, np.nan], index=['a', 'b', 'c', 'd'])\n>>> a\na 1.0\nb 1.0\nc 1.0\nd NaN\ndtype: float64\n>>> b = pd.Series([1, np.nan, 1, np.nan], index=['a', 'b', 'd', 'e'])\n>>> b\na 1.0\nb NaN\nd 1.0\ne NaN\ndtype: float64\n>>> a.divide(b, fill_value=0)\na 1.0\nb inf\nc ...
pandas.Series.div Series.div(other, level=None, fill_value=None, axis=0)[source]# Return Floating division of series and other, element-wise (binary operator truediv). Equivalent to series / other, but with support to substitute a fill_value for missing data in either one of the inputs.
[ -0.15017206966876984, -0.3762078285217285, -0.1755889505147934, -0.05736737325787544, -0.017773082479834557, 0.19842827320098877, 0.16477802395820618, 0.33655157685279846, 0.08553795516490936, 0.4207494556903839, -0.21048086881637573, 0.2913520038127899, -0.008033872582018375, 0.3748961985...
123
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.shift.html
pandas.core.groupby.SeriesGroupBy.shift
SeriesGroupBy.shift(periods=1, freq=None, axis=<no_default>, fill_value=<no_default>, suffix=None)[source]# Shift each group by periods observations. If freq is passed, the index will be increased using the periods and the freq.
Parameters: periodsint | Sequence[int], default 1Number of periods to shift. If a list of values, shift each group by each period. freqstr, optionalFrequency string. axisaxis to shift, default 0Shift direction. Deprecated since version 2.1.0: For axis=1, operate on the underlying object instead. Otherwise the axis keyw...
[">>> 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).shift(1)\na NaN\na 1.0\nb NaN\nb 3.0\ndtype: float64", '>>> data = [[1, 2, 3], [1, 5, 6], [2, 5, 8], [2, 6, 9]]\n>>> df = pd.DataFrame(data, columns...
pandas.core.groupby.SeriesGroupBy.shift SeriesGroupBy.shift(periods=1, freq=None, axis=<no_default>, fill_value=<no_default>, suffix=None)[source]# Shift each group by periods observations. If freq is passed, the index will be increased using the periods and the freq.
[ -0.10460279881954193, -0.28465351462364197, -0.13079066574573517, 0.10717473179101944, -0.27825838327407837, 0.4870396554470062, 0.32552045583724976, 0.2899130582809448, -0.05692020058631897, 0.17148283123970032, -0.031495507806539536, 0.11372943222522736, 0.06389772891998291, 0.0660782828...
124
..\pandas\reference\api\pandas.Series.to_xarray.html
pandas.Series.to_xarray
Series.to_xarray()[source]# Return an xarray object from the pandas object. Notes See the xarray docs
Returns: xarray.DataArray or xarray.DatasetData in the pandas structure converted to Dataset if the object is a DataFrame, or a DataArray if the object is a Series.
[">>> df = pd.DataFrame([('falcon', 'bird', 389.0, 2),\n... ('parrot', 'bird', 24.0, 2),\n... ('lion', 'mammal', 80.5, 4),\n... ('monkey', 'mammal', np.nan, 4)],\n... columns=['name', 'class', 'max_speed',\n... 'num_le...
pandas.Series.to_xarray Series.to_xarray()[source]# Return an xarray object from the pandas object. Notes See the xarray docs
[ -0.13649576902389526, -0.3537385165691376, -0.14886531233787537, -0.11796043813228607, 0.14577734470367432, 0.12339965999126434, 0.1764489710330963, 0.455064982175827, 0.06613877415657043, 0.22982840240001678, -0.138968825340271, 0.4498981237411499, 0.09186752140522003, 0.1722741276025772,...
125
..\pandas\reference\api\pandas.tseries.offsets.Milli.n.html
pandas.tseries.offsets.Milli.n
Milli.n#
No parameters found
[]
pandas.tseries.offsets.Milli.n Milli.n#
[ -0.24657486379146576, -0.6339623332023621, -0.24882294237613678, 0.13820599019527435, 0.19077706336975098, 0.13537845015525818, 0.4191057085990906, 0.014694965444505215, -0.23434972763061523, 0.2985643744468689, 0.16352693736553192, 0.0330185741186142, 0.07019629329442978, 0.29294964671134...
126
..\pandas\reference\api\pandas.DataFrame.shift.html
pandas.DataFrame.shift
DataFrame.shift(periods=1, freq=None, axis=0, fill_value=<no_default>, suffix=None)[source]# Shift index by desired number of periods with an optional time freq. When freq is not passed, shift the index without realigning the data. If freq is passed (in this case, the index must be date or datetime, or it will raise a ...
Parameters: periodsint or SequenceNumber of periods to shift. Can be positive or negative. If an iterable of ints, the data will be shifted once by each int. This is equivalent to shifting by one value at a time and concatenating all resulting frames. The resulting columns will have the shift suffixed to their column n...
['>>> df = pd.DataFrame({"Col1": [10, 20, 15, 30, 45],\n... "Col2": [13, 23, 18, 33, 48],\n... "Col3": [17, 27, 22, 37, 52]},\n... index=pd.date_range("2020-01-01", "2020-01-05"))\n>>> df\n Col1 Col2 Col3\n2020-01-01 10 13 17\n2020-01-02 2...
pandas.DataFrame.shift DataFrame.shift(periods=1, freq=None, axis=0, fill_value=<no_default>, suffix=None)[source]# Shift index by desired number of periods with an optional time freq. When freq is not passed, shift the index without realigning the data. If freq is passed (in this case, the index must be date or dateti...
[ 0.09139324724674225, -0.3039507269859314, -0.07621796429157257, 0.014815203845500946, -0.11633612960577011, 0.12961320579051971, 0.31589987874031067, 0.30300000309944153, -0.2506564259529114, 0.3710012435913086, 0.1543257236480713, 0.15047864615917206, 0.04666340351104736, -0.0899647101759...
127
..\pandas\reference\api\pandas.tseries.offsets.BYearBegin.normalize.html
pandas.tseries.offsets.BYearBegin.normalize
BYearBegin.normalize#
No parameters found
[]
pandas.tseries.offsets.BYearBegin.normalize BYearBegin.normalize#
[ -0.36691904067993164, -0.5024979114532471, -0.19465304911136627, -0.1500987410545349, 0.10533725470304489, 0.20283450186252594, 0.29275283217430115, 0.2229679673910141, -0.19832946360111237, 0.25073546171188354, -0.2601650655269623, 0.00721493735909462, 0.27217617630958557, 0.2877954840660...
128
..\pandas\reference\api\pandas.Interval.closed_right.html
pandas.Interval.closed_right
Interval.closed_right# Check if the interval is closed on the right side. For the meaning of closed and open see Interval.
Returns: boolTrue if the Interval is closed on the left-side.
[">>> iv = pd.Interval(0, 5, closed='both')\n>>> iv.closed_right\nTrue", ">>> iv = pd.Interval(0, 5, closed='left')\n>>> iv.closed_right\nFalse"]
pandas.Interval.closed_right Interval.closed_right# Check if the interval is closed on the right side. For the meaning of closed and open see Interval.
[ -0.30855250358581543, -0.4343400299549103, -0.2421588897705078, -0.09635386615991592, -0.19477201998233795, -0.012820098549127579, 0.40419021248817444, 0.133957639336586, -0.024528667330741882, 0.09045492112636566, -0.08068530261516571, -0.002718816976994276, 0.19170203804969788, 0.2661497...
129
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.repeat.html
pandas.api.extensions.ExtensionArray.repeat
ExtensionArray.repeat(repeats, axis=None)[source]# Repeat elements of a ExtensionArray. Returns a new ExtensionArray where each element of the current ExtensionArray is repeated consecutively a given number of times.
Parameters: repeatsint or array of intsThe number of repetitions for each element. This should be a non-negative integer. Repeating 0 times will return an empty ExtensionArray. axisNoneMust be None. Has no effect but is accepted for compatibility with numpy. Returns: ExtensionArrayNewly created ExtensionArray with repe...
[">>> cat = pd.Categorical(['a', 'b', 'c'])\n>>> cat\n['a', 'b', 'c']\nCategories (3, object): ['a', 'b', 'c']\n>>> cat.repeat(2)\n['a', 'a', 'b', 'b', 'c', 'c']\nCategories (3, object): ['a', 'b', 'c']\n>>> cat.repeat([1, 2, 3])\n['a', 'b', 'b', 'c', 'c', 'c']\nCategories (3, object): ['a', 'b', 'c']"]
pandas.api.extensions.ExtensionArray.repeat ExtensionArray.repeat(repeats, axis=None)[source]# Repeat elements of a ExtensionArray. Returns a new ExtensionArray where each element of the current ExtensionArray is repeated consecutively a given number of times.
[ 0.3095206916332245, -0.5522159337997437, -0.221730038523674, 0.005973038263618946, -0.17578016221523285, 0.1738644689321518, 0.2175275683403015, 0.12947551906108856, 0.22514942288398743, 0.3194487392902374, -0.014495760202407837, 0.3581565022468567, -0.006474199704825878, 0.039509680122137...
130
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.searchsorted.html
pandas.api.extensions.ExtensionArray.searchsorted
ExtensionArray.searchsorted(value, side='left', sorter=None)[source]# Find indices where elements should be inserted to maintain order. Find the indices into a sorted array self (a) such that, if the corresponding elements in value were inserted before the indices, the order of self would be preserved. Assuming that se...
Parameters: valuearray-like, list or scalarValue(s) to insert into self. side{‘left’, ‘right’}, optionalIf ‘left’, the index of the first suitable location found is given. If ‘right’, return the last such index. If there is no suitable index, return either 0 or N (where N is the length of self). sorter1-D array-like, ...
['>>> arr = pd.array([1, 2, 3, 5])\n>>> arr.searchsorted([4])\narray([3])']
pandas.api.extensions.ExtensionArray.searchsorted ExtensionArray.searchsorted(value, side='left', sorter=None)[source]# Find indices where elements should be inserted to maintain order. Find the indices into a sorted array self (a) such that, if the corresponding elements in value were inserted before the indices, the ...
[ 0.3606055974960327, -0.44248470664024353, -0.23392120003700256, 0.0741329938173294, -0.07031302899122238, 0.2151595503091812, 0.01694205217063427, 0.06662280857563019, 0.09002836793661118, 0.17917834222316742, -0.11795877665281296, 0.0019948030821979046, -0.008493532426655293, -0.150014743...
131
..\pandas\reference\api\pandas.Interval.html
pandas.Interval
class pandas.Interval# Immutable object implementing an Interval, a bounded slice-like interval. Notes The parameters left and right must be from the same type, you must be able to compare them and they must satisfy left <= right. A closed interval (in mathematics denoted by square brackets) contains its endpoints, i.e...
Parameters: leftorderable scalarLeft bound for the interval. rightorderable scalarRight bound for the interval. closed{‘right’, ‘left’, ‘both’, ‘neither’}, default ‘right’Whether the interval is closed on the left-side, right-side, both or neither. See the Notes for more detailed explanation.
[">>> iv = pd.Interval(left=0, right=5)\n>>> iv\nInterval(0, 5, closed='right')", ">>> 2.5 in iv\nTrue\n>>> pd.Interval(left=2, right=5, closed='both') in iv\nTrue", '>>> 0 in iv\nFalse\n>>> 5 in iv\nTrue\n>>> 0.0001 in iv\nTrue', '>>> iv.length\n5', ">>> shifted_iv = iv + 3\n>>> shifted_iv\nInterval(3, 8, closed='righ...
pandas.Interval class pandas.Interval# Immutable object implementing an Interval, a bounded slice-like interval. Notes The parameters left and right must be from the same type, you must be able to compare them and they must satisfy left <= right. A closed interval (in mathematics denoted by square brackets) contains it...
[ -0.2575226426124573, -0.2785539925098419, -0.21552293002605438, -0.07011369615793228, -0.027007250115275383, -0.05457720533013344, 0.406546413898468, 0.00033236524905078113, 0.021990269422531128, 0.21321536600589752, -0.1494397073984146, 0.20342962443828583, -0.07141002267599106, 0.2223490...
132
..\pandas\reference\api\pandas.DataFrame.size.html
pandas.DataFrame.size
property DataFrame.size[source]# Return an int representing the number of elements in this object. Return the number of rows if Series. Otherwise return the number of rows times number of columns if DataFrame.
No parameters found
[">>> s = pd.Series({'a': 1, 'b': 2, 'c': 3})\n>>> s.size\n3", ">>> df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})\n>>> df.size\n4"]
pandas.DataFrame.size property DataFrame.size[source]# Return an int representing the number of elements in this object. Return the number of rows if Series. Otherwise return the number of rows times number of columns if DataFrame.
[ -0.30005916953086853, -0.4886839687824249, -0.21990936994552612, 0.25673943758010864, 0.11575230211019516, 0.007592641748487949, 0.2551538646221161, 0.3356029987335205, 0.12194930762052536, 0.38409584760665894, 0.07605387270450592, -0.05108258128166199, 0.09563306719064713, 0.4761167168617...
133
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.size.html
pandas.core.groupby.SeriesGroupBy.size
SeriesGroupBy.size()[source]# Compute group sizes.
Returns: DataFrame or SeriesNumber of rows in each group as a Series if as_index is True or a DataFrame if as_index is False.
[">>> lst = ['a', 'a', 'b']\n>>> ser = pd.Series([1, 2, 3], index=lst)\n>>> ser\na 1\na 2\nb 3\ndtype: int64\n>>> ser.groupby(level=0).size()\na 2\nb 1\ndtype: int64", '>>> data = [[1, 2, 3], [1, 5, 6], [7, 8, 9]]\n>>> df = pd.DataFrame(data, columns=["a", "b", "c"],\n... index=["owl...
pandas.core.groupby.SeriesGroupBy.size SeriesGroupBy.size()[source]# Compute group sizes.
[ -0.41746532917022705, -0.4934453070163727, -0.21715496480464935, 0.3184618055820465, -0.010911107063293457, 0.33745694160461426, 0.3426853120326996, 0.14890246093273163, 0.15107238292694092, 0.20965933799743652, -0.21539835631847382, -0.13633790612220764, 0.17092490196228027, 0.10750729590...
134
..\pandas\reference\api\pandas.Series.transform.html
pandas.Series.transform
Series.transform(func, axis=0, *args, **kwargs)[source]# Call func on self producing a Series with the same axis shape as self. Notes Functions that mutate the passed object can produce unexpected behavior or errors and are not supported. See Mutating with User Defined Function (UDF) methods for more details.
Parameters: funcfunction, str, list-like or dict-likeFunction to use for transforming the data. If a function, must either work when passed a Series or when passed to Series.apply. If func is both list-like and dict-like, dict-like behavior takes precedence. Accepted combinations are: function string function name list...
[">>> df = pd.DataFrame({'A': range(3), 'B': range(1, 4)})\n>>> df\n A B\n0 0 1\n1 1 2\n2 2 3\n>>> df.transform(lambda x: x + 1)\n A B\n0 1 2\n1 2 3\n2 3 4", '>>> s = pd.Series(range(3))\n>>> s\n0 0\n1 1\n2 2\ndtype: int64\n>>> s.transform([np.sqrt, np.exp])\n sqrt exp\n0 0.0000...
pandas.Series.transform Series.transform(func, axis=0, *args, **kwargs)[source]# Call func on self producing a Series with the same axis shape as self. Notes Functions that mutate the passed object can produce unexpected behavior or errors and are not supported. See Mutating with User Defined Function (UDF) methods for...
[ -0.06331991404294968, -0.33034658432006836, -0.07441744208335876, 0.08409781008958817, 0.234178364276886, 0.015944985672831535, 0.30396944284439087, 0.1911129206418991, 0.021855391561985016, 0.3899894654750824, -0.10187377780675888, 0.603486955165863, -0.027680575847625732, 0.2094389051198...
135
..\pandas\reference\api\pandas.tseries.offsets.Milli.name.html
pandas.tseries.offsets.Milli.name
Milli.name# Return a string representing the base frequency.
No parameters found
[">>> pd.offsets.Hour().name\n'h'", ">>> pd.offsets.Hour(5).name\n'h'"]
pandas.tseries.offsets.Milli.name Milli.name# Return a string representing the base frequency.
[ -0.09888293594121933, -0.5573633313179016, -0.17199811339378357, 0.023492638021707535, 0.21484880149364471, 0.07762929797172546, 0.34336423873901367, 0.1939316987991333, -0.4137935936450958, 0.3443600535392761, -0.057328566908836365, 0.1984744817018509, 0.047155510634183884, 0.262714892625...
136
..\pandas\reference\api\pandas.Series.dot.html
pandas.Series.dot
Series.dot(other)[source]# Compute the dot product between the Series and the columns of other. This method computes the dot product between the Series and another one, or the Series and each columns of a DataFrame, or the Series and each columns of an array. It can also be called using self @ other. Notes The Series a...
Parameters: otherSeries, DataFrame or array-likeThe other object to compute the dot product with its columns. Returns: scalar, Series or numpy.ndarrayReturn the dot product of the Series and other if other is a Series, the Series of the dot product of Series and each rows of other if other is a DataFrame or a numpy.nda...
['>>> s = pd.Series([0, 1, 2, 3])\n>>> other = pd.Series([-1, 2, -3, 4])\n>>> s.dot(other)\n8\n>>> s @ other\n8\n>>> df = pd.DataFrame([[0, 1], [-2, 3], [4, -5], [6, 7]])\n>>> s.dot(df)\n0 24\n1 14\ndtype: int64\n>>> arr = np.array([[0, 1], [-2, 3], [4, -5], [6, 7]])\n>>> s.dot(arr)\narray([24, 14])']
pandas.Series.dot Series.dot(other)[source]# Compute the dot product between the Series and the columns of other. This method computes the dot product between the Series and another one, or the Series and each columns of a DataFrame, or the Series and each columns of an array. It can also be called using self @ other. ...
[ 0.07246768474578857, -0.5667707324028015, -0.16294117271900177, 0.06487078964710236, -0.06532402336597443, 0.25229203701019287, 0.3725798726081848, 0.07148990035057068, 0.12187063694000244, 0.23753732442855835, -0.14017030596733093, 0.1285816878080368, 0.3269316554069519, 0.116175949573516...
137
..\pandas\reference\api\pandas.tseries.offsets.BYearBegin.rule_code.html
pandas.tseries.offsets.BYearBegin.rule_code
BYearBegin.rule_code#
No parameters found
[]
pandas.tseries.offsets.BYearBegin.rule_code BYearBegin.rule_code#
[ -0.16315008699893951, -0.47866734862327576, -0.2102118879556656, -0.04823298379778862, 0.20103822648525238, 0.2781809866428375, 0.4139321744441986, 0.2570599913597107, -0.07973790913820267, 0.07662700861692429, 0.051000356674194336, 0.020139425992965698, -0.008946144953370094, 0.3224308788...
138
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.shape.html
pandas.api.extensions.ExtensionArray.shape
property ExtensionArray.shape[source]# Return a tuple of the array dimensions.
No parameters found
['>>> arr = pd.array([1, 2, 3])\n>>> arr.shape\n(3,)']
pandas.api.extensions.ExtensionArray.shape property ExtensionArray.shape[source]# Return a tuple of the array dimensions.
[ 0.05385350063443184, -0.4164262115955353, -0.282853364944458, 0.28771400451660156, 0.08806071430444717, -0.07799400389194489, 0.30145925283432007, 0.22360634803771973, 0.1452294886112213, 0.3820824921131134, -0.00041003699880093336, 0.10697529464960098, -0.1284981220960617, 0.2952866554260...
139
..\pandas\reference\api\pandas.Interval.is_empty.html
pandas.Interval.is_empty
Interval.is_empty# Indicates if an interval is empty, meaning it contains no points.
Returns: bool or ndarrayA boolean indicating if a scalar Interval is empty, or a boolean ndarray positionally indicating if an Interval in an IntervalArray or IntervalIndex is empty.
[">>> pd.Interval(0, 1, closed='right').is_empty\nFalse", ">>> pd.Interval(0, 0, closed='right').is_empty\nTrue\n>>> pd.Interval(0, 0, closed='left').is_empty\nTrue\n>>> pd.Interval(0, 0, closed='neither').is_empty\nTrue", ">>> pd.Interval(0, 0, closed='both').is_empty\nFalse", ">>> ivs = [pd.Interval(0, 0, closed='nei...
pandas.Interval.is_empty Interval.is_empty# Indicates if an interval is empty, meaning it contains no points.
[ -0.14360538125038147, -0.48438534140586853, -0.24453122913837433, 0.08464175462722778, -0.049273233860731125, 0.05931675806641579, 0.37858396768569946, 0.22931703925132751, 0.10808142274618149, 0.29556411504745483, 0.1245318204164505, 0.11567100137472153, 0.1054471954703331, 0.189578458666...
140
..\pandas\reference\api\pandas.tseries.offsets.BYearEnd.copy.html
pandas.tseries.offsets.BYearEnd.copy
BYearEnd.copy()# Return a copy of the frequency.
No parameters found
['>>> freq = pd.DateOffset(1)\n>>> freq_copy = freq.copy()\n>>> freq is freq_copy\nFalse']
pandas.tseries.offsets.BYearEnd.copy BYearEnd.copy()# Return a copy of the frequency.
[ -0.27315056324005127, -0.5317082405090332, -0.04678535833954811, -0.13135068118572235, -0.03977019712328911, 0.011627841740846634, 0.1823517084121704, 0.19376440346240997, -0.4018439054489136, 0.3086545467376709, -0.26404085755348206, 0.06378545612096786, 0.1657409369945526, 0.102453112602...
141
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.skew.html
pandas.core.groupby.SeriesGroupBy.skew
SeriesGroupBy.skew(axis=<no_default>, skipna=True, numeric_only=False, **kwargs)[source]# Return unbiased skew within groups. Normalized by N-1.
Parameters: axis{0 or ‘index’, 1 or ‘columns’, None}, default 0Axis for the function to be applied on. This parameter is only for compatibility with DataFrame and is unused. Deprecated since version 2.1.0: For axis=1, operate on the underlying object instead. Otherwise the axis keyword is not necessary. skipnabool, def...
['>>> ser = pd.Series([390., 350., 357., np.nan, 22., 20., 30.],\n... index=[\'Falcon\', \'Falcon\', \'Falcon\', \'Falcon\',\n... \'Parrot\', \'Parrot\', \'Parrot\'],\n... name="Max Speed")\n>>> ser\nFalcon 390.0\nFalcon 350.0\nFalcon 357.0\nFalcon Na...
pandas.core.groupby.SeriesGroupBy.skew SeriesGroupBy.skew(axis=<no_default>, skipna=True, numeric_only=False, **kwargs)[source]# Return unbiased skew within groups. Normalized by N-1.
[ -0.2731993496417999, -0.5263190865516663, -0.12496551871299744, -0.12534138560295105, -0.18280698359012604, 0.2584649622440338, 0.466616153717041, 0.17992296814918518, 0.16979289054870605, 0.2241654247045517, -0.37886276841163635, 0.39018410444259644, 0.1220102608203888, 0.135701984167099,...
142
..\pandas\reference\api\pandas.Series.truediv.html
pandas.Series.truediv
Series.truediv(other, level=None, fill_value=None, axis=0)[source]# Return Floating division of series and other, element-wise (binary operator truediv). Equivalent to series / other, but with support to substitute a fill_value for missing data in either one of the inputs.
Parameters: otherSeries or scalar value levelint or nameBroadcast across a level, matching Index values on the passed MultiIndex level. fill_valueNone or float value, default None (NaN)Fill existing missing (NaN) values, and any new element needed for successful Series alignment, with this value before computation. If ...
[">>> a = pd.Series([1, 1, 1, np.nan], index=['a', 'b', 'c', 'd'])\n>>> a\na 1.0\nb 1.0\nc 1.0\nd NaN\ndtype: float64\n>>> b = pd.Series([1, np.nan, 1, np.nan], index=['a', 'b', 'd', 'e'])\n>>> b\na 1.0\nb NaN\nd 1.0\ne NaN\ndtype: float64\n>>> a.divide(b, fill_value=0)\na 1.0\nb inf\nc ...
pandas.Series.truediv Series.truediv(other, level=None, fill_value=None, axis=0)[source]# Return Floating division of series and other, element-wise (binary operator truediv). Equivalent to series / other, but with support to substitute a fill_value for missing data in either one of the inputs.
[ -0.17121616005897522, -0.2988775670528412, -0.15846368670463562, -0.08275730162858963, 0.017110886052250862, 0.22198686003684998, 0.13029545545578003, 0.31587663292884827, -0.10580931603908539, 0.45708221197128296, -0.2823893427848816, 0.2646768093109131, 0.041253555566072464, 0.3108126521...
143
..\pandas\reference\api\pandas.DataFrame.skew.html
pandas.DataFrame.skew
DataFrame.skew(axis=0, skipna=True, numeric_only=False, **kwargs)[source]# Return unbiased skew over requested axis. Normalized by N-1.
Parameters: axis{index (0), columns (1)}Axis for the function to be applied on. For Series this parameter is unused and defaults to 0. For DataFrames, specifying axis=None will apply the aggregation across both axes. Added in version 2.0.0. skipnabool, default TrueExclude NA/null values when computing the result. numer...
['>>> s = pd.Series([1, 2, 3])\n>>> s.skew()\n0.0', ">>> df = pd.DataFrame({'a': [1, 2, 3], 'b': [2, 3, 4], 'c': [1, 3, 5]},\n... index=['tiger', 'zebra', 'cow'])\n>>> df\n a b c\ntiger 1 2 1\nzebra 2 3 3\ncow 3 4 5\n>>> df.skew()\na 0.0\nb 0.0\nc 0.0\ndtype: float...
pandas.DataFrame.skew DataFrame.skew(axis=0, skipna=True, numeric_only=False, **kwargs)[source]# Return unbiased skew over requested axis. Normalized by N-1.
[ -0.1926727443933487, -0.5604981780052185, -0.12794138491153717, -0.30550524592399597, -0.060479868203401566, 0.09497047960758209, 0.4344479739665985, 0.23326259851455688, 0.16718459129333496, 0.2930201292037964, -0.18955841660499573, 0.6091771721839905, 0.09072462469339371, 0.2435181140899...
144
..\pandas\reference\api\pandas.tseries.offsets.Milli.nanos.html
pandas.tseries.offsets.Milli.nanos
Milli.nanos# Return an integer of the total number of nanoseconds.
Raises: ValueErrorIf the frequency is non-fixed.
['>>> pd.offsets.Hour(5).nanos\n18000000000000']
pandas.tseries.offsets.Milli.nanos Milli.nanos# Return an integer of the total number of nanoseconds.
[ -0.3278772234916687, -0.46159446239471436, -0.267269104719162, -0.05377780646085739, 0.0715222880244255, -0.07775838673114777, 0.21145232021808624, 0.12199436873197556, -0.07270186394453049, 0.3186973035335541, 0.3104304075241089, 0.018947448581457138, -0.07772348076105118, 0.3370790481567...
145
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.shift.html
pandas.api.extensions.ExtensionArray.shift
ExtensionArray.shift(periods=1, fill_value=None)[source]# Shift values by desired number. Newly introduced missing values are filled with self.dtype.na_value. Notes If self is empty or periods is 0, a copy of self is returned. If periods > len(self), then an array of size len(self) is returned, with all values filled w...
Parameters: periodsint, default 1The number of periods to shift. Negative values are allowed for shifting backwards. fill_valueobject, optionalThe scalar value to use for newly introduced missing values. The default is self.dtype.na_value. Returns: ExtensionArrayShifted.
['>>> arr = pd.array([1, 2, 3])\n>>> arr.shift(2)\n<IntegerArray>\n[<NA>, <NA>, 1]\nLength: 3, dtype: Int64']
pandas.api.extensions.ExtensionArray.shift ExtensionArray.shift(periods=1, fill_value=None)[source]# Shift values by desired number. Newly introduced missing values are filled with self.dtype.na_value. Notes If self is empty or periods is 0, a copy of self is returned. If periods > len(self), then an array of size len(...
[ 0.3229561746120453, -0.3399851620197296, -0.10863912105560303, -0.02641446143388748, -0.21846625208854675, -0.033175282180309296, 0.21361614763736725, 0.1939985156059265, -0.24098753929138184, 0.37733468413352966, 0.11822732537984848, 0.13207922875881195, -0.028235627338290215, 0.075383499...
146
..\pandas\reference\api\pandas.Series.drop.html
pandas.Series.drop
Series.drop(labels=None, *, axis=0, index=None, columns=None, level=None, inplace=False, errors='raise')[source]# Return Series with specified index labels removed. Remove elements of a Series based on specifying the index labels. When using a multi-index, labels on different levels can be removed by specifying the lev...
Parameters: labelssingle label or list-likeIndex labels to drop. axis{0 or ‘index’}Unused. Parameter needed for compatibility with DataFrame. indexsingle label or list-likeRedundant for application on Series, but ‘index’ can be used instead of ‘labels’. columnssingle label or list-likeNo change is made to the Series; u...
[">>> s = pd.Series(data=np.arange(3), index=['A', 'B', 'C'])\n>>> s\nA 0\nB 1\nC 2\ndtype: int64", ">>> s.drop(labels=['B', 'C'])\nA 0\ndtype: int64", ">>> midx = pd.MultiIndex(levels=[['llama', 'cow', 'falcon'],\n... ['speed', 'weight', 'length']],\n... codes=[[0,...
pandas.Series.drop Series.drop(labels=None, *, axis=0, index=None, columns=None, level=None, inplace=False, errors='raise')[source]# Return Series with specified index labels removed. Remove elements of a Series based on specifying the index labels. When using a multi-index, labels on different levels can be removed by...
[ 0.11668487638235092, -0.2622471749782562, -0.27943190932273865, 0.3045896887779236, -0.10079589486122131, 0.28442129492759705, 0.277755469083786, 0.32687240839004517, 0.25709956884384155, 0.44296884536743164, -0.4835623502731323, 0.5194880962371826, -0.02734667994081974, 0.2522194981575012...
147
..\pandas\reference\api\pandas.Interval.left.html
pandas.Interval.left
Interval.left# Left bound for the interval.
No parameters found
[">>> interval = pd.Interval(left=1, right=2, closed='left')\n>>> interval\nInterval(1, 2, closed='left')\n>>> interval.left\n1"]
pandas.Interval.left Interval.left# Left bound for the interval.
[ -0.29690831899642944, -0.3333948850631714, -0.3164141774177551, -0.30919551849365234, -0.016940893605351448, 0.07811916619539261, 0.23444463312625885, 0.021294619888067245, 0.009456541389226913, 0.3157154321670532, 0.015923168510198593, -0.12534238398075104, 0.0654841959476471, 0.321629583...
148
..\pandas\reference\api\pandas.tseries.offsets.BYearEnd.freqstr.html
pandas.tseries.offsets.BYearEnd.freqstr
BYearEnd.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.BYearEnd.freqstr BYearEnd.freqstr# Return a string representing the frequency.
[ -0.27160391211509705, -0.6188420057296753, -0.1589464247226715, -0.06101140007376671, 0.08721049129962921, 0.02012694627046585, 0.18869173526763916, 0.1346854865550995, -0.2561400830745697, 0.30680128931999207, -0.18191643059253693, -0.02769426442682743, 0.05892879515886307, 0.162282362580...
149
..\pandas\reference\api\pandas.Series.truncate.html
pandas.Series.truncate
Series.truncate(before=None, after=None, axis=None, copy=None)[source]# Truncate a Series or DataFrame before and after some index value. This is a useful shorthand for boolean indexing based on index values above or below certain thresholds. Notes If the index being truncated contains only datetime values, before and ...
Parameters: beforedate, str, intTruncate all rows before this index value. afterdate, str, intTruncate all rows after this index value. axis{0 or ‘index’, 1 or ‘columns’}, optionalAxis to truncate. Truncates the index (rows) by default. For Series this parameter is unused and defaults to 0. copybool, default is True,Re...
[">>> df = pd.DataFrame({'A': ['a', 'b', 'c', 'd', 'e'],\n... 'B': ['f', 'g', 'h', 'i', 'j'],\n... 'C': ['k', 'l', 'm', 'n', 'o']},\n... index=[1, 2, 3, 4, 5])\n>>> df\n A B C\n1 a f k\n2 b g l\n3 c h m\n4 d i n\n5 e j o", '>>> df.truncate(befor...
pandas.Series.truncate Series.truncate(before=None, after=None, axis=None, copy=None)[source]# Truncate a Series or DataFrame before and after some index value. This is a useful shorthand for boolean indexing based on index values above or below certain thresholds. Notes If the index being truncated contains only datet...
[ -0.08132304251194, -0.37858954071998596, -0.16103844344615936, -0.322206050157547, -0.03871779888868332, 0.15770471096038818, 0.007827544584870338, 0.5931321978569031, -0.13636428117752075, 0.403917133808136, -0.054683707654476166, 0.07715500891208649, 0.19564186036586761, 0.18875543773174...
150
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.std.html
pandas.core.groupby.SeriesGroupBy.std
SeriesGroupBy.std(ddof=1, engine=None, engine_kwargs=None, numeric_only=False)[source]# Compute standard deviation of groups, excluding missing values. For multiple groupings, the result index will be a MultiIndex.
Parameters: ddofint, default 1Degrees of freedom. enginestr, default None 'cython' : Runs the operation through C-extensions from cython. 'numba' : Runs the operation through JIT compiled code from numba. None : Defaults to 'cython' or globally setting compute.use_numba Added in version 1.4.0. engine_kwargsdict, defaul...
[">>> lst = ['a', 'a', 'a', 'b', 'b', 'b']\n>>> ser = pd.Series([7, 2, 8, 4, 3, 3], index=lst)\n>>> ser\na 7\na 2\na 8\nb 4\nb 3\nb 3\ndtype: int64\n>>> ser.groupby(level=0).std()\na 3.21455\nb 0.57735\ndtype: float64", ">>> data = {'a': [1, 3, 5, 7, 7, 8, 3], 'b': [1, 4, 8, 4, 4, 2, 1]}\n...
pandas.core.groupby.SeriesGroupBy.std SeriesGroupBy.std(ddof=1, engine=None, engine_kwargs=None, numeric_only=False)[source]# Compute standard deviation of groups, excluding missing values. For multiple groupings, the result index will be a MultiIndex.
[ -0.2753511071205139, -0.5638378858566284, -0.11966129392385483, 0.19262494146823883, -0.08054393529891968, 0.4436403214931488, 0.24459810554981232, 0.09902751445770264, 0.1831982135772705, 0.40071675181388855, -0.13563887774944305, 0.1540374904870987, 0.06716576963663101, 0.034730140119791...
151
..\pandas\reference\api\pandas.Series.droplevel.html
pandas.Series.droplevel
Series.droplevel(level, axis=0)[source]# Return Series/DataFrame with requested index / column level(s) removed.
Parameters: levelint, str, or list-likeIf a string is given, must be the name of a level If list-like, elements must be names or positional indexes of levels. axis{0 or ‘index’, 1 or ‘columns’}, default 0Axis along which the level(s) is removed: 0 or ‘index’: remove level(s) in column. 1 or ‘columns’: remove level(s) i...
[">>> df = pd.DataFrame([\n... [1, 2, 3, 4],\n... [5, 6, 7, 8],\n... [9, 10, 11, 12]\n... ]).set_index([0, 1]).rename_axis(['a', 'b'])", ">>> df.columns = pd.MultiIndex.from_tuples([\n... ('c', 'e'), ('d', 'f')\n... ], names=['level_1', 'level_2'])", '>>> df\nlevel_1 c d\nlevel_2 e f\na b\n1 2 ...
pandas.Series.droplevel Series.droplevel(level, axis=0)[source]# Return Series/DataFrame with requested index / column level(s) removed.
[ -0.042202312499284744, -0.21419505774974823, -0.20894430577754974, 0.0757814273238182, 0.10572870820760727, 0.2944900095462799, 0.1874311864376068, 0.45448508858680725, 0.10507315397262573, 0.32978907227516174, -0.3436300456523895, 0.5330937504768372, -0.022745151072740555, 0.3717170059680...
152
..\pandas\reference\api\pandas.Interval.length.html
pandas.Interval.length
Interval.length# Return the length of the Interval.
No parameters found
[">>> interval = pd.Interval(left=1, right=2, closed='left')\n>>> interval\nInterval(1, 2, closed='left')\n>>> interval.length\n1"]
pandas.Interval.length Interval.length# Return the length of the Interval.
[ -0.343730628490448, -0.18981343507766724, -0.32853806018829346, 0.023108676075935364, -0.06105121970176697, -0.05978843569755554, 0.3860703706741333, 0.18452265858650208, 0.04454987123608589, 0.44008317589759827, 0.24229741096496582, 0.10534033179283142, 0.15857018530368805, 0.309218764305...
153
..\pandas\reference\api\pandas.DataFrame.sort_index.html
pandas.DataFrame.sort_index
DataFrame.sort_index(*, axis=0, level=None, ascending=True, inplace=False, kind='quicksort', na_position='last', sort_remaining=True, ignore_index=False, key=None)[source]# Sort object by labels (along an axis). Returns a new DataFrame sorted by label if inplace argument is False, otherwise updates the original DataFra...
Parameters: axis{0 or ‘index’, 1 or ‘columns’}, default 0The axis along which to sort. The value 0 identifies the rows, and 1 identifies the columns. levelint or level name or list of ints or list of level namesIf not None, sort on values in specified index level(s). ascendingbool or list-like of bools, default TrueSo...
[">>> df = pd.DataFrame([1, 2, 3, 4, 5], index=[100, 29, 234, 1, 150],\n... columns=['A'])\n>>> df.sort_index()\n A\n1 4\n29 2\n100 1\n150 5\n234 3", '>>> df.sort_index(ascending=False)\n A\n234 3\n150 5\n100 1\n29 2\n1 4', '>>> df = pd.DataFrame({"a": [1, 2, 3, 4]}, index=[\'A...
pandas.DataFrame.sort_index DataFrame.sort_index(*, axis=0, level=None, ascending=True, inplace=False, kind='quicksort', na_position='last', sort_remaining=True, ignore_index=False, key=None)[source]# Sort object by labels (along an axis). Returns a new DataFrame sorted by label if inplace argument is False, otherwise ...
[ 0.14203481376171112, -0.38362056016921997, -0.145806223154068, 0.015533649362623692, 0.0486832819879055, 0.22166971862316132, -0.005101902410387993, 0.36471715569496155, 0.013424278236925602, 0.32671284675598145, -0.37030038237571716, 0.4768065810203552, 0.03132141754031181, 0.173298984766...
154
..\pandas\reference\api\pandas.tseries.offsets.Milli.normalize.html
pandas.tseries.offsets.Milli.normalize
Milli.normalize#
No parameters found
[]
pandas.tseries.offsets.Milli.normalize Milli.normalize#
[ -0.43324166536331177, -0.49239087104797363, -0.19848786294460297, -0.1462753266096115, 0.17200176417827606, 0.14111362397670746, 0.29866349697113037, 0.14436501264572144, -0.39001932740211487, 0.41710108518600464, 0.0036843488924205303, 0.2311510443687439, 0.14679361879825592, 0.3215874135...
155
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.take.html
pandas.api.extensions.ExtensionArray.take
ExtensionArray.take(indices, *, allow_fill=False, fill_value=None)[source]# Take elements from an array. Notes ExtensionArray.take is called by Series.__getitem__, .loc, iloc, when indices is a sequence of values. Additionally, it’s called by Series.reindex(), or any other method that causes realignment, with a fill_va...
Parameters: indicessequence of int or one-dimensional np.ndarray of intIndices to be taken. allow_fillbool, default FalseHow to handle negative values in indices. False: negative values in indices indicate positional indices from the right (the default). This is similar to numpy.take(). True: negative values in indices...
[]
pandas.api.extensions.ExtensionArray.take ExtensionArray.take(indices, *, allow_fill=False, fill_value=None)[source]# Take elements from an array. Notes ExtensionArray.take is called by Series.__getitem__, .loc, iloc, when indices is a sequence of values. Additionally, it’s called by Series.reindex(), or any other meth...
[ 0.2164316028356552, -0.2380671203136444, -0.18043914437294006, 0.18849113583564758, -0.10211532562971115, 0.2501458525657654, 0.06954291462898254, 0.2302442342042923, 0.1228451281785965, 0.4113142788410187, -0.04297318682074547, 0.2776901125907898, 0.25148656964302063, -0.04975960403680801...
156
..\pandas\reference\api\pandas.tseries.offsets.BYearEnd.html
pandas.tseries.offsets.BYearEnd
class pandas.tseries.offsets.BYearEnd# DateOffset increments between the last 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 offset....
Parameters: nint, default 1The number of years represented. normalizebool, default FalseNormalize start/end dates to midnight before generating date range. monthint, default 12A specific integer for the month of the year.
[">>> from pandas.tseries.offsets import BYearEnd\n>>> ts = pd.Timestamp('2020-05-24 05:01:15')\n>>> ts - BYearEnd()\nTimestamp('2019-12-31 05:01:15')\n>>> ts + BYearEnd()\nTimestamp('2020-12-31 05:01:15')\n>>> ts + BYearEnd(3)\nTimestamp('2022-12-30 05:01:15')\n>>> ts + BYearEnd(-3)\nTimestamp('2017-12-29 05:01:15')\n...
pandas.tseries.offsets.BYearEnd class pandas.tseries.offsets.BYearEnd# DateOffset increments between the last 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 ...
[ -0.1264047920703888, -0.36263135075569153, -0.0781620591878891, -0.172337144613266, 0.0616283044219017, 0.14220616221427917, 0.3206077814102173, 0.12360230088233948, -0.4123058319091797, 0.23127321898937225, 0.09247557073831558, 0.1387847512960434, 0.08444720506668091, 0.24324795603752136,...
157
..\pandas\reference\api\pandas.Series.tz_convert.html
pandas.Series.tz_convert
Series.tz_convert(tz, axis=0, level=None, copy=None)[source]# Convert tz-aware axis to target time zone.
Parameters: tzstr or tzinfo object or NoneTarget time zone. Passing None will convert to UTC and remove the timezone information. axis{0 or ‘index’, 1 or ‘columns’}, default 0The axis to convert levelint, str, default NoneIf axis is a MultiIndex, convert a specific level. Otherwise must be None. copybool, default TrueA...
[">>> s = pd.Series(\n... [1],\n... index=pd.DatetimeIndex(['2018-09-15 01:30:00+02:00']),\n... )\n>>> s.tz_convert('Asia/Shanghai')\n2018-09-15 07:30:00+08:00 1\ndtype: int64", ">>> s = pd.Series([1],\n... index=pd.DatetimeIndex(['2018-09-15 01:30:00+02:00']))\n>>> s.tz_convert(None)\n2018-09-...
pandas.Series.tz_convert Series.tz_convert(tz, axis=0, level=None, copy=None)[source]# Convert tz-aware axis to target time zone.
[ -0.1428154855966568, -0.39195680618286133, -0.032672278583049774, -0.16434183716773987, 0.14744117856025696, 0.17694105207920074, 0.2971392273902893, 0.4520396292209625, -0.1051197350025177, 0.1779468059539795, -0.16656780242919922, 0.4191550612449646, -0.19917936623096466, 0.2357054203748...
158
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.tolist.html
pandas.api.extensions.ExtensionArray.tolist
ExtensionArray.tolist()[source]# Return a list of the values. These are each a scalar type, which is a Python scalar (for str, int, float) or a pandas scalar (for Timestamp/Timedelta/Interval/Period)
Returns: list
['>>> arr = pd.array([1, 2, 3])\n>>> arr.tolist()\n[1, 2, 3]']
pandas.api.extensions.ExtensionArray.tolist ExtensionArray.tolist()[source]# Return a list of the values. These are each a scalar type, which is a Python scalar (for str, int, float) or a pandas scalar (for Timestamp/Timedelta/Interval/Period)
[ 0.16094091534614563, -0.5307646989822388, -0.2736099064350128, 0.23848672211170197, 0.2056189328432083, 0.2416260838508606, 0.12407691031694412, 0.29708626866340637, 0.0733470469713211, 0.2658182680606842, -0.1773672252893448, 0.3514977991580963, 0.04662514850497246, -0.008372237905859947,...
159
..\pandas\reference\api\pandas.Interval.mid.html
pandas.Interval.mid
Interval.mid# Return the midpoint of the Interval.
No parameters found
['>>> iv = pd.Interval(0, 5)\n>>> iv.mid\n2.5']
pandas.Interval.mid Interval.mid# Return the midpoint of the Interval.
[ -0.26295655965805054, -0.5301946401596069, -0.2968440353870392, -0.35782766342163086, -0.036354660987854004, 0.08696934580802917, 0.08047957718372345, 0.2600100040435791, -0.07067625224590302, 0.25708895921707153, -0.10460377484560013, 0.06296136975288391, 0.22443102300167084, 0.1257706433...
160
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.sum.html
pandas.core.groupby.SeriesGroupBy.sum
SeriesGroupBy.sum(numeric_only=False, min_count=0, engine=None, engine_kwargs=None)[source]# Compute sum 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. enginestr, def...
[">>> 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).sum()\na 3\nb 7\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.sum SeriesGroupBy.sum(numeric_only=False, min_count=0, engine=None, engine_kwargs=None)[source]# Compute sum of group values.
[ -0.3757306635379791, -0.14530475437641144, -0.14378593862056732, 0.2810099422931671, -0.054193880409002304, 0.43419817090034485, 0.2061290293931961, 0.22425240278244019, -0.11441082507371902, 0.24496985971927643, -0.2848781645298004, 0.35024699568748474, 0.16528746485710144, 0.158021986484...
161
..\pandas\reference\api\pandas.DataFrame.sort_values.html
pandas.DataFrame.sort_values
DataFrame.sort_values(by, *, axis=0, ascending=True, inplace=False, kind='quicksort', na_position='last', ignore_index=False, key=None)[source]# Sort by the values along either axis.
Parameters: bystr or list of strName or list of names to sort by. if axis is 0 or ‘index’ then by may contain index levels and/or column labels. if axis is 1 or ‘columns’ then by may contain column levels and/or index labels. axis“{0 or ‘index’, 1 or ‘columns’}”, default 0Axis to be sorted. ascendingbool or list of boo...
[">>> df = pd.DataFrame({\n... 'col1': ['A', 'A', 'B', np.nan, 'D', 'C'],\n... 'col2': [2, 1, 9, 8, 7, 4],\n... 'col3': [0, 1, 9, 4, 2, 3],\n... 'col4': ['a', 'B', 'c', 'D', 'e', 'F']\n... })\n>>> df\n col1 col2 col3 col4\n0 A 2 0 a\n1 A 1 1 B\n2 B 9 9 c\n3 ...
pandas.DataFrame.sort_values DataFrame.sort_values(by, *, axis=0, ascending=True, inplace=False, kind='quicksort', na_position='last', ignore_index=False, key=None)[source]# Sort by the values along either axis.
[ -0.026808101683855057, -0.44340699911117554, -0.2573851943016052, 0.07747708261013031, 0.14870207011699677, 0.24166257679462433, -0.08336944133043289, 0.27818766236305237, -0.22998137772083282, 0.35037922859191895, -0.32856640219688416, 0.40275833010673523, 0.12376701831817627, 0.185687407...
162
..\pandas\reference\api\pandas.Series.dropna.html
pandas.Series.dropna
Series.dropna(*, axis=0, inplace=False, how=None, ignore_index=False)[source]# Return a new Series with missing values removed. See the User Guide for more on which values are considered missing, and how to work with missing data.
Parameters: axis{0 or ‘index’}Unused. Parameter needed for compatibility with DataFrame. inplacebool, default FalseIf True, do operation inplace and return None. howstr, optionalNot in use. Kept for compatibility. ignore_indexbool, default FalseIf True, the resulting axis will be labeled 0, 1, …, n - 1. Added in versio...
['>>> ser = pd.Series([1., 2., np.nan])\n>>> ser\n0 1.0\n1 2.0\n2 NaN\ndtype: float64', '>>> ser.dropna()\n0 1.0\n1 2.0\ndtype: float64', ">>> ser = pd.Series([np.nan, 2, pd.NaT, '', None, 'I stay'])\n>>> ser\n0 NaN\n1 2\n2 NaT\n3\n4 None\n5 I stay\ndtype: object\n>>> ser.drop...
pandas.Series.dropna Series.dropna(*, axis=0, inplace=False, how=None, ignore_index=False)[source]# Return a new Series with missing values removed. See the User Guide for more on which values are considered missing, and how to work with missing data.
[ -0.014439808204770088, -0.03438941389322281, -0.21778017282485962, 0.06530386954545975, -0.14469431340694427, 0.20571410655975342, -0.06021745875477791, 0.4084254801273346, -0.06938230246305466, 0.3509547710418701, -0.18751494586467743, 0.3705727756023407, 0.0758197009563446, 0.18037137389...
163
..\pandas\reference\api\pandas.tseries.offsets.Milli.rule_code.html
pandas.tseries.offsets.Milli.rule_code
Milli.rule_code#
No parameters found
[]
pandas.tseries.offsets.Milli.rule_code Milli.rule_code#
[ -0.22816714644432068, -0.5051817297935486, -0.23564079403877258, -0.00894332304596901, 0.2504875957965851, 0.25833097100257874, 0.4242689311504364, 0.16842058300971985, -0.2729252278804779, 0.1647600680589676, 0.2345067411661148, 0.2288777381181717, -0.09826845675706863, 0.3799804747104645...
164
..\pandas\reference\api\pandas.tseries.offsets.BYearEnd.is_anchored.html
pandas.tseries.offsets.BYearEnd.is_anchored
BYearEnd.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.BYearEnd.is_anchored BYearEnd.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.22743703424930573, -0.7832807302474976, -0.12075282633304596, -0.1536044329404831, -0.05478299409151077, -0.14217418432235718, 0.3996810019016266, 0.23756062984466553, -0.22441713511943817, 0.22868014872074127, -0.13458111882209778, -0.11996535956859589, -0.013095511123538017, 0.1059545...
165
..\pandas\reference\api\pandas.Series.tz_localize.html
pandas.Series.tz_localize
Series.tz_localize(tz, axis=0, level=None, copy=None, ambiguous='raise', nonexistent='raise')[source]# Localize tz-naive index of a Series or DataFrame to target time zone. This operation localizes the Index. To localize the values in a timezone-naive Series, use Series.dt.tz_localize().
Parameters: tzstr or tzinfo or NoneTime zone to localize. Passing None will remove the time zone information and preserve local time. axis{0 or ‘index’, 1 or ‘columns’}, default 0The axis to localize levelint, str, default NoneIf axis ia a MultiIndex, localize a specific level. Otherwise must be None. copybool, default...
[">>> s = pd.Series(\n... [1],\n... index=pd.DatetimeIndex(['2018-09-15 01:30:00']),\n... )\n>>> s.tz_localize('CET')\n2018-09-15 01:30:00+02:00 1\ndtype: int64", ">>> s = pd.Series([1],\n... index=pd.DatetimeIndex(['2018-09-15 01:30:00+02:00']))\n>>> s.tz_localize(None)\n2018-09-15 01:30:00 ...
pandas.Series.tz_localize Series.tz_localize(tz, axis=0, level=None, copy=None, ambiguous='raise', nonexistent='raise')[source]# Localize tz-naive index of a Series or DataFrame to target time zone. This operation localizes the Index. To localize the values in a timezone-naive Series, use Series.dt.tz_localize().
[ -0.1996893286705017, -0.27153176069259644, -0.08400534093379974, -0.14659057557582855, 0.1455615609884262, 0.28805026412010193, 0.32097485661506653, 0.39078471064567566, -0.04441293329000473, 0.45261654257774353, -0.19919773936271667, 0.39547523856163025, 0.1597728282213211, 0.050356157124...
166
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.unique.html
pandas.api.extensions.ExtensionArray.unique
ExtensionArray.unique()[source]# Compute the ExtensionArray of unique values.
Returns: pandas.api.extensions.ExtensionArray
['>>> arr = pd.array([1, 2, 3, 1, 2, 3])\n>>> arr.unique()\n<IntegerArray>\n[1, 2, 3]\nLength: 3, dtype: Int64']
pandas.api.extensions.ExtensionArray.unique ExtensionArray.unique()[source]# Compute the ExtensionArray of unique values.
[ 0.18751558661460876, -0.4080372452735901, -0.25027117133140564, 0.1934739500284195, 0.1569819450378418, 0.2936655580997467, 0.14228570461273193, 0.13979946076869965, 0.008750787004828453, 0.29196470975875854, -0.07928178459405899, 0.39757513999938965, -0.07239323854446411, -0.0279968138784...
167
..\pandas\reference\api\pandas.DataFrame.sparse.density.html
pandas.DataFrame.sparse.density
DataFrame.sparse.density[source]# Ratio of non-sparse points to total (dense) data points.
No parameters found
['>>> df = pd.DataFrame({"A": pd.arrays.SparseArray([0, 1, 0, 1])})\n>>> df.sparse.density\n0.5']
pandas.DataFrame.sparse.density DataFrame.sparse.density[source]# Ratio of non-sparse points to total (dense) data points.
[ -0.05480825528502464, -0.7195331454277039, -0.176326721906662, -0.18078692257404327, 0.18636316061019897, 0.2775646150112152, 0.028086764737963676, 0.3134283721446991, -0.42623305320739746, 0.20616936683654785, -0.02782594971358776, 0.040879182517528534, 0.09118533134460449, 0.206450119614...
168
..\pandas\reference\api\pandas.Interval.open_left.html
pandas.Interval.open_left
Interval.open_left# Check if the interval is open on the left side. For the meaning of closed and open see Interval.
Returns: boolTrue if the Interval is not closed on the left-side.
[">>> iv = pd.Interval(0, 5, closed='neither')\n>>> iv.open_left\nTrue", ">>> iv = pd.Interval(0, 5, closed='both')\n>>> iv.open_left\nFalse"]
pandas.Interval.open_left Interval.open_left# Check if the interval is open on the left side. For the meaning of closed and open see Interval.
[ -0.2898063659667969, -0.5072670578956604, -0.2378275990486145, -0.13981467485427856, -0.18965564668178558, 0.050672706216573715, 0.3885613977909088, 0.09707138687372208, 0.01801333948969841, 0.16215157508850098, -0.1144033670425415, 0.009924115613102913, 0.16639435291290283, 0.272661983966...
169
..\pandas\reference\api\pandas.tseries.offsets.Minute.copy.html
pandas.tseries.offsets.Minute.copy
Minute.copy()# Return a copy of the frequency.
No parameters found
['>>> freq = pd.DateOffset(1)\n>>> freq_copy = freq.copy()\n>>> freq is freq_copy\nFalse']
pandas.tseries.offsets.Minute.copy Minute.copy()# Return a copy of the frequency.
[ -0.18840435147285461, -0.679100513458252, -0.0637020468711853, -0.15273775160312653, -0.005874076392501593, -0.04716580733656883, 0.18802905082702637, 0.08337164670228958, -0.8558176755905151, 0.32011106610298157, 0.03206321969628334, 0.18007886409759521, 0.11537428200244904, 0.02608625218...
170
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.tail.html
pandas.core.groupby.SeriesGroupBy.tail
SeriesGroupBy.tail(n=5)[source]# Return last n rows of each group. Similar to .apply(lambda x: x.tail(n)), but it returns a subset of rows from the original DataFrame with original index and order preserved (as_index flag is ignored).
Parameters: nintIf positive: number of entries to include from end of each group. If negative: number of entries to exclude from start of each group. Returns: Series or DataFrameSubset of original Series or DataFrame as determined by n.
[">>> df = pd.DataFrame([['a', 1], ['a', 2], ['b', 1], ['b', 2]],\n... columns=['A', 'B'])\n>>> df.groupby('A').tail(1)\n A B\n1 a 2\n3 b 2\n>>> df.groupby('A').tail(-1)\n A B\n1 a 2\n3 b 2"]
pandas.core.groupby.SeriesGroupBy.tail SeriesGroupBy.tail(n=5)[source]# Return last n rows of each group. Similar to .apply(lambda x: x.tail(n)), but it returns a subset of rows from the original DataFrame with original index and order preserved (as_index flag is ignored).
[ -0.29361867904663086, -0.36656653881073, -0.22547701001167297, -0.029967408627271652, -0.32258182764053345, 0.37494900822639465, 0.034914519637823105, 0.2707498073577881, -0.010295738466084003, 0.20547230541706085, -0.2815062403678894, 0.1270335167646408, -0.0037646335549652576, 0.11898121...
171
..\pandas\reference\api\pandas.Series.drop_duplicates.html
pandas.Series.drop_duplicates
Series.drop_duplicates(*, keep='first', inplace=False, ignore_index=False)[source]# Return Series with duplicate values removed.
Parameters: keep{‘first’, ‘last’, False}, default ‘first’Method to handle dropping duplicates: ‘first’ : Drop duplicates except for the first occurrence. ‘last’ : Drop duplicates except for the last occurrence. False : Drop all duplicates. inplacebool, default FalseIf True, performs operation inplace and returns None. ...
[">>> s = pd.Series(['llama', 'cow', 'llama', 'beetle', 'llama', 'hippo'],\n... name='animal')\n>>> s\n0 llama\n1 cow\n2 llama\n3 beetle\n4 llama\n5 hippo\nName: animal, dtype: object", '>>> s.drop_duplicates()\n0 llama\n1 cow\n3 beetle\n5 hippo\nName: animal, dty...
pandas.Series.drop_duplicates Series.drop_duplicates(*, keep='first', inplace=False, ignore_index=False)[source]# Return Series with duplicate values removed.
[ 0.03965916484594345, -0.35173070430755615, -0.24910716712474823, 0.1952204704284668, -0.09357906877994537, 0.28942328691482544, 0.1609198898077011, 0.418445348739624, -0.08695511519908905, 0.1824055016040802, -0.31909453868865967, 0.3585975766181946, -0.042582377791404724, 0.08674078434705...
172
..\pandas\reference\api\pandas.api.extensions.ExtensionArray.view.html
pandas.api.extensions.ExtensionArray.view
ExtensionArray.view(dtype=None)[source]# Return a view on the array.
Parameters: dtypestr, np.dtype, or ExtensionDtype, optionalDefault None. Returns: ExtensionArray or np.ndarrayA view on the ExtensionArray’s data.
['>>> arr = pd.array([1, 2, 3])\n>>> arr2 = arr.view()\n>>> arr[0] = 2\n>>> arr2\n<IntegerArray>\n[2, 2, 3]\nLength: 3, dtype: Int64']
pandas.api.extensions.ExtensionArray.view ExtensionArray.view(dtype=None)[source]# Return a view on the array.
[ 0.08148130774497986, -0.3966439366340637, -0.19524060189723969, 0.022211331874132156, 0.2563234269618988, -0.03501390293240547, 0.335338294506073, 0.4276411533355713, 0.1984800100326538, 0.2665920555591583, -0.08840122073888779, 0.3837231993675232, -0.2705410122871399, 0.18997104465961456,...
173
..\pandas\reference\api\pandas.Series.unique.html
pandas.Series.unique
Series.unique()[source]# Return unique values of Series object. Uniques are returned in order of appearance. Hash table-based unique, therefore does NOT sort. Notes Returns the unique values as a NumPy array. In case of an extension-array backed Series, a new ExtensionArray of that type with just the unique values is r...
Returns: ndarray or ExtensionArrayThe unique values returned as a NumPy array. See Notes.
[">>> pd.Series([2, 1, 3, 3], name='A').unique()\narray([2, 1, 3])", ">>> pd.Series([pd.Timestamp('2016-01-01') for _ in range(3)]).unique()\n<DatetimeArray>\n['2016-01-01 00:00:00']\nLength: 1, dtype: datetime64[ns]", ">>> pd.Series([pd.Timestamp('2016-01-01', tz='US/Eastern')\n... for _ in range(3)]).uniqu...
pandas.Series.unique Series.unique()[source]# Return unique values of Series object. Uniques are returned in order of appearance. Hash table-based unique, therefore does NOT sort. Notes Returns the unique values as a NumPy array. In case of an extension-array backed Series, a new ExtensionArray of that type with just t...
[ 0.02803085371851921, -0.36157914996147156, -0.19662101566791534, 0.26541709899902344, 0.14849336445331573, 0.33943161368370056, 0.03315698727965355, 0.15586015582084656, -0.24319645762443542, 0.07705780863761902, -0.2494579702615738, 0.1861739158630371, -0.03544967621564865, -0.08434376120...
174
..\pandas\reference\api\pandas.tseries.offsets.BYearEnd.is_month_end.html
pandas.tseries.offsets.BYearEnd.is_month_end
BYearEnd.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.BYearEnd.is_month_end BYearEnd.is_month_end(ts)# Return boolean whether a timestamp occurs on the month end.
[ 0.0006327488808892667, -0.5167198777198792, -0.19943620264530182, -0.22093220055103302, -0.2497396320104599, 0.02771293930709362, 0.21486817300319672, 0.295091837644577, 0.013727017678320408, 0.13779306411743164, 0.2501888573169708, 0.26173481345176697, 0.17730940878391266, 0.1252568066120...
175
..\pandas\reference\api\pandas.DataFrame.sparse.from_spmatrix.html
pandas.DataFrame.sparse.from_spmatrix
classmethod DataFrame.sparse.from_spmatrix(data, index=None, columns=None)[source]# Create a new DataFrame from a scipy sparse matrix.
Parameters: datascipy.sparse.spmatrixMust be convertible to csc format. index, columnsIndex, optionalRow and column labels to use for the resulting DataFrame. Defaults to a RangeIndex. Returns: DataFrameEach column of the DataFrame is stored as a arrays.SparseArray.
['>>> import scipy.sparse\n>>> mat = scipy.sparse.eye(3, dtype=float)\n>>> pd.DataFrame.sparse.from_spmatrix(mat)\n 0 1 2\n0 1.0 0 0\n1 0 1.0 0\n2 0 0 1.0']
pandas.DataFrame.sparse.from_spmatrix classmethod DataFrame.sparse.from_spmatrix(data, index=None, columns=None)[source]# Create a new DataFrame from a scipy sparse matrix.
[ 0.02567492052912712, -0.548015832901001, -0.07143338769674301, 0.006252463441342115, 0.3643229305744171, 0.2521837651729584, 0.1658707559108734, 0.39338773488998413, -0.011956226080656052, 0.26435333490371704, -0.24735938012599945, 0.22803589701652527, -0.20963767170906067, 0.1955711245536...
176
..\pandas\reference\api\pandas.Interval.open_right.html
pandas.Interval.open_right
Interval.open_right# Check if the interval is open on the right side. For the meaning of closed and open see Interval.
Returns: boolTrue if the Interval is not closed on the left-side.
[">>> iv = pd.Interval(0, 5, closed='left')\n>>> iv.open_right\nTrue", '>>> iv = pd.Interval(0, 5)\n>>> iv.open_right\nFalse']
pandas.Interval.open_right Interval.open_right# Check if the interval is open on the right side. For the meaning of closed and open see Interval.
[ -0.2861414849758148, -0.45013847947120667, -0.23912563920021057, -0.1316567212343216, -0.20545430481433868, 0.014446691609919071, 0.37085410952568054, 0.12097466737031937, 0.011598693206906319, 0.12185659259557724, -0.08442912995815277, -0.020396890118718147, 0.14850392937660217, 0.2987539...
177
..\pandas\reference\api\pandas.Series.dt.as_unit.html
pandas.Series.dt.as_unit
Series.dt.as_unit(*args, **kwargs)[source]#
No parameters found
[]
pandas.Series.dt.as_unit Series.dt.as_unit(*args, **kwargs)[source]#
[ -0.12038271874189377, -0.36792728304862976, -0.19315707683563232, -0.04556281119585037, 0.3446364104747772, 0.4309811592102051, 0.4810602366924286, 0.3323313891887665, -0.09369439631700516, 0.1709805130958557, -0.1477837860584259, 0.243254616856575, -0.21651113033294678, 0.0840021818876266...
178
..\pandas\reference\api\pandas.api.extensions.ExtensionArray._accumulate.html
pandas.api.extensions.ExtensionArray._accumulate
ExtensionArray._accumulate(name, *, skipna=True, **kwargs)[source]# Return an ExtensionArray performing an accumulation operation. The underlying data type might change.
Parameters: namestrName of the function, supported values are: - cummin - cummax - cumsum - cumprod skipnabool, default TrueIf True, skip NA values. **kwargsAdditional keyword arguments passed to the accumulation function. Currently, there is no supported kwarg. Returns: array Raises: NotImplementedErrorsubclass does n...
[">>> arr = pd.array([1, 2, 3])\n>>> arr._accumulate(name='cumsum')\n<IntegerArray>\n[1, 3, 6]\nLength: 3, dtype: Int64"]
pandas.api.extensions.ExtensionArray._accumulate ExtensionArray._accumulate(name, *, skipna=True, **kwargs)[source]# Return an ExtensionArray performing an accumulation operation. The underlying data type might change.
[ 0.22150732576847076, -0.21663887798786163, -0.12435638159513474, 0.1402071863412857, 0.1682809740304947, 0.18861497938632965, -0.0642666444182396, 0.2709033191204071, -0.05171533301472664, 0.4142405092716217, 0.061248887330293655, 0.4367202818393707, -0.01300174742937088, 0.018205467611551...
179
..\pandas\reference\api\pandas.Series.unstack.html
pandas.Series.unstack
Series.unstack(level=-1, fill_value=None, sort=True)[source]# Unstack, also known as pivot, Series with MultiIndex to produce DataFrame. Notes Reference the user guide for more examples.
Parameters: levelint, str, or list of these, default last levelLevel(s) to unstack, can pass level name. fill_valuescalar value, default NoneValue to use when replacing NaN values. sortbool, default TrueSort the level(s) in the resulting MultiIndex columns. Returns: DataFrameUnstacked Series.
[">>> s = pd.Series([1, 2, 3, 4],\n... index=pd.MultiIndex.from_product([['one', 'two'],\n... ['a', 'b']]))\n>>> s\none a 1\n b 2\ntwo a 3\n b 4\ndtype: int64", '>>> s.unstack(level=-1)\n a b\none 1 2\ntwo 3 4', '>>> s.unstack(...
pandas.Series.unstack Series.unstack(level=-1, fill_value=None, sort=True)[source]# Unstack, also known as pivot, Series with MultiIndex to produce DataFrame. Notes Reference the user guide for more examples.
[ -0.3488565683364868, -0.29942041635513306, -0.2057642936706543, 0.019802628085017204, -0.1334688365459442, 0.3335942029953003, 0.3367514908313751, 0.24848075211048126, 0.23787619173526764, 0.3239842653274536, -0.33525481820106506, 0.32108399271965027, 0.11271476745605469, 0.431219816207885...
180
..\pandas\reference\api\pandas.DataFrame.sparse.html
pandas.DataFrame.sparse
DataFrame.sparse()[source]# DataFrame accessor for sparse data.
No parameters found
['>>> df = pd.DataFrame({"a": [1, 2, 0, 0],\n... "b": [3, 0, 0, 4]}, dtype="Sparse[int]")\n>>> df.sparse.density\n0.5']
pandas.DataFrame.sparse DataFrame.sparse()[source]# DataFrame accessor for sparse data.
[ -0.015113974921405315, -0.3733416199684143, -0.12503010034561157, 0.06456172466278076, 0.2882479429244995, 0.18967044353485107, 0.3475267291069031, 0.295121431350708, -0.3382661044597626, 0.2789168059825897, -0.2876065969467163, 0.02447032369673252, -0.04675715044140816, 0.0408318862318992...
181
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.take.html
pandas.core.groupby.SeriesGroupBy.take
SeriesGroupBy.take(indices, axis=<no_default>, **kwargs)[source]# Return the elements in the given positional indices in each group. This means that we are not indexing according to actual values in the index attribute of the object. We are indexing according to the actual position of the element in the object. If a re...
Parameters: indicesarray-likeAn array of ints indicating which positions to take in each group. axis{0 or ‘index’, 1 or ‘columns’, None}, default 0The axis on which to select elements. 0 means that we are selecting rows, 1 means that we are selecting columns. For SeriesGroupBy this parameter is unused and defaults to 0...
['>>> df = pd.DataFrame([(\'falcon\', \'bird\', 389.0),\n... (\'parrot\', \'bird\', 24.0),\n... (\'lion\', \'mammal\', 80.5),\n... (\'monkey\', \'mammal\', np.nan),\n... (\'rabbit\', \'mammal\', 15.0)],\n... columns=[\'name\',...
pandas.core.groupby.SeriesGroupBy.take SeriesGroupBy.take(indices, axis=<no_default>, **kwargs)[source]# Return the elements in the given positional indices in each group. This means that we are not indexing according to actual values in the index attribute of the object. We are indexing according to the actual positio...
[ 0.06504124402999878, -0.388581246137619, -0.0644722506403923, 0.25763845443725586, -0.039905522018671036, 0.2948165237903595, 0.31024298071861267, 0.24653400480747223, 0.1879579722881317, 0.3636649549007416, -0.15635904669761658, 0.2778412699699402, 0.20177090167999268, -0.0701101720333099...
182
..\pandas\reference\api\pandas.Interval.overlaps.html
pandas.Interval.overlaps
Interval.overlaps(other)# Check whether two Interval objects overlap. Two intervals overlap if they share a common point, including closed endpoints. Intervals that only have an open endpoint in common do not overlap.
Parameters: otherIntervalInterval to check against for an overlap. Returns: boolTrue if the two intervals overlap.
['>>> i1 = pd.Interval(0, 2)\n>>> i2 = pd.Interval(1, 3)\n>>> i1.overlaps(i2)\nTrue\n>>> i3 = pd.Interval(4, 5)\n>>> i1.overlaps(i3)\nFalse', ">>> i4 = pd.Interval(0, 1, closed='both')\n>>> i5 = pd.Interval(1, 2, closed='both')\n>>> i4.overlaps(i5)\nTrue", ">>> i6 = pd.Interval(1, 2, closed='neither')\n>>> i4.overlaps(...
pandas.Interval.overlaps Interval.overlaps(other)# Check whether two Interval objects overlap. Two intervals overlap if they share a common point, including closed endpoints. Intervals that only have an open endpoint in common do not overlap.
[ -0.2956179082393646, -0.5782630443572998, -0.18516740202903748, 0.16703195869922638, -0.16343438625335693, -0.14890021085739136, 0.2564597427845001, 0.035410478711128235, 0.07071809470653534, 0.14165747165679932, -0.13993752002716064, 0.1656358540058136, 0.2105116993188858, 0.2241175323724...
183
..\pandas\reference\api\pandas.tseries.offsets.Minute.delta.html
pandas.tseries.offsets.Minute.delta
Minute.delta#
No parameters found
[]
pandas.tseries.offsets.Minute.delta Minute.delta#
[ -0.23027269542217255, -0.6945245862007141, -0.24122382700443268, -0.18512693047523499, -0.024767963215708733, 0.07059258967638016, 0.3751693665981293, -0.0005837596254423261, -0.5983738899230957, 0.14305175840854645, 0.17418773472309113, 0.08876798301935196, 0.12566395103931427, 0.21074983...
184
..\pandas\reference\api\pandas.tseries.offsets.BYearEnd.is_month_start.html
pandas.tseries.offsets.BYearEnd.is_month_start
BYearEnd.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.BYearEnd.is_month_start BYearEnd.is_month_start(ts)# Return boolean whether a timestamp occurs on the month start.
[ -0.12466468662023544, -0.455574631690979, -0.15103645622730255, -0.15861283242702484, -0.2628399729728699, -0.011433140374720097, 0.2912346422672272, 0.21661297976970673, -0.0054788244888186455, 0.02317761816084385, 0.30643489956855774, 0.20723840594291687, 0.08135591447353363, 0.146697506...
185
..\pandas\reference\api\pandas.Series.dt.ceil.html
pandas.Series.dt.ceil
Series.dt.ceil(*args, **kwargs)[source]# Perform ceil operation on the data to the specified freq. Notes If the timestamps have a timezone, ceiling will take place relative to the local (“wall”) time and re-localized to the same timezone. When ceiling near daylight savings time, use nonexistent and ambiguous to control...
Parameters: freqstr or OffsetThe frequency level to ceil the index to. Must be a fixed frequency like ‘S’ (second) not ‘ME’ (month end). See frequency aliases for a list of possible freq values. ambiguous‘infer’, bool-ndarray, ‘NaT’, default ‘raise’Only relevant for DatetimeIndex: ‘infer’ will attempt to infer fall dst...
[">>> rng = pd.date_range('1/1/2018 11:59:00', periods=3, freq='min')\n>>> rng\nDatetimeIndex(['2018-01-01 11:59:00', '2018-01-01 12:00:00',\n '2018-01-01 12:01:00'],\n dtype='datetime64[ns]', freq='min')\n>>> rng.ceil('h')\nDatetimeIndex(['2018-01-01 12:00:00', '2018-01-01 12:00:00',\n ...
pandas.Series.dt.ceil Series.dt.ceil(*args, **kwargs)[source]# Perform ceil operation on the data to the specified freq. Notes If the timestamps have a timezone, ceiling will take place relative to the local (“wall”) time and re-localized to the same timezone. When ceiling near daylight savings time, use nonexistent an...
[ -0.2865598797798157, -0.018110057339072227, -0.07891931384801865, -0.15594439208507538, -0.16549836099147797, 0.02989119663834572, 0.08932827413082123, 0.19324752688407898, -0.08386354893445969, 0.1951720416545868, -0.16626974940299988, 0.3175005614757538, 0.1283186376094818, 0.15448549389...
186
..\pandas\reference\api\pandas.api.extensions.ExtensionArray._concat_same_type.html
pandas.api.extensions.ExtensionArray._concat_same_type
classmethod ExtensionArray._concat_same_type(to_concat)[source]# Concatenate multiple array of this dtype.
Parameters: to_concatsequence of this type Returns: ExtensionArray
['>>> arr1 = pd.array([1, 2, 3])\n>>> arr2 = pd.array([4, 5, 6])\n>>> pd.arrays.IntegerArray._concat_same_type([arr1, arr2])\n<IntegerArray>\n[1, 2, 3, 4, 5, 6]\nLength: 6, dtype: Int64']
pandas.api.extensions.ExtensionArray._concat_same_type classmethod ExtensionArray._concat_same_type(to_concat)[source]# Concatenate multiple array of this dtype.
[ 0.06150597706437111, -0.4013076424598694, -0.20892219245433807, 0.2552196979522705, 0.3285088837146759, 0.22091685235500336, 0.29571178555488586, 0.22821585834026337, 0.01372604165226221, 0.17233091592788696, -0.27589690685272217, 0.4302763044834137, -0.038490504026412964, 0.11476840078830...
187
..\pandas\reference\api\pandas.Series.update.html
pandas.Series.update
Series.update(other)[source]# Modify Series in place using values from passed Series. Uses non-NA values from passed Series to make updates. Aligns on index.
Parameters: otherSeries, or object coercible into Series
['>>> s = pd.Series([1, 2, 3])\n>>> s.update(pd.Series([4, 5, 6]))\n>>> s\n0 4\n1 5\n2 6\ndtype: int64', ">>> s = pd.Series(['a', 'b', 'c'])\n>>> s.update(pd.Series(['d', 'e'], index=[0, 2]))\n>>> s\n0 d\n1 b\n2 e\ndtype: object", '>>> s = pd.Series([1, 2, 3])\n>>> s.update(pd.Series([4, 5, 6, 7, 8]))...
pandas.Series.update Series.update(other)[source]# Modify Series in place using values from passed Series. Uses non-NA values from passed Series to make updates. Aligns on index.
[ -0.006732187233865261, -0.187681183218956, -0.2039649933576584, -0.12291393429040909, -0.18015572428703308, 0.15665927529335022, 0.2008955329656601, 0.33860135078430176, -0.01269432995468378, 0.11819148063659668, -0.2661038637161255, 0.1315373182296753, 0.3585863411426544, 0.24155552685260...
188
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.transform.html
pandas.core.groupby.SeriesGroupBy.transform
SeriesGroupBy.transform(func, *args, engine=None, engine_kwargs=None, **kwargs)[source]# Call function producing a same-indexed Series on each group. Returns a Series having the same indexes as the original object filled with the transformed values. Notes Each group is endowed the attribute ‘name’ in case you need to k...
Parameters: ffunction, strFunction to apply to each group. See the Notes section below for requirements. Accepted inputs are: String Python function Numba JIT function with engine='numba' specified. Only passing a single function is supported with this engine. If the 'numba' engine is chosen, the function must be a use...
['>>> ser = pd.Series([390.0, 350.0, 30.0, 20.0],\n... index=["Falcon", "Falcon", "Parrot", "Parrot"],\n... name="Max Speed")\n>>> grouped = ser.groupby([1, 1, 2, 2])\n>>> grouped.transform(lambda x: (x - x.mean()) / x.std())\n Falcon 0.707107\n Falcon -0.707107\n Parrot ...
pandas.core.groupby.SeriesGroupBy.transform SeriesGroupBy.transform(func, *args, engine=None, engine_kwargs=None, **kwargs)[source]# Call function producing a same-indexed Series on each group. Returns a Series having the same indexes as the original object filled with the transformed values. Notes Each group is endowe...
[ -0.12736816704273224, -0.16832749545574188, -0.05367666110396385, 0.055503249168395996, -0.039541445672512054, 0.11240451037883759, 0.37435171008110046, 0.2779390215873718, 0.005718524567782879, 0.15384069085121155, -0.32457777857780457, 0.36725565791130066, 0.05769021809101105, -0.0747217...
189
..\pandas\reference\api\pandas.api.extensions.ExtensionArray._explode.html
pandas.api.extensions.ExtensionArray._explode
ExtensionArray._explode()[source]# Transform each element of list-like to a row. For arrays that do not contain list-like elements the default implementation of this method just returns a copy and an array of ones (unchanged index).
Returns: ExtensionArrayArray with the exploded values. np.ndarray[uint64]The original lengths of each list-like for determining the resulting index.
['>>> import pyarrow as pa\n>>> a = pd.array([[1, 2, 3], [4], [5, 6]],\n... dtype=pd.ArrowDtype(pa.list_(pa.int64())))\n>>> a._explode()\n(<ArrowExtensionArray>\n[1, 2, 3, 4, 5, 6]\nLength: 6, dtype: int64[pyarrow], array([3, 1, 2], dtype=int32))']
pandas.api.extensions.ExtensionArray._explode ExtensionArray._explode()[source]# Transform each element of list-like to a row. For arrays that do not contain list-like elements the default implementation of this method just returns a copy and an array of ones (unchanged index).
[ 0.32972586154937744, -0.38229605555534363, -0.24866649508476257, 0.05963309854269028, 0.15202763676643372, 0.26577362418174744, 0.20918431878089905, 0.38815969228744507, 0.08161099255084991, 0.24368104338645935, -0.2664792537689209, 0.4678417444229126, -0.005447779782116413, 0.109884783625...
190
..\pandas\reference\api\pandas.Interval.right.html
pandas.Interval.right
Interval.right# Right bound for the interval.
No parameters found
[">>> interval = pd.Interval(left=1, right=2, closed='left')\n>>> interval\nInterval(1, 2, closed='left')\n>>> interval.right\n2"]
pandas.Interval.right Interval.right# Right bound for the interval.
[ -0.3017669916152954, -0.23973827064037323, -0.3320543169975281, -0.2609688341617584, -0.012304031290113926, -0.0705370157957077, 0.19870434701442719, 0.06194107234477997, -0.022577695548534393, 0.2463611662387848, 0.08221976459026337, -0.16745977103710175, 0.03985598683357239, 0.3980283439...
191
..\pandas\reference\api\pandas.tseries.offsets.BYearEnd.is_on_offset.html
pandas.tseries.offsets.BYearEnd.is_on_offset
BYearEnd.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.BYearEnd.is_on_offset BYearEnd.is_on_offset(dt)# Return boolean whether a timestamp intersects with this frequency.
[ -0.2557271122932434, -0.6005986928939819, -0.14309513568878174, -0.03727446123957634, -0.2646394371986389, -0.1469198763370514, 0.25987935066223145, 0.2873713970184326, -0.15872037410736084, 0.028049549087882042, 0.16973397135734558, 0.0292910635471344, -0.06299986690282822, 0.174298882484...
192
..\pandas\reference\api\pandas.DataFrame.sparse.to_coo.html
pandas.DataFrame.sparse.to_coo
DataFrame.sparse.to_coo()[source]# Return the contents of the frame as a sparse SciPy COO matrix. Notes The dtype will be the lowest-common-denominator type (implicit upcasting); that is to say if the dtypes (even of numeric types) are mixed, the one that accommodates all will be chosen. e.g. If the dtypes are float16 ...
Returns: scipy.sparse.spmatrixIf the caller is heterogeneous and contains booleans or objects, the result will be of dtype=object. See Notes.
['>>> df = pd.DataFrame({"A": pd.arrays.SparseArray([0, 1, 0, 1])})\n>>> df.sparse.to_coo()\n<COOrdinate sparse matrix of dtype \'int64\'\n with 2 stored elements and shape (4, 1)>']
pandas.DataFrame.sparse.to_coo DataFrame.sparse.to_coo()[source]# Return the contents of the frame as a sparse SciPy COO matrix. Notes The dtype will be the lowest-common-denominator type (implicit upcasting); that is to say if the dtypes (even of numeric types) are mixed, the one that accommodates all will be chosen. ...
[ -0.018539121374487877, -0.9243165254592896, 0.0587967187166214, 0.11163585633039474, 0.4371316432952881, 0.13159093260765076, 0.12935617566108704, 0.46357011795043945, -0.1828852891921997, 0.181879460811615, -0.5613280534744263, 0.2567206621170044, 0.0751691535115242, 0.21665026247501373, ...
193
..\pandas\reference\api\pandas.Series.dt.components.html
pandas.Series.dt.components
Series.dt.components[source]# Return a Dataframe of the components of the Timedeltas.
Returns: DataFrame
[">>> s = pd.Series(pd.to_timedelta(np.arange(5), unit='s'))\n>>> s\n0 0 days 00:00:00\n1 0 days 00:00:01\n2 0 days 00:00:02\n3 0 days 00:00:03\n4 0 days 00:00:04\ndtype: timedelta64[ns]\n>>> s.dt.components\n days hours minutes seconds milliseconds microseconds nanoseconds\n0 0 0 0 ...
pandas.Series.dt.components Series.dt.components[source]# Return a Dataframe of the components of the Timedeltas.
[ -0.5009266138076782, -0.40535300970077515, -0.26250240206718445, 0.23741118609905243, 0.13964903354644775, 0.2069869190454483, 0.47789278626441956, 0.30833178758621216, -0.12684616446495056, 0.08256294578313828, -0.19472958147525787, 0.2838054299354553, -0.039592448621988297, -0.1203936189...
194
..\pandas\reference\api\pandas.tseries.offsets.Minute.freqstr.html
pandas.tseries.offsets.Minute.freqstr
Minute.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.Minute.freqstr Minute.freqstr# Return a string representing the frequency.
[ -0.15517473220825195, -0.632692813873291, -0.19160036742687225, -0.09838280081748962, 0.09626340121030807, -0.03206118196249008, 0.21579532325267792, 0.004758477210998535, -0.6262332201004028, 0.27175045013427734, 0.0509389266371727, 0.10742677748203278, -0.05842089280486107, 0.08800363540...
195
..\pandas\reference\api\pandas.Series.values.html
pandas.Series.values
property Series.values[source]# Return Series as ndarray or ndarray-like depending on the dtype. Warning We recommend using Series.array or Series.to_numpy(), depending on whether you need a reference to the underlying data or a NumPy array.
Returns: numpy.ndarray or ndarray-like
['>>> pd.Series([1, 2, 3]).values\narray([1, 2, 3])', ">>> pd.Series(list('aabc')).values\narray(['a', 'a', 'b', 'c'], dtype=object)", ">>> pd.Series(list('aabc')).astype('category').values\n['a', 'a', 'b', 'c']\nCategories (3, object): ['a', 'b', 'c']", ">>> pd.Series(pd.date_range('20130101', periods=3,\n... ...
pandas.Series.values property Series.values[source]# Return Series as ndarray or ndarray-like depending on the dtype. Warning We recommend using Series.array or Series.to_numpy(), depending on whether you need a reference to the underlying data or a NumPy array.
[ -0.351163774728775, -0.25089043378829956, -0.2224268615245819, 0.1446753442287445, 0.06336746364831924, 0.0952969342470169, 0.11234733462333679, 0.5298078060150146, -0.10908390581607819, 0.2890785038471222, -0.3813864290714264, 0.5024599432945251, -0.025749702006578445, 0.156489297747612, ...
196
..\pandas\reference\api\pandas.core.groupby.SeriesGroupBy.unique.html
pandas.core.groupby.SeriesGroupBy.unique
SeriesGroupBy.unique()[source]# Return unique values for each group. It returns unique values for each of the grouped values. Returned in order of appearance. Hash table-based unique, therefore does NOT sort.
Returns: SeriesUnique values for each of the grouped values.
[">>> df = pd.DataFrame([('Chihuahua', 'dog', 6.1),\n... ('Beagle', 'dog', 15.2),\n... ('Chihuahua', 'dog', 6.9),\n... ('Persian', 'cat', 9.2),\n... ('Chihuahua', 'dog', 7),\n... ('Persian', 'cat', 8.8)],\n... ...
pandas.core.groupby.SeriesGroupBy.unique SeriesGroupBy.unique()[source]# Return unique values for each group. It returns unique values for each of the grouped values. Returned in order of appearance. Hash table-based unique, therefore does NOT sort.
[ 0.001742982305586338, -0.48447439074516296, -0.16650912165641785, 0.2662685215473175, -0.08689058572053909, 0.4221923053264618, 0.14237919449806213, 0.1211455911397934, -0.13510391116142273, 0.012527153827250004, -0.3877720832824707, 0.28683531284332275, 0.03608734533190727, 0.041194573044...
197
..\pandas\reference\api\pandas.Series.dt.date.html
pandas.Series.dt.date
Series.dt.date[source]# Returns numpy array of python datetime.date objects. Namely, the date part of Timestamps without time and timezone information.
No parameters found
['>>> s = pd.Series(["1/1/2020 10:00:00+00:00", "2/1/2020 11:00:00+00:00"])\n>>> s = pd.to_datetime(s)\n>>> s\n0 2020-01-01 10:00:00+00:00\n1 2020-02-01 11:00:00+00:00\ndtype: datetime64[ns, UTC]\n>>> s.dt.date\n0 2020-01-01\n1 2020-02-01\ndtype: object', '>>> idx = pd.DatetimeIndex(["1/1/2020 10:00:00+00:00"...
pandas.Series.dt.date Series.dt.date[source]# Returns numpy array of python datetime.date objects. Namely, the date part of Timestamps without time and timezone information.
[ 0.03187241777777672, -0.16299013793468475, -0.19776834547519684, 0.27773284912109375, 0.048258550465106964, 0.23648671805858612, 0.2713390588760376, 0.42657098174095154, -0.08270725607872009, 0.20197634398937225, -0.11545204371213913, 0.41922804713249207, -0.1603403091430664, 0.06000753492...
198
..\pandas\reference\api\pandas.DataFrame.sparse.to_dense.html
pandas.DataFrame.sparse.to_dense
DataFrame.sparse.to_dense()[source]# Convert a DataFrame with sparse values to dense.
Returns: DataFrameA DataFrame with the same values stored as dense arrays.
['>>> df = pd.DataFrame({"A": pd.arrays.SparseArray([0, 1, 0])})\n>>> df.sparse.to_dense()\n A\n0 0\n1 1\n2 0']
pandas.DataFrame.sparse.to_dense DataFrame.sparse.to_dense()[source]# Convert a DataFrame with sparse values to dense.
[ -0.04669591784477234, -0.4076949656009674, -0.14669406414031982, -0.12152494490146637, 0.3447074294090271, 0.29081469774246216, -0.001698882901109755, 0.4301961064338684, -0.3921520411968231, 0.33414992690086365, -0.23090296983718872, 0.1799411177635193, -0.01973741315305233, 0.21300570666...
199
..\pandas\reference\api\pandas.api.extensions.ExtensionArray._formatter.html
pandas.api.extensions.ExtensionArray._formatter
ExtensionArray._formatter(boxed=False)[source]# Formatting function for scalar values. This is used in the default ‘__repr__’. The returned formatting function receives instances of your scalar type.
Parameters: boxedbool, default FalseAn indicated for whether or not your array is being printed within a Series, DataFrame, or Index (True), or just by itself (False). This may be useful if you want scalar values to appear differently within a Series versus on its own (e.g. quoted or not). Returns: Callable[[Any], str]...
[">>> class MyExtensionArray(pd.arrays.NumpyExtensionArray):\n... def _formatter(self, boxed=False):\n... return lambda x: '*' + str(x) + '*' if boxed else repr(x) + '*'\n>>> MyExtensionArray(np.array([1, 2, 3, 4]))\n<MyExtensionArray>\n[1*, 2*, 3*, 4*]\nLength: 4, dtype: int64"]
pandas.api.extensions.ExtensionArray._formatter ExtensionArray._formatter(boxed=False)[source]# Formatting function for scalar values. This is used in the default ‘__repr__’. The returned formatting function receives instances of your scalar type.
[ 0.15349732339382172, -0.4410431981086731, -0.08184995502233505, 0.07711818814277649, 0.36611130833625793, 0.020134659484028816, 0.3052057921886444, 0.4023047387599945, -0.20870918035507202, 0.3042413890361786, -0.26891621947288513, 0.39059877395629883, 0.051640499383211136, 0.2629076838493...