Home | Trees | Indices | Help |
---|
|
One-dimensional ndarray with axis labels (including time series). Labels need not be unique but must be any hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index. Statistical methods from ndarray have been overridden to automatically exclude missing data (currently represented as NaN) Operations between Series (+, -, /, *, **) align values based on their associated index values-- they need not be the same length. The result index will be the sorted union of the two indexes. Parameters ---------- data : array-like, dict, or scalar value Contains data stored in Series index : array-like or Index (1d) Values must be unique and hashable, same length as data. Index object (or other iterable of same length as data) Will default to np.arange(len(data)) if not provided. If both a dict and index sequence are used, the index will override the keys found in the dict. dtype : numpy.dtype or None If None, dtype will be inferred copy : boolean, default False Copy input data
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from |
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
|||
T support for compatiblity |
|||
_can_hold_na | |||
_constructor class constructor (for this class it's just `__class__` |
|||
_is_mixed_type | |||
axes index(es) of the NDFrame |
|||
base | |||
data | |||
dtype | |||
dtypes for compat |
|||
flags | |||
ftype | |||
ftypes for compat |
|||
imag | |||
is_time_series | |||
ndim Number of axes / array dimensions |
|||
real | |||
shape tuple of axis dimensions |
|||
size | |||
strides | |||
values Return Series as ndarray |
|||
weekday | |||
Inherited from Inherited from Inherited from |
|
the array interface, return my values
|
Gets called prior to a ufunc (and after)
|
True if the key is in the info axis
|
|
|
x.__init__(...) initializes x; see help(type(x)) for signature
|
|
Iterate over infor axis
|
Returns length of info axis
|
|
Return a string representation for a particular DataFrame Invoked by unicode(df) in py2 only. Yields a Unicode String in both py2/py3.
|
Perform generic binary operation with optional fill value Parameters ---------- other : Series func : binary operator fill_value : float or object Value to substitute for NA/null values. If both Series are NA in a location, the result will be NA regardless of the passed fill value level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level Returns ------- combined : Series |
|
Return the i-th value or values in the Series by location Parameters ---------- i : int, slice, or sequence of integers Returns ------- value : scalar (int) or Series (slice, sequence) |
check if we do need a multi reindex; this is for compat with higher dims
|
override generic, we want to set the _typ here
|
Binary operator add with support to substitute a fill_value for missing data in one of the inputs Parameters ---------- other: Series or scalar value fill_value : None or float value, default None (NaN) Fill missing (NaN) values with this value. If both Series are missing, the result will be missing level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level Returns ------- result : Series |
Returns True if all elements evaluate to True. Refer to `numpy.all` for full documentation. See Also -------- numpy.all : equivalent function |
Returns True if any of the elements of `a` evaluate to True. Refer to `numpy.any` for full documentation. See Also -------- numpy.any : equivalent function |
Concatenate two or more Series. The indexes must not overlap Parameters ---------- to_append : Series or list/tuple of Series verify_integrity : boolean, default False If True, raise Exception on creating index with duplicates Returns ------- appended : Series |
Invoke function on values of Series. Can be ufunc (a NumPy function that applies to the entire Series) or a Python function that only works on single values Parameters ---------- func : function convert_dtype : boolean, default True Try to find better dtype for elementwise function results. If False, leave as dtype=object args : tuple Positional arguments to pass to function in addition to the value Additional keyword arguments will be passed as keywords to the function See also -------- Series.map: For element-wise operations Returns ------- y : Series or DataFrame if func returns a Series |
Index of first occurrence of maximum of values. Parameters ---------- skipna : boolean, default True Exclude NA/null values Returns ------- idxmax : Index of minimum of values Notes ----- This method is the Series version of ``ndarray.argmax``. See Also -------- DataFrame.idxmax |
Index of first occurrence of minimum of values. Parameters ---------- skipna : boolean, default True Exclude NA/null values Returns ------- idxmin : Index of minimum of values Notes ----- This method is the Series version of ``ndarray.argmin``. See Also -------- DataFrame.idxmin |
Overrides ndarray.argsort. Argsorts the value, omitting NA/null values, and places the result in the same locations as the non-NA values Parameters ---------- axis : int (can only be zero) kind : {'mergesort', 'quicksort', 'heapsort'}, default 'quicksort' Choice of sorting algorithm. See np.sort for more information. 'mergesort' is the only stable algorithm order : ignored Returns ------- argsorted : Series, with -1 indicated where nan values are present |
Return last good (non-NaN) value in TimeSeries if value is NaN for requested date. If there is no good value, NaN is returned. Parameters ---------- where : date or array of dates Notes ----- Dates are assumed to be sorted Returns ------- value or NaN |
Lag-1 autocorrelation Returns ------- autocorr : float |
Return boolean Series equivalent to left <= series <= right. NA values will be treated as False Parameters ---------- left : scalar Left boundary right : scalar Right boundary Returns ------- is_between : Series |
Perform elementwise binary operation on two Series using given function with optional fill value when an index is missing from one Series or the other Parameters ---------- other : Series or scalar value func : function fill_value : scalar value Returns ------- result : Series |
Combine Series values, choosing the calling Series's values first. Result index will be the union of the two indexes Parameters ---------- other : Series Returns ------- y : Series |
Return the compound percentage of the values for the requested axis Parameters ---------- axis : {index (0)} skipna : boolean, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA level : int, default None If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a scalar numeric_only : boolean, default None Include only float, int, boolean data. If None, will attempt to use everything, then use only numeric data Returns ------- compounded : scalar or Series (if level specified) |
Compute correlation with `other` Series, excluding missing values Parameters ---------- other : Series method : {'pearson', 'kendall', 'spearman'} * pearson : standard correlation coefficient * kendall : Kendall Tau correlation coefficient * spearman : Spearman rank correlation min_periods : int, optional Minimum number of observations needed to have a valid result Returns ------- correlation : float |
Return number of non-NA/null observations in the Series Parameters ---------- level : int, default None If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a smaller Series Returns ------- nobs : int or Series (if level specified) |
Compute covariance with Series, excluding missing values Parameters ---------- other : Series min_periods : int, optional Minimum number of observations needed to have a valid result Returns ------- covariance : float Normalized by N-1 (unbiased estimator). |
Return cumulative max over requested axis. Parameters ---------- axis : {index (0)} skipna : boolean, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA Returns ------- max : scalar |
Return cumulative min over requested axis. Parameters ---------- axis : {index (0)} skipna : boolean, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA Returns ------- min : scalar |
Return cumulative prod over requested axis. Parameters ---------- axis : {index (0)} skipna : boolean, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA Returns ------- prod : scalar |
Return cumulative sum over requested axis. Parameters ---------- axis : {index (0)} skipna : boolean, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA Returns ------- sum : scalar |
Generate various summary statistics of Series, excluding NaN values. These include: count, mean, std, min, max, and lower%/50%/upper% percentiles Parameters ---------- percentile_width : float, optional width of the desired uncertainty interval, default is 50, which corresponds to lower=25, upper=75 Returns ------- desc : Series |
1st discrete difference of object Parameters ---------- periods : int, default 1 Periods to shift for forming difference Returns ------- diffed : Series |
Binary operator truediv with support to substitute a fill_value for missing data in one of the inputs Parameters ---------- other: Series or scalar value fill_value : None or float value, default None (NaN) Fill missing (NaN) values with this value. If both Series are missing, the result will be missing level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level Returns ------- result : Series |
Binary operator truediv with support to substitute a fill_value for missing data in one of the inputs Parameters ---------- other: Series or scalar value fill_value : None or float value, default None (NaN) Fill missing (NaN) values with this value. If both Series are missing, the result will be missing level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level Returns ------- result : Series |
Matrix multiplication with DataFrame or inner-product with Series objects Parameters ---------- other : Series or DataFrame Returns ------- dot_product : scalar or Series |
Return Series with duplicate values removed Parameters ---------- take_last : boolean, default False Take the last observed index in a group. Default first inplace : boolean, default False If True, performs operation inplace and returns None. Returns ------- deduplicated : Series |
Return Series without null values Returns ------- valid : Series inplace : boolean, default False Do operation in place. |
Return boolean Series denoting duplicate values Parameters ---------- take_last : boolean, default False Take the last observed index in a group. Default first Returns ------- duplicated : Series |
Binary operator floordiv with support to substitute a fill_value for missing data in one of the inputs Parameters ---------- other: Series or scalar value fill_value : None or float value, default None (NaN) Fill missing (NaN) values with this value. If both Series are missing, the result will be missing level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level Returns ------- result : Series |
Read delimited file into Series Parameters ---------- path : string file path or file handle / StringIO sep : string, default ',' Field delimiter parse_dates : boolean, default True Parse dates. Different default from read_table header : int, default 0 Row to use at header (skip prior rows) index_col : int or sequence, default 0 Column to use for index. If a sequence is given, a MultiIndex is used. Different default from read_table encoding : string, optional a string representing the encoding to use if the contents are non-ascii, for python versions prior to 3 infer_datetime_format: boolean, default False If True and `parse_dates` is True for a column, try to infer the datetime format based on the first datetime string. If the format can be inferred, there often will be a large parsing speed-up. Returns ------- y : Series |
Returns value occupying requested label, default to specified missing value if not present. Analogous to dict.get Parameters ---------- label : object Label value looking for default : object, optional Value to return if label not in index Returns ------- y : scalar
|
Quickly retrieve single value at passed index label Parameters ---------- index : label Returns ------- value : scalar value |
same as values (but handles sparseness conversions); is a view
|
Draw histogram of the input series using matplotlib Parameters ---------- by : object, optional If passed, then used to form histograms for separate groups ax : matplotlib axis object If not passed, uses gca() grid : boolean, default True Whether to show axis grid lines xlabelsize : int, default None If specified changes the x-axis label size xrot : float, default None rotation of x axis labels ylabelsize : int, default None If specified changes the y-axis label size yrot : float, default None rotation of y axis labels figsize : tuple, default None figure size in inches by default kwds : keywords To be passed to the actual plotting function Notes ----- See matplotlib documentation online for more on this |
Index of first occurrence of maximum of values. Parameters ---------- skipna : boolean, default True Exclude NA/null values Returns ------- idxmax : Index of minimum of values Notes ----- This method is the Series version of ``ndarray.argmax``. See Also -------- DataFrame.idxmax |
Index of first occurrence of minimum of values. Parameters ---------- skipna : boolean, default True Exclude NA/null values Returns ------- idxmin : Index of minimum of values Notes ----- This method is the Series version of ``ndarray.argmin``. See Also -------- DataFrame.idxmin |
Return the i-th value or values in the Series by location Parameters ---------- i : int, slice, or sequence of integers Returns ------- value : scalar (int) or Series (slice, sequence) |
Return the i-th value or values in the Series by location Parameters ---------- i : int, slice, or sequence of integers Returns ------- value : scalar (int) or Series (slice, sequence) |
Return the i-th value or values in the Series by location Parameters ---------- i : int, slice, or sequence of integers Returns ------- value : scalar (int) or Series (slice, sequence) |
Return a boolean :class:`~pandas.Series` showing whether each element in the :class:`~pandas.Series` is exactly contained in the passed sequence of ``values``. Parameters ---------- values : list-like The sequence of values to test. Passing in a single string will raise a ``TypeError``. Instead, turn a single string into a ``list`` of one element. Returns ------- isin : Series (bool dtype) Raises ------ TypeError * If ``values`` is a string See Also -------- pandas.DataFrame.isin Examples -------- >>> s = pd.Series(list('abc')) >>> s.isin(['a', 'c', 'e']) 0 True 1 False 2 True dtype: bool Passing a single string as ``s.isin('a')`` will raise an error. Use a list of one element instead: >>> s.isin(['a']) 0 True 1 False 2 False dtype: bool |
Lazily iterate over (index, value) tuples
|
Alias for index
|
Return unbiased kurtosis over requested axis Normalized by N-1 Parameters ---------- axis : {index (0)} skipna : boolean, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA level : int, default None If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a scalar numeric_only : boolean, default None Include only float, int, boolean data. If None, will attempt to use everything, then use only numeric data Returns ------- kurt : scalar or Series (if level specified) |
Return unbiased kurtosis over requested axis Normalized by N-1 Parameters ---------- axis : {index (0)} skipna : boolean, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA level : int, default None If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a scalar numeric_only : boolean, default None Include only float, int, boolean data. If None, will attempt to use everything, then use only numeric data Returns ------- kurt : scalar or Series (if level specified) |
Return the mean absolute deviation of the values for the requested axis Parameters ---------- axis : {index (0)} skipna : boolean, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA level : int, default None If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a scalar numeric_only : boolean, default None Include only float, int, boolean data. If None, will attempt to use everything, then use only numeric data Returns ------- mad : scalar or Series (if level specified) |
Map values of Series using input correspondence (which can be a dict, Series, or function) Parameters ---------- arg : function, dict, or Series na_action : {None, 'ignore'} If 'ignore', propagate NA values Examples -------- >>> x one 1 two 2 three 3 >>> y 1 foo 2 bar 3 baz >>> x.map(y) one foo two bar three baz Returns ------- y : Series same index as caller |
This method returns the maximum of the values in the object. If you want the *index* of the maximum, use ``idxmax``. This is the equivalent of the ``numpy.ndarray`` method ``argmax``. Parameters ---------- axis : {index (0)} skipna : boolean, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA level : int, default None If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a scalar numeric_only : boolean, default None Include only float, int, boolean data. If None, will attempt to use everything, then use only numeric data Returns ------- max : scalar or Series (if level specified) |
Return the mean of the values for the requested axis Parameters ---------- axis : {index (0)} skipna : boolean, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA level : int, default None If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a scalar numeric_only : boolean, default None Include only float, int, boolean data. If None, will attempt to use everything, then use only numeric data Returns ------- mean : scalar or Series (if level specified) |
Return the median of the values for the requested axis Parameters ---------- axis : {index (0)} skipna : boolean, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA level : int, default None If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a scalar numeric_only : boolean, default None Include only float, int, boolean data. If None, will attempt to use everything, then use only numeric data Returns ------- median : scalar or Series (if level specified) |
This method returns the minimum of the values in the object. If you want the *index* of the minimum, use ``idxmin``. This is the equivalent of the ``numpy.ndarray`` method ``argmin``. Parameters ---------- axis : {index (0)} skipna : boolean, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA level : int, default None If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a scalar numeric_only : boolean, default None Include only float, int, boolean data. If None, will attempt to use everything, then use only numeric data Returns ------- min : scalar or Series (if level specified) |
Binary operator mod with support to substitute a fill_value for missing data in one of the inputs Parameters ---------- other: Series or scalar value fill_value : None or float value, default None (NaN) Fill missing (NaN) values with this value. If both Series are missing, the result will be missing level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level Returns ------- result : Series |
Returns the mode(s) of the dataset. Empty if nothing occurs at least 2 times. Always returns Series even if only one value. Parameters ---------- sort : bool, default True If True, will lexicographically sort values, if False skips sorting. Result ordering when ``sort=False`` is not defined. Returns ------- modes : Series (sorted) |
Binary operator mul with support to substitute a fill_value for missing data in one of the inputs Parameters ---------- other: Series or scalar value fill_value : None or float value, default None (NaN) Fill missing (NaN) values with this value. If both Series are missing, the result will be missing level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level Returns ------- result : Series |
Binary operator mul with support to substitute a fill_value for missing data in one of the inputs Parameters ---------- other: Series or scalar value fill_value : None or float value, default None (NaN) Fill missing (NaN) values with this value. If both Series are missing, the result will be missing level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level Returns ------- result : Series |
Return count of unique elements in the Series Returns ------- nunique : int |
Sorts Series object, by value, maintaining index-value link Parameters ---------- na_last : boolean (optional, default=True) Put NaN's at beginning or end ascending : boolean, default True Sort ascending. Passing False sorts descending kind : {'mergesort', 'quicksort', 'heapsort'}, default 'mergesort' Choice of sorting algorithm. See np.sort for more information. 'mergesort' is the only stable algorithm Returns ------- y : Series |
Plot the input series with the index on the x-axis using matplotlib Parameters ---------- label : label argument to provide to plot kind : {'line', 'bar', 'barh', 'kde', 'density'} bar : vertical bar plot barh : horizontal bar plot kde/density : Kernel Density Estimation plot use_index : boolean, default True Plot index as axis tick labels rot : int, default None Rotation for tick labels xticks : sequence Values to use for the xticks yticks : sequence Values to use for the yticks xlim : 2-tuple/list ylim : 2-tuple/list ax : matplotlib axis object If not passed, uses gca() style : string, default matplotlib default matplotlib line style to use grid : matplotlib grid legend: matplotlib legend logx : boolean, default False For line plots, use log scaling on x axis logy : boolean, default False For line plots, use log scaling on y axis secondary_y : boolean or sequence of ints, default False If True then y-axis will be on the right figsize : a tuple (width, height) in inches kwds : keywords Options to pass to matplotlib plotting method Notes ----- See matplotlib documentation online for more on this subject |
Binary operator pow with support to substitute a fill_value for missing data in one of the inputs Parameters ---------- other: Series or scalar value fill_value : None or float value, default None (NaN) Fill missing (NaN) values with this value. If both Series are missing, the result will be missing level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level Returns ------- result : Series |
Return the product of the values for the requested axis Parameters ---------- axis : {index (0)} skipna : boolean, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA level : int, default None If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a scalar numeric_only : boolean, default None Include only float, int, boolean data. If None, will attempt to use everything, then use only numeric data Returns ------- prod : scalar or Series (if level specified) |
Return the product of the values for the requested axis Parameters ---------- axis : {index (0)} skipna : boolean, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA level : int, default None If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a scalar numeric_only : boolean, default None Include only float, int, boolean data. If None, will attempt to use everything, then use only numeric data Returns ------- prod : scalar or Series (if level specified) |
Return value at the given quantile, a la scoreatpercentile in scipy.stats Parameters ---------- q : quantile 0 <= q <= 1 Returns ------- quantile : float |
Binary operator radd with support to substitute a fill_value for missing data in one of the inputs Parameters ---------- other: Series or scalar value fill_value : None or float value, default None (NaN) Fill missing (NaN) values with this value. If both Series are missing, the result will be missing level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level Returns ------- result : Series |
Compute data ranks (1 through n). Equal values are assigned a rank that is the average of the ranks of those values Parameters ---------- method : {'average', 'min', 'max', 'first'} * average: average rank of group * min: lowest rank in group * max: highest rank in group * first: ranks assigned in order they appear in the array na_option : {'keep'} keep: leave NA values where they are ascending : boolean, default True False for ranks by high (1) to low (N) Returns ------- ranks : Series |
Binary operator rtruediv with support to substitute a fill_value for missing data in one of the inputs Parameters ---------- other: Series or scalar value fill_value : None or float value, default None (NaN) Fill missing (NaN) values with this value. If both Series are missing, the result will be missing level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level Returns ------- result : Series |
Conform Series to new index with optional filling logic, placing NA/NaN in locations having no value in the previous index. A new object is produced unless the new index is equivalent to the current one and copy=False Parameters ---------- index : array-like, optional (can be specified in order, or as keywords) New labels / index to conform to. Preferably an Index object to avoid duplicating data method : {'backfill', 'bfill', 'pad', 'ffill', None}, default None Method to use for filling holes in reindexed DataFrame pad / ffill: propagate last valid observation forward to next valid backfill / bfill: use NEXT valid observation to fill gap copy : boolean, default True Return a new object, even if the passed indexes are the same level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level fill_value : scalar, default np.NaN Value to use for missing values. Defaults to NaN, but can be any "compatible" value limit : int, default None Maximum size gap to forward or backward fill takeable : boolean, default False treat the passed as positional values Examples -------- >>> df.reindex(index=[date1, date2, date3], columns=['A', 'B', 'C']) Returns ------- reindexed : Series
|
for compatibility with higher dims
|
Alter axes input function or functions. Function / dict values must be unique (1-to-1). Labels not contained in a dict / Series will be left as-is. Parameters ---------- index : dict-like or function, optional Transformation to apply to that axis values copy : boolean, default True Also copy underlying data inplace : boolean, default False Whether to return a new Series. If True then value of copy is ignored. Returns ------- renamed : Series (new object)
|
Rearrange index levels using input order. May not drop or duplicate levels Parameters ---------- order: list of int representing new level order. (reference level by number or key) axis: where to reorder levels Returns ------- type of caller (new object) |
Analogous to the :meth:`pandas.DataFrame.reset_index` function, see docstring there. Parameters ---------- level : int, str, tuple, or list, default None Only remove the given levels from the index. Removes all levels by default drop : boolean, default False Do not try to insert index into dataframe columns name : object, default None The name of the column corresponding to the Series values inplace : boolean, default False Modify the Series in place (do not create a new object) Returns ---------- resetted : DataFrame, or Series if drop == True |
Binary operator rfloordiv with support to substitute a fill_value for missing data in one of the inputs Parameters ---------- other: Series or scalar value fill_value : None or float value, default None (NaN) Fill missing (NaN) values with this value. If both Series are missing, the result will be missing level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level Returns ------- result : Series |
Binary operator rmod with support to substitute a fill_value for missing data in one of the inputs Parameters ---------- other: Series or scalar value fill_value : None or float value, default None (NaN) Fill missing (NaN) values with this value. If both Series are missing, the result will be missing level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level Returns ------- result : Series |
Binary operator rmul with support to substitute a fill_value for missing data in one of the inputs Parameters ---------- other: Series or scalar value fill_value : None or float value, default None (NaN) Fill missing (NaN) values with this value. If both Series are missing, the result will be missing level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level Returns ------- result : Series |
Return `a` with each element rounded to the given number of decimals. Refer to `numpy.around` for full documentation. See Also -------- numpy.around : equivalent function |
Binary operator rpow with support to substitute a fill_value for missing data in one of the inputs Parameters ---------- other: Series or scalar value fill_value : None or float value, default None (NaN) Fill missing (NaN) values with this value. If both Series are missing, the result will be missing level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level Returns ------- result : Series |
Binary operator rsub with support to substitute a fill_value for missing data in one of the inputs Parameters ---------- other: Series or scalar value fill_value : None or float value, default None (NaN) Fill missing (NaN) values with this value. If both Series are missing, the result will be missing level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level Returns ------- result : Series |
Binary operator rtruediv with support to substitute a fill_value for missing data in one of the inputs Parameters ---------- other: Series or scalar value fill_value : None or float value, default None (NaN) Fill missing (NaN) values with this value. If both Series are missing, the result will be missing level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level Returns ------- result : Series |
Quickly set single value at passed label. If label is not contained, a new object is created with the label placed at the end of the result index Parameters ---------- label : object Partial indexing with MultiIndex not allowed value : object Scalar value Returns ------- series : Series If label is contained, will be reference to calling Series, otherwise a new object |
Return unbiased skew over requested axis Normalized by N-1 Parameters ---------- axis : {index (0)} skipna : boolean, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA level : int, default None If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a scalar numeric_only : boolean, default None Include only float, int, boolean data. If None, will attempt to use everything, then use only numeric data Returns ------- skew : scalar or Series (if level specified) |
Sort values and index labels by value, in place. For compatibility with ndarray API. No return value Parameters ---------- axis : int (can only be zero) kind : {'mergesort', 'quicksort', 'heapsort'}, default 'quicksort' Choice of sorting algorithm. See np.sort for more information. 'mergesort' is the only stable algorithm order : ignored ascending : boolean, default True Sort ascending. Passing False sorts descending See Also -------- Series.order |
Sort object by labels (along an axis) Parameters ---------- ascending : boolean or list, default True Sort ascending vs. descending. Specify list for multiple sort orders Examples -------- >>> result1 = s.sort_index(ascending=False) >>> result2 = s.sort_index(ascending=[1, 0]) Returns ------- sorted_obj : Series
|
Sort Series with MultiIndex by chosen level. Data will be lexicographically sorted by the chosen level followed by the other levels (in order) Parameters ---------- level : int ascending : bool, default True Returns ------- sorted : Series |
Return unbiased standard deviation over requested axis Normalized by N-1 Parameters ---------- axis : {index (0)} skipna : boolean, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA level : int, default None If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a scalar numeric_only : boolean, default None Include only float, int, boolean data. If None, will attempt to use everything, then use only numeric data Returns ------- stdev : scalar or Series (if level specified) |
Binary operator sub with support to substitute a fill_value for missing data in one of the inputs Parameters ---------- other: Series or scalar value fill_value : None or float value, default None (NaN) Fill missing (NaN) values with this value. If both Series are missing, the result will be missing level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level Returns ------- result : Series |
Binary operator sub with support to substitute a fill_value for missing data in one of the inputs Parameters ---------- other: Series or scalar value fill_value : None or float value, default None (NaN) Fill missing (NaN) values with this value. If both Series are missing, the result will be missing level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level Returns ------- result : Series |
Return the sum of the values for the requested axis Parameters ---------- axis : {index (0)} skipna : boolean, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA level : int, default None If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a scalar numeric_only : boolean, default None Include only float, int, boolean data. If None, will attempt to use everything, then use only numeric data Returns ------- sum : scalar or Series (if level specified) |
Swap levels i and j in a MultiIndex Parameters ---------- i, j : int, string (can be mixed) Level of index to be swapped. Can pass level name as string. Returns ------- swapped : Series
|
Analogous to ndarray.take, return Series corresponding to requested indices Parameters ---------- indices : list / array of ints convert : translate negative to positive indices (default) Returns ------- taken : Series
|
Write Series to a comma-separated values (csv) file Parameters ---------- path : string file path or file handle / StringIO na_rep : string, default '' Missing data representation float_format : string, default None Format string for floating point numbers header : boolean, default False Write out series name index : boolean, default True Write row names (index) index_label : string or sequence, default None Column label for index column(s) if desired. If None is given, and `header` and `index` are True, then the index names are used. A sequence should be given if the DataFrame uses MultiIndex. mode : Python write mode, default 'w' sep : character, default "," Field delimiter for the output file. encoding : string, optional a string representing the encoding to use if the contents are non-ascii, for python versions prior to 3 date_format: string, default None Format string for datetime objects. |
Convert Series to {label -> value} dict Returns ------- value_dict : dict |
Convert Series to DataFrame Parameters ---------- name : object, default None The passed name should substitute for the series name (if it has one). Returns ------- data_frame : DataFrame |
Convert TimeSeries from DatetimeIndex to PeriodIndex with desired frequency (inferred from index if not passed) Parameters ---------- freq : string, default Returns ------- ts : TimeSeries with PeriodIndex |
Convert Series to SparseSeries Parameters ---------- kind : {'block', 'integer'} fill_value : float, defaults to NaN (missing) Returns ------- sp : SparseSeries |
Render a string representation of the Series Parameters ---------- buf : StringIO-like, optional buffer to write to na_rep : string, optional string representation of NAN to use, default 'NaN' float_format : one-parameter function, optional formatter function to apply to columns' elements if they are floats default None length : boolean, default False Add the Series length dtype : boolean, default False Add the Series dtype name : boolean, default False Add the Series name (which may be None) Returns ------- formatted : string (if not buffer passed) |
Cast to datetimeindex of timestamps, at *beginning* of period Parameters ---------- freq : string, default frequency of PeriodIndex Desired frequency how : {'s', 'e', 'start', 'end'} Convention for converting period to timestamp; start of period vs. end Returns ------- ts : TimeSeries with DatetimeIndex |
support for compatiblity
|
Binary operator truediv with support to substitute a fill_value for missing data in one of the inputs Parameters ---------- other: Series or scalar value fill_value : None or float value, default None (NaN) Fill missing (NaN) values with this value. If both Series are missing, the result will be missing level : int or name Broadcast across a level, matching Index values on the passed MultiIndex level Returns ------- result : Series |
Convert TimeSeries to target time zone Parameters ---------- tz : string or pytz.timezone object copy : boolean, default True Also make a copy of the underlying data Returns ------- converted : TimeSeries
|
Localize tz-naive TimeSeries to target time zone Entries will retain their "naive" value but will be annotated as being relative to the specified tz. After localizing the TimeSeries, you may use tz_convert() to get the Datetime values recomputed to a different tz. Parameters ---------- tz : string or pytz.timezone object copy : boolean, default True Also make a copy of the underlying data infer_dst : boolean, default False Attempt to infer fall dst-transition hours based on order Returns ------- localized : TimeSeries
|
Return array of unique values in the Series. Significantly faster than numpy.unique Returns ------- uniques : ndarray |
Unstack, a.k.a. pivot, Series with MultiIndex to produce DataFrame Parameters ---------- level : int, string, or list of these, default last level Level(s) to unstack, can pass level name Examples -------- >>> s one a 1. one b 2. two a 3. two b 4. >>> s.unstack(level=-1) a b one 1. 2. two 3. 4. >>> s.unstack(level=0) one two a 1. 2. b 3. 4. Returns ------- unstacked : DataFrame |
Modify Series in place using non-NA values from passed Series. Aligns on index Parameters ---------- other : Series |
Returns Series containing counts of unique values. The resulting Series will be in descending order so that the first element is the most frequently-occurring element. Excludes NA values Parameters ---------- normalize : boolean, default False If True then the Series returned will contain the relative frequencies of the unique values. sort : boolean, default True Sort by values ascending : boolean, default False Sort in ascending order bins : integer, optional Rather than count values, group them into half-open bins, a convenience for pd.cut, only works with numeric data Returns ------- counts : Series |
Return unbiased variance over requested axis Normalized by N-1 Parameters ---------- axis : {index (0)} skipna : boolean, default True Exclude NA/null values. If an entire row/column is NA, the result will be NA level : int, default None If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a scalar numeric_only : boolean, default None Include only float, int, boolean data. If None, will attempt to use everything, then use only numeric data Returns ------- variance : scalar or Series (if level specified) |
|
Tsupport for compatiblity
|
_can_hold_na
|
_constructorclass constructor (for this class it's just `__class__`
|
_is_mixed_type
|
axesindex(es) of the NDFrame
|
base
|
data
|
dtype
|
dtypesfor compat
|
flags
|
ftype
|
ftypesfor compat
|
imag
|
is_time_series
|
ndimNumber of axes / array dimensions
|
real
|
shapetuple of axis dimensions
|
size
|
strides
|
valuesReturn Series as ndarray Returns ------- arr : numpy.ndarray
|
weekday
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Mon Jun 23 11:50:35 2014 | http://epydoc.sourceforge.net |