pandas :: core :: series :: Series :: Class Series
[hide private]
[frames] | no frames]

Class Series



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

Instance Methods [hide private]
 
__add__(left, right, name='__add__')
 
__and__(self, other)
 
__array__(self, result=None)
the array interface, return my values
 
__array_wrap__(self, result)
Gets called prior to a ufunc (and after)
 
__contains__(self, key)
True if the key is in the info axis
 
__div__(left, right, name='__truediv__')
 
__eq__(self, other)
 
__float__(self)
 
__floordiv__(left, right, name='__floordiv__')
 
__ge__(self, other)
 
__getitem__(self, key)
 
__getslice__(self, i, j)
 
__getstate__(self)
 
__gt__(self, other)
 
__iadd__(left, right, name='__add__')
 
__idiv__(left, right, name='__truediv__')
 
__imul__(left, right, name='__mul__')
 
__init__(self, data=None, index=None, dtype=None, name=None, copy=False, fastpath=False)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__int__(self)
 
__invert__(self)
 
__ipow__(left, right, name='__pow__')
 
__isub__(left, right, name='__sub__')
 
__iter__(self)
Iterate over infor axis
 
__itruediv__(left, right, name='__truediv__')
 
__le__(self, other)
 
__len__(self)
Returns length of info axis
 
__long__(self)
 
__lt__(self, other)
 
__mod__(left, right, name='__mod__')
 
__mul__(left, right, name='__mul__')
 
__ne__(self, other)
 
__neg__(self)
 
__or__(self, other)
 
__pow__(left, right, name='__pow__')
 
__radd__(left, right, name='__radd__')
 
__rand__(self, other)
 
__rdiv__(left, right, name='__rtruediv__')
 
__rfloordiv__(left, right, name='__rfloordiv__')
 
__rmod__(left, right, name='__rmod__')
 
__rmul__(left, right, name='__rmul__')
 
__ror__(self, other)
 
__rpow__(left, right, name='__rpow__')
 
__rsub__(left, right, name='__rsub__')
 
__rtruediv__(left, right, name='__rtruediv__')
 
__rxor__(self, other)
 
__setitem__(self, key, value)
 
__setslice__(self, i, j, value)
Set slice equal to given value(s)
 
__sub__(left, right, name='__sub__')
 
__truediv__(left, right, name='__truediv__')
 
__unicode__(self)
Return a string representation for a particular DataFrame
 
__xor__(self, other)
 
_binop(self, other, func, level=None, fill_value=None)
Perform generic binary operation with optional fill value
 
_get_repr(self, name=False, print_header=False, length=True, dtype=True, na_rep='NaN', float_format=None)
Internal function, should always return unicode string
 
_get_val_at(x, y)
x[y]
 
_get_values(self, indexer)
 
_get_values_tuple(self, key)
 
_get_with(self, key)
 
_ixs(self, i, axis=0)
Return the i-th value or values in the Series by location
 
_maybe_box(self, values)
genericically box the values
 
_needs_reindex_multi(self, axes, method, level)
check if we do need a multi reindex; this is for compat with higher dims
 
_reduce(self, op, axis=0, skipna=True, numeric_only=None, filter_type=None, **kwds)
perform a reduction operation
 
_reindex_indexer(self, new_index, indexer, copy)
 
_repr_footer(self)
 
_set_axis(self, axis, labels, fastpath=False)
override generic, we want to set the _typ here
 
_set_labels(self, key, value)
 
_set_subtyp(self, is_all_dates)
 
_set_values(self, key, value)
 
_set_with(self, key, value)
 
_set_with_engine(self, key, value)
 
_slice(self, slobj, axis=0, raise_on_error=False, typ=None)
 
_tidy_repr(self, max_vals=20)
Internal function, should always return unicode string
 
_unpickle_series_compat(self, state)
 
add(self, other, level=None, fill_value=None, axis=0)
Binary operator add with support to substitute a fill_value for missing data in one of the inputs
 
all(a, axis=None, out=None)
Returns True if all elements evaluate to True.
 
any(a, axis=None, out=None)
Returns True if any of the elements of `a` evaluate to True.
 
append(self, to_append, verify_integrity=False)
Concatenate two or more Series.
 
apply(self, func, convert_dtype=True, args=(), **kwds)
Invoke function on values of Series.
 
argmax(self, axis=None, out=None, skipna=True)
Index of first occurrence of maximum of values.
 
argmin(self, axis=None, out=None, skipna=True)
Index of first occurrence of minimum of values.
 
argsort(self, axis=0, kind='quicksort', order=None)
Overrides ndarray.argsort.
 
asof(self, where)
Return last good (non-NaN) value in TimeSeries if value is NaN for requested date.
 
autocorr(self)
Lag-1 autocorrelation
 
between(self, left, right, inclusive=True)
Return boolean Series equivalent to left <= series <= right.
 
combine(self, other, func, fill_value=nan)
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
 
combine_first(self, other)
Combine Series values, choosing the calling Series's values first.
 
compound(self, axis=None, skipna=None, level=None, **kwargs)
Return the compound percentage of the values for the requested axis
 
corr(self, other, method='pearson', min_periods=None)
Compute correlation with `other` Series, excluding missing values
 
count(self, level=None)
Return number of non-NA/null observations in the Series
 
cov(self, other, min_periods=None)
Compute covariance with Series, excluding missing values
 
cummax(self, axis=None, dtype=None, out=None, skipna=True, **kwargs)
Return cumulative max over requested axis.
 
cummin(self, axis=None, dtype=None, out=None, skipna=True, **kwargs)
Return cumulative min over requested axis.
 
cumprod(self, axis=None, dtype=None, out=None, skipna=True, **kwargs)
Return cumulative prod over requested axis.
 
cumsum(self, axis=None, dtype=None, out=None, skipna=True, **kwargs)
Return cumulative sum over requested axis.
 
describe(self, percentile_width=50)
Generate various summary statistics of Series, excluding NaN values.
 
diff(self, periods=1)
1st discrete difference of object
 
div(self, other, level=None, fill_value=None, axis=0)
Binary operator truediv with support to substitute a fill_value for missing data in one of the inputs
 
divide(self, other, level=None, fill_value=None, axis=0)
Binary operator truediv with support to substitute a fill_value for missing data in one of the inputs
 
dot(self, other)
Matrix multiplication with DataFrame or inner-product with Series objects
 
drop_duplicates(self, take_last=False, inplace=False)
Return Series with duplicate values removed
 
dropna(self, axis=0, inplace=False, **kwargs)
Return Series without null values
 
duplicated(self, take_last=False)
Return boolean Series denoting duplicate values
 
eq(self, other)
 
first_valid_index(self)
Return label for first non-NA/null value
 
floordiv(self, other, level=None, fill_value=None, axis=0)
Binary operator floordiv with support to substitute a fill_value for missing data in one of the inputs
 
ge(self, other)
 
get(self, label, default=None)
Returns value occupying requested label, default to specified missing value if not present.
 
get_value(self, label)
Quickly retrieve single value at passed index label
 
get_values(self)
same as values (but handles sparseness conversions); is a view
 
gt(self, other)
 
hist(self, by=None, ax=None, grid=True, xlabelsize=None, xrot=None, ylabelsize=None, yrot=None, figsize=None, **kwds)
Draw histogram of the input series using matplotlib
 
idxmax(self, axis=None, out=None, skipna=True)
Index of first occurrence of maximum of values.
 
idxmin(self, axis=None, out=None, skipna=True)
Index of first occurrence of minimum of values.
 
iget(self, i, axis=0)
Return the i-th value or values in the Series by location
 
iget_value(self, i, axis=0)
Return the i-th value or values in the Series by location
 
irow(self, i, axis=0)
Return the i-th value or values in the Series by location
 
isin(self, values)
Return a boolean :class:`~pandas.Series` showing whether each element in the :class:`~pandas.Series` is exactly contained in the passed sequence of ``values``.
 
item(self)
 
iteritems(self)
Lazily iterate over (index, value) tuples
 
keys(self)
Alias for index
 
kurt(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs)
Return unbiased kurtosis over requested axis Normalized by N-1
 
kurtosis(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs)
Return unbiased kurtosis over requested axis Normalized by N-1
 
last_valid_index(self)
Return label for last non-NA/null value
 
le(self, other)
 
lt(self, other)
 
mad(self, axis=None, skipna=None, level=None, **kwargs)
Return the mean absolute deviation of the values for the requested axis
 
map(self, arg, na_action=None)
Map values of Series using input correspondence (which can be a dict, Series, or function)
 
max(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs)
This method returns the maximum of the values in the object.
 
mean(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs)
Return the mean of the values for the requested axis
 
median(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs)
Return the median of the values for the requested axis
 
min(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs)
This method returns the minimum of the values in the object.
 
mod(self, other, level=None, fill_value=None, axis=0)
Binary operator mod with support to substitute a fill_value for missing data in one of the inputs
 
mode(self)
Returns the mode(s) of the dataset.
 
mul(self, other, level=None, fill_value=None, axis=0)
Binary operator mul with support to substitute a fill_value for missing data in one of the inputs
 
multiply(self, other, level=None, fill_value=None, axis=0)
Binary operator mul with support to substitute a fill_value for missing data in one of the inputs
 
ne(self, other)
 
nonzero(self)
numpy like, returns same as nonzero
 
nunique(self)
Return count of unique elements in the Series
 
order(self, na_last=True, ascending=True, kind='mergesort')
Sorts Series object, by value, maintaining index-value link
 
plot(series, label=None, kind='line', use_index=True, rot=None, xticks=None, yticks=None, xlim=None, ylim=None, ax=None, style=None, grid=None, legend=False, logx=False, logy=False, secondary_y=False, **kwds)
Plot the input series with the index on the x-axis using matplotlib
 
pow(self, other, level=None, fill_value=None, axis=0)
Binary operator pow with support to substitute a fill_value for missing data in one of the inputs
 
prod(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs)
Return the product of the values for the requested axis
 
product(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs)
Return the product of the values for the requested axis
 
ptp(self, axis=None, out=None)
 
put(self, *args, **kwargs)
 
quantile(self, q=0.5)
Return value at the given quantile, a la scoreatpercentile in scipy.stats
 
radd(self, other, level=None, fill_value=None, axis=0)
Binary operator radd with support to substitute a fill_value for missing data in one of the inputs
 
rank(self, method='average', na_option='keep', ascending=True)
Compute data ranks (1 through n).
 
ravel(self, order='C')
 
rdiv(self, other, level=None, fill_value=None, axis=0)
Binary operator rtruediv with support to substitute a fill_value for missing data in one of the inputs
 
reindex(self, index=None, **kwargs)
Conform Series to new index with optional filling logic, placing NA/NaN in locations having no value in the previous index.
 
reindex_axis(self, labels, axis=0, **kwargs)
for compatibility with higher dims
 
rename(self, index=None, **kwargs)
Alter axes input function or functions.
 
reorder_levels(self, order)
Rearrange index levels using input order.
 
repeat(self, reps)
See ndarray.repeat
 
reset_index(self, level=None, drop=False, name=None, inplace=False)
Analogous to the :meth:`pandas.DataFrame.reset_index` function, see docstring there.
 
reshape(self, *args, **kwargs)
See numpy.ndarray.reshape
 
rfloordiv(self, other, level=None, fill_value=None, axis=0)
Binary operator rfloordiv with support to substitute a fill_value for missing data in one of the inputs
 
rmod(self, other, level=None, fill_value=None, axis=0)
Binary operator rmod with support to substitute a fill_value for missing data in one of the inputs
 
rmul(self, other, level=None, fill_value=None, axis=0)
Binary operator rmul with support to substitute a fill_value for missing data in one of the inputs
 
round(a, decimals=0, out=None)
Return `a` with each element rounded to the given number of decimals.
 
rpow(self, other, level=None, fill_value=None, axis=0)
Binary operator rpow with support to substitute a fill_value for missing data in one of the inputs
 
rsub(self, other, level=None, fill_value=None, axis=0)
Binary operator rsub with support to substitute a fill_value for missing data in one of the inputs
 
rtruediv(self, other, level=None, fill_value=None, axis=0)
Binary operator rtruediv with support to substitute a fill_value for missing data in one of the inputs
 
set_value(self, label, value)
Quickly set single value at passed label.
 
skew(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs)
Return unbiased skew over requested axis Normalized by N-1
 
sort(self, axis=0, kind='quicksort', order=None, ascending=True)
Sort values and index labels by value, in place.
 
sort_index(self, ascending=True)
Sort object by labels (along an axis)
 
sortlevel(self, level=0, ascending=True)
Sort Series with MultiIndex by chosen level.
 
std(self, axis=None, skipna=None, level=None, ddof=1, **kwargs)
Return unbiased standard deviation over requested axis Normalized by N-1
 
sub(self, other, level=None, fill_value=None, axis=0)
Binary operator sub with support to substitute a fill_value for missing data in one of the inputs
 
subtract(self, other, level=None, fill_value=None, axis=0)
Binary operator sub with support to substitute a fill_value for missing data in one of the inputs
 
sum(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs)
Return the sum of the values for the requested axis
 
swaplevel(self, i, j, copy=True)
Swap levels i and j in a MultiIndex
 
take(self, indices, axis=0, convert=True)
Analogous to ndarray.take, return Series corresponding to requested indices
 
to_csv(self, path, index=True, sep=',', na_rep='', float_format=None, header=False, index_label=None, mode='w', nanRep=None, encoding=None, date_format=None)
Write Series to a comma-separated values (csv) file
 
to_dict(self)
Convert Series to {label -> value} dict
 
to_frame(self, name=None)
Convert Series to DataFrame
 
to_period(self, freq=None, copy=True)
Convert TimeSeries from DatetimeIndex to PeriodIndex with desired frequency (inferred from index if not passed)
 
to_sparse(self, kind='block', fill_value=None)
Convert Series to SparseSeries
 
to_string(self, buf=None, na_rep='NaN', float_format=None, nanRep=None, length=False, dtype=False, name=False)
Render a string representation of the Series
 
to_timestamp(self, freq=None, how='start', copy=True)
Cast to datetimeindex of timestamps, at *beginning* of period
 
tolist(self)
Convert Series to a nested list
 
transpose(self)
support for compatiblity
 
truediv(self, other, level=None, fill_value=None, axis=0)
Binary operator truediv with support to substitute a fill_value for missing data in one of the inputs
 
tz_convert(self, tz, copy=True)
Convert TimeSeries to target time zone
 
tz_localize(self, tz, copy=True, infer_dst=False)
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.
 
unique(self)
Return array of unique values in the Series.
 
unstack(self, level=-1)
Unstack, a.k.a.
 
update(self, other)
Modify Series in place using non-NA values from passed Series.
 
valid(self, inplace=False, **kwargs)
 
value_counts(self, normalize=False, sort=True, ascending=False, bins=None)
Returns Series containing counts of unique values.
 
var(self, axis=None, skipna=None, level=None, ddof=1, **kwargs)
Return unbiased variance over requested axis Normalized by N-1
 
view(self, dtype=None)

Inherited from generic.NDFrame: __abs__, __bool__, __delitem__, __finalize__, __getattr__, __hash__, __nonzero__, __setattr__, __setstate__, abs, add_prefix, add_suffix, align, as_blocks, as_matrix, asfreq, astype, at_time, between_time, bfill, bool, clip, clip_lower, clip_upper, consolidate, convert_objects, copy, drop, equals, ffill, fillna, filter, first, get_dtype_counts, get_ftype_counts, groupby, head, interpolate, isnull, iterkv, last, load, mask, notnull, pct_change, pop, reindex_like, rename_axis, replace, resample, save, select, shift, squeeze, swapaxes, tail, to_clipboard, to_dense, to_hdf, to_json, to_msgpack, to_pickle, truncate, tshift, where, xs

Inherited from generic.NDFrame (private): _agg_by_level, _align_frame, _align_series, _box_item_values, _check_setitem_copy, _clear_item_cache, _consolidate_inplace, _construct_axes_dict, _construct_axes_dict_for_slice, _construct_axes_from_arguments, _expand_axes, _get_axis, _get_axis_name, _get_axis_number, _get_axis_resolvers, _get_block_manager_axis, _get_bool_data, _get_item_cache, _get_numeric_data, _get_resolvers, _indexed_same, _init_mgr, _local_dir, _maybe_cache_changed, _maybe_update_cacher, _protect_consolidate, _reindex_axes, _reindex_axis, _reindex_multi, _reindex_with_indexers, _set_as_cached, _set_is_copy, _set_item, _update_inplace, _validate_dtype, _wrap_array, _xs

Inherited from base.PandasObject: __dir__

Inherited from base.PandasObject (private): _reset_cache

Inherited from base.StringMixin: __bytes__, __repr__, __str__

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __sizeof__, __subclasshook__

Class Methods [hide private]
 
from_array(cls, arr, index=None, name=None, copy=False, fastpath=False)
 
from_csv(cls, path, sep=',', parse_dates=True, header=None, index_col=0, encoding=None, infer_datetime_format=False)
Read delimited file into Series

Inherited from generic.NDFrame (private): _add_numeric_operations, _create_indexer, _from_axes, _setup_axes

Static Methods [hide private]

Inherited from generic.NDFrame (private): _construct_axes_dict_from

Class Variables [hide private]
  _AXIS_ALIASES = {'rows': 0}
  _AXIS_IALIASES = {0: 'rows'}
  _AXIS_LEN = 1
  _AXIS_NAMES = {0: 'index'}
  _AXIS_NUMBERS = {'index': 0}
  _AXIS_ORDERS = ['index']
  _AXIS_REVERSED = False
  _AXIS_SLICEMAP = None
hash(x)
  _index = None
hash(x)
  _info_axis_name = 'index'
  _info_axis_number = 0
  _metadata = ['name']
  _stat_axis_name = 'index'
  _stat_axis_number = 0
  _typ = 'series'
  index = <pandas.lib.AxisProperty object at 0x10e314288>
  str = <pandas.lib.cache_readonly object at 0x10f341638>

Inherited from generic.NDFrame: is_copy

Inherited from generic.NDFrame (private): _at, _iat, _iloc, _internal_names, _internal_names_set, _ix, _loc

Properties [hide private]
  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 generic.NDFrame: at, blocks, empty, iat, iloc, ix, loc

Inherited from generic.NDFrame (private): _constructor_sliced, _info_axis, _is_cached, _is_datelike_mixed_type, _is_numeric_mixed_type, _stat_axis

Inherited from object: __class__

Method Details [hide private]

__array__(self, result=None)

 

the array interface, return my values

Overrides: generic.NDFrame.__array__

__array_wrap__(self, result)

 

Gets called prior to a ufunc (and after)

Overrides: generic.NDFrame.__array_wrap__

__contains__(self, key)
(In operator)

 

True if the key is in the info axis

Overrides: generic.NDFrame.__contains__
(inherited documentation)

__getitem__(self, key)
(Indexing operator)

 
Overrides: generic.NDFrame.__getitem__

__getstate__(self)

 
Overrides: generic.NDFrame.__getstate__

__init__(self, data=None, index=None, dtype=None, name=None, copy=False, fastpath=False)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__invert__(self)

 
Overrides: generic.NDFrame.__invert__

__iter__(self)

 

Iterate over infor axis

Overrides: generic.NDFrame.__iter__
(inherited documentation)

__len__(self)
(Length operator)

 

Returns length of info axis

Overrides: generic.NDFrame.__len__
(inherited documentation)

__neg__(self)

 
Overrides: generic.NDFrame.__neg__

__unicode__(self)

 

Return a string representation for a particular DataFrame

Invoked by unicode(df) in py2 only. Yields a Unicode String in both py2/py3.

Overrides: base.StringMixin.__unicode__

_binop(self, other, func, level=None, fill_value=None)

 

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

_get_values(self, indexer)

 
Overrides: _get_values

_ixs(self, i, axis=0)

 

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)

_needs_reindex_multi(self, axes, method, level)

 

check if we do need a multi reindex; this is for compat with higher dims

Overrides: generic.NDFrame._needs_reindex_multi

_set_axis(self, axis, labels, fastpath=False)

 

override generic, we want to set the _typ here

Overrides: generic.NDFrame._set_axis

add(self, other, level=None, fill_value=None, axis=0)

 

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

all(a, axis=None, out=None)

 
Returns True if all elements evaluate to True.

Refer to `numpy.all` for full documentation.

See Also
--------
numpy.all : equivalent function

any(a, axis=None, out=None)

 
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

append(self, to_append, verify_integrity=False)

 

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

apply(self, func, convert_dtype=True, args=(), **kwds)

 

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

argmax(self, axis=None, out=None, skipna=True)

 

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

argmin(self, axis=None, out=None, skipna=True)

 

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

argsort(self, axis=0, kind='quicksort', order=None)

 

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

asof(self, where)

 

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

autocorr(self)

 

Lag-1 autocorrelation

Returns
-------
autocorr : float

between(self, left, right, inclusive=True)

 

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

combine(self, other, func, fill_value=nan)

 

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_first(self, other)

 

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

compound(self, axis=None, skipna=None, level=None, **kwargs)

 


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)

corr(self, other, method='pearson', min_periods=None)

 

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

count(self, level=None)

 

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)

cov(self, other, min_periods=None)

 

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).

cummax(self, axis=None, dtype=None, out=None, skipna=True, **kwargs)

 
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

cummin(self, axis=None, dtype=None, out=None, skipna=True, **kwargs)

 
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

cumprod(self, axis=None, dtype=None, out=None, skipna=True, **kwargs)

 
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

cumsum(self, axis=None, dtype=None, out=None, skipna=True, **kwargs)

 
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

describe(self, percentile_width=50)

 

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

diff(self, periods=1)

 

1st discrete difference of object

Parameters
----------
periods : int, default 1
    Periods to shift for forming difference

Returns
-------
diffed : Series

div(self, other, level=None, fill_value=None, axis=0)

 

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

divide(self, other, level=None, fill_value=None, axis=0)

 

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

dot(self, other)

 

Matrix multiplication with DataFrame or inner-product with Series
objects

Parameters
----------
other : Series or DataFrame

Returns
-------
dot_product : scalar or Series

drop_duplicates(self, take_last=False, inplace=False)

 

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

dropna(self, axis=0, inplace=False, **kwargs)

 

Return Series without null values

Returns
-------
valid : Series
inplace : boolean, default False
    Do operation in place.

duplicated(self, take_last=False)

 

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

floordiv(self, other, level=None, fill_value=None, axis=0)

 

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

from_csv(cls, path, sep=',', parse_dates=True, header=None, index_col=0, encoding=None, infer_datetime_format=False)
Class Method

 

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

get(self, label, default=None)

 

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

Overrides: generic.NDFrame.get

get_value(self, label)

 

Quickly retrieve single value at passed index label

Parameters
----------
index : label

Returns
-------
value : scalar value

get_values(self)

 

same as values (but handles sparseness conversions); is a view

Overrides: generic.NDFrame.get_values

hist(self, by=None, ax=None, grid=True, xlabelsize=None, xrot=None, ylabelsize=None, yrot=None, figsize=None, **kwds)

 

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

idxmax(self, axis=None, out=None, skipna=True)

 

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

idxmin(self, axis=None, out=None, skipna=True)

 

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

iget(self, i, axis=0)

 

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)

iget_value(self, i, axis=0)

 

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)

irow(self, i, axis=0)

 

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)

isin(self, values)

 

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

iteritems(self)

 

Lazily iterate over (index, value) tuples

Overrides: generic.NDFrame.iteritems

keys(self)

 

Alias for index

Overrides: generic.NDFrame.keys

kurt(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs)

 


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)

kurtosis(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs)

 


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)

mad(self, axis=None, skipna=None, level=None, **kwargs)

 


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(self, arg, na_action=None)

 

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

max(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs)

 



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)

mean(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs)

 


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)

median(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs)

 


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)

min(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs)

 



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)

mod(self, other, level=None, fill_value=None, axis=0)

 

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

mode(self)

 
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)

mul(self, other, level=None, fill_value=None, axis=0)

 

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

multiply(self, other, level=None, fill_value=None, axis=0)

 

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

nunique(self)

 

Return count of unique elements in the Series

Returns
-------
nunique : int

order(self, na_last=True, ascending=True, kind='mergesort')

 

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(series, label=None, kind='line', use_index=True, rot=None, xticks=None, yticks=None, xlim=None, ylim=None, ax=None, style=None, grid=None, legend=False, logx=False, logy=False, secondary_y=False, **kwds)

 

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

pow(self, other, level=None, fill_value=None, axis=0)

 

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

prod(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs)

 


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)

product(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs)

 


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)

quantile(self, q=0.5)

 

Return value at the given quantile, a la scoreatpercentile in
scipy.stats

Parameters
----------
q : quantile
    0 <= q <= 1

Returns
-------
quantile : float

radd(self, other, level=None, fill_value=None, axis=0)

 

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

rank(self, method='average', na_option='keep', ascending=True)

 

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

rdiv(self, other, level=None, fill_value=None, axis=0)

 

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

reindex(self, index=None, **kwargs)

 

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

Overrides: generic.NDFrame.reindex

reindex_axis(self, labels, axis=0, **kwargs)

 

for compatibility with higher dims

Overrides: generic.NDFrame.reindex_axis

rename(self, index=None, **kwargs)

 

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)

Overrides: generic.NDFrame.rename

reorder_levels(self, order)

 

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)

reset_index(self, level=None, drop=False, name=None, inplace=False)

 

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

rfloordiv(self, other, level=None, fill_value=None, axis=0)

 

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

rmod(self, other, level=None, fill_value=None, axis=0)

 

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

rmul(self, other, level=None, fill_value=None, axis=0)

 

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

round(a, decimals=0, out=None)

 
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

rpow(self, other, level=None, fill_value=None, axis=0)

 

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

rsub(self, other, level=None, fill_value=None, axis=0)

 

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

rtruediv(self, other, level=None, fill_value=None, axis=0)

 

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

set_value(self, label, value)

 

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

skew(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs)

 


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(self, axis=0, kind='quicksort', order=None, ascending=True)

 

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_index(self, ascending=True)

 

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

Overrides: generic.NDFrame.sort_index

sortlevel(self, level=0, ascending=True)

 

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

std(self, axis=None, skipna=None, level=None, ddof=1, **kwargs)

 


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)

sub(self, other, level=None, fill_value=None, axis=0)

 

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

subtract(self, other, level=None, fill_value=None, axis=0)

 

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

sum(self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs)

 


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)

swaplevel(self, i, j, copy=True)

 

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

Overrides: generic.NDFrame.swaplevel

take(self, indices, axis=0, convert=True)

 

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

Overrides: generic.NDFrame.take

to_csv(self, path, index=True, sep=',', na_rep='', float_format=None, header=False, index_label=None, mode='w', nanRep=None, encoding=None, date_format=None)

 

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.

to_dict(self)

 

Convert Series to {label -> value} dict

Returns
-------
value_dict : dict

to_frame(self, name=None)

 

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

to_period(self, freq=None, copy=True)

 

Convert TimeSeries from DatetimeIndex to PeriodIndex with desired
frequency (inferred from index if not passed)

Parameters
----------
freq : string, default

Returns
-------
ts : TimeSeries with PeriodIndex

to_sparse(self, kind='block', fill_value=None)

 

Convert Series to SparseSeries

Parameters
----------
kind : {'block', 'integer'}
fill_value : float, defaults to NaN (missing)

Returns
-------
sp : SparseSeries

to_string(self, buf=None, na_rep='NaN', float_format=None, nanRep=None, length=False, dtype=False, name=False)

 

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)

to_timestamp(self, freq=None, how='start', copy=True)

 

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

transpose(self)

 

support for compatiblity

Overrides: generic.NDFrame.transpose

truediv(self, other, level=None, fill_value=None, axis=0)

 

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

tz_convert(self, tz, copy=True)

 

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

Overrides: generic.NDFrame.tz_convert

tz_localize(self, tz, copy=True, infer_dst=False)

 

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

Overrides: generic.NDFrame.tz_localize

unique(self)

 

Return array of unique values in the Series. Significantly faster than
numpy.unique

Returns
-------
uniques : ndarray

unstack(self, level=-1)

 

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

update(self, other)

 

Modify Series in place using non-NA values from passed
Series. Aligns on index

Parameters
----------
other : Series

value_counts(self, normalize=False, sort=True, ascending=False, bins=None)

 

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

var(self, axis=None, skipna=None, level=None, ddof=1, **kwargs)

 


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)


Property Details [hide private]

T

support for compatiblity

Get Method:
transpose(self) - support for compatiblity

_can_hold_na

Get Method:
unreachable._can_hold_na(self)

_constructor

class constructor (for this class it's just `__class__`

Get Method:
unreachable._constructor(self)

_is_mixed_type

Get Method:
unreachable._is_mixed_type(self)

axes

index(es) of the NDFrame

Get Method:
unreachable.axes(self)

base

Get Method:
unreachable.base(self)

data

Get Method:
unreachable.data(self)

dtype

Get Method:
unreachable.dtype(self)

dtypes

for compat

Get Method:
unreachable.dtypes(self) - for compat

flags

Get Method:
unreachable.flags(self)

ftype

Get Method:
unreachable.ftype(self)

ftypes

for compat

Get Method:
unreachable.ftypes(self) - for compat

imag

Get Method:
unreachable.imag(self)
Set Method:
unreachable.imag(self, v)

is_time_series

Get Method:
unreachable.is_time_series(self)

ndim

Number of axes / array dimensions

Get Method:
unreachable.ndim(self)

real

Get Method:
unreachable.real(self)
Set Method:
unreachable.real(self, v)

shape

tuple of axis dimensions

Get Method:
unreachable.shape(self)

size

Get Method:
unreachable.size(self)

strides

Get Method:
unreachable.strides(self)

values


Return Series as ndarray

Returns
-------
arr : numpy.ndarray

Get Method:
unreachable.values(self) - Return Series as ndarray

weekday

Get Method:
unreachable.weekday(self)