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_prepare__(self, result, context=None)
Gets called prior to a ufunc
 
__array_wrap__(self, result, context=None)
Gets called after a ufunc
 
__div__(left, right, name='__truediv__')
 
__eq__(self, other)
 
__float__(self)
 
__floordiv__(left, right, name='__floordiv__')
 
__ge__(self, other)
 
__getitem__(self, key)
 
__getstate__(self)
 
__gt__(self, other)
 
__iadd__(self, other)
 
__idiv__(left, right, name='__truediv__')
 
__imul__(self, other)
 
__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)
 
__ipow__(self, other)
 
__isub__(self, other)
 
__iter__(self)
Iterate over infor axis
 
__itruediv__(self, other)
 
__le__(self, other)
 
__len__(self)
return the length of the Series
 
__long__(self)
 
__lt__(self, other)
 
__mod__(left, right, name='__mod__')
 
__mul__(left, right, name='__mul__')
 
__ne__(self, other)
 
__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)
 
__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, func, dropna=False)
evaluate a function with possible input/output conversion if we are i8
 
_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, name=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, typ=None)
Construct a slice of this container.
 
_tidy_repr(self, max_vals=20)
Internal function, should always return unicode string
 
_unpickle_series_compat(self, state)
 
_update_inplace(self, result, **kwargs)
replace self internals with result.
 
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
 
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
 
compress(self, condition, axis=0, out=None, **kwargs)
Return selected slices of an array along given axis as a Series
 
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.
 
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_value(self, label, takeable=False)
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, bins=10, **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``.
 
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)
 
nlargest(self, n=5, take_last=False)
Return the largest `n` elements.
 
nonzero(self)
Return the indices of the elements that are non-zero
 
nsmallest(self, n=5, take_last=False)
Return the smallest `n` elements.
 
order(self, na_last=None, ascending=True, kind='quicksort', na_position='last', inplace=False)
Sorts Series object, by value, maintaining index-value link.
 
plot(data, kind='line', ax=None, figsize=None, use_index=True, title=None, grid=None, legend=False, style=None, logx=False, logy=False, loglog=False, xticks=None, yticks=None, xlim=None, ylim=None, rot=None, fontsize=None, colormap=None, table=False, yerr=None, xerr=None, label=None, secondary_y=False, **kwds)
Make plots of Series using matplotlib / pylab.
 
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)
return a ndarray with the values put
 
quantile(self, q=0.5)
Return value at the given quantile, a la numpy.percentile.
 
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, pct=False)
Compute data ranks (1 through n).
 
ravel(self, order='C')
Return the flattened underlying data as an ndarray
 
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)
return a new Series with the values repeated reps times
 
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)
return an ndarray with the values shape if the specified shape matches exactly the current shape, then return self (for compat)
 
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
 
searchsorted(self, v, side='left', sorter=None)
Find indices where elements should be inserted to maintain order.
 
sem(self, axis=None, skipna=None, level=None, ddof=1, **kwargs)
Return unbiased standard error of the mean over requested axis.
 
set_value(self, label, value, takeable=False)
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, ascending=True, kind='quicksort', na_position='last', inplace=True)
Sort values and index labels by value.
 
sort_index(self, ascending=True)
Sort object by labels (along an axis)
 
sortlevel(self, level=0, ascending=True, sort_remaining=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.
 
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, is_copy=False)
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, 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
 
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
 
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)
 
var(self, axis=None, skipna=None, level=None, ddof=1, **kwargs)
Return unbiased variance over requested axis.
 
view(self, dtype=None)

Inherited from base.IndexOpsMixin: all, any, factorize, hasnans, item, nunique, transpose, unique, value_counts

Inherited from generic.NDFrame: __abs__, __bool__, __contains__, __delitem__, __finalize__, __getattr__, __hash__, __invert__, __neg__, __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, describe, drop, equals, ffill, fillna, filter, first, get, 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, set_axis, shift, slice_shift, squeeze, swapaxes, tail, to_clipboard, to_dense, to_hdf, to_json, to_msgpack, to_pickle, to_sql, truncate, tshift, tz_convert, tz_localize, where, xs

Inherited from generic.NDFrame (private): _agg_by_level, _align_frame, _align_series, _box_item_values, _check_inplace_setting, _check_is_chained_assignment_possible, _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_cacher, _get_index_resolvers, _get_item_cache, _get_numeric_data, _iget_item_cache, _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, _validate_dtype, _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, dtype=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)
  _allow_index_ops = True
  _index = None
hash(x)
  _info_axis_name = 'index'
  _info_axis_number = 0
  _metadata = ['name']
  _stat_axis_name = 'index'
  _stat_axis_number = 0
  _typ = 'series'
  cat = <pandas.lib.cache_readonly object at 0x119534680>
  dt = <pandas.lib.cache_readonly object at 0x1195345f0>
  index = <pandas.lib.AxisProperty object at 0x11856c300>
  str = <pandas.lib.cache_readonly object at 0x119534560>

Inherited from base.IndexOpsMixin: __array_priority__

Inherited from generic.NDFrame: is_copy

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

Properties [hide private]
  _can_hold_na
  _constructor
class constructor (for this class it's just `__class__`
  _is_mixed_type
  axes
index(es) of the NDFrame
  dtype
return the dtype object of the underlying data
  dtypes
return the dtype object of the underlying data
  ftype
return if the data is sparse|dense
  ftypes
return if the data is sparse|dense
  imag
  is_time_series
  real
  values
Return Series as ndarray

Inherited from base.IndexOpsMixin: T, base, data, flags, itemsize, nbytes, ndim, shape, size, strides

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, _is_view, _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, context=None)

 

Gets called after a ufunc

Overrides: generic.NDFrame.__array_wrap__

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

__iter__(self)

 

Iterate over infor axis

Overrides: generic.NDFrame.__iter__
(inherited documentation)

__len__(self)
(Length operator)

 

return the length of the Series

Overrides: generic.NDFrame.__len__

__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 level name, default None
    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)

_maybe_box(self, func, dropna=False)

 

evaluate a function with possible input/output conversion if we are i8

Parameters
----------
dropna : bool, default False
   whether to drop values if necessary

_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

_reduce(self, op, axis=0, skipna=True, numeric_only=None, filter_type=None, name=None, **kwds)

 

perform a reduction operation

if we have an ndarray as a value, then simply perform the operation, otherwise delegate to the object

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

 

override generic, we want to set the _typ here

Overrides: generic.NDFrame._set_axis

_slice(self, slobj, axis=0, typ=None)

 

Construct a slice of this container.

typ parameter is maintained for compatibility with Series slicing.

Overrides: generic.NDFrame._slice
(inherited documentation)

_update_inplace(self, result, **kwargs)

 

replace self internals with result.

Parameters
----------
verify_is_copy : boolean, default True
    provide is_copy checks

Overrides: generic.NDFrame._update_inplace
(inherited documentation)

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

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 maximum of values

Notes
-----
This method is the Series version of ``ndarray.argmax``.

See Also
--------
DataFrame.idxmax
numpy.ndarray.argmax

Overrides: base.IndexOpsMixin.argmax

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
numpy.ndarray.argmin

Overrides: base.IndexOpsMixin.argmin

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

See also
--------
numpy.ndarray.argsort

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 or level name, 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)

compress(self, condition, axis=0, out=None, **kwargs)

 

Return selected slices of an array along given axis as a Series

See also
--------
numpy.ndarray.compress

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 or level name, 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

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

Overrides: base.IndexOpsMixin.drop_duplicates

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

Overrides: base.IndexOpsMixin.duplicated

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_value(self, label, takeable=False)

 

Quickly retrieve single value at passed index label

Parameters
----------
index : label
takeable : interpret the index as indexers, default False

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, bins=10, **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
bins: integer, default 10
    Number of histogram bins to be used
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 maximum of values

Notes
-----
This method is the Series version of ``ndarray.argmax``.

See Also
--------
DataFrame.idxmax
numpy.ndarray.argmax

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
numpy.ndarray.argmin

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 or level name, 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 or level name, 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 or level name, 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 or level name, 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)

Overrides: base.IndexOpsMixin.max

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 or level name, 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 or level name, 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 or level name, 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)

Overrides: base.IndexOpsMixin.min

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

nlargest(self, n=5, take_last=False)

 
Return the largest `n` elements.

Parameters
----------
n : int
    Return this many descending sorted values
take_last : bool
    Where there are duplicate values, take the last duplicate

Returns
-------
top_n : Series
    The n largest values in the Series, in sorted order

Notes
-----
Faster than ``.order(ascending=False).head(n)`` for small `n` relative
to the size of the ``Series`` object.

See Also
--------
Series.nsmallest

Examples
--------
>>> import pandas as pd
>>> import numpy as np
>>> s = pd.Series(np.random.randn(1e6))
>>> s.nlargest(10)  # only sorts up to the N requested

nonzero(self)

 

Return the indices of the elements that are non-zero

This method is equivalent to calling `numpy.nonzero` on the
series data. For compatability with NumPy, the return value is
the same (a tuple with an array of indices for each dimension),
but it will always be a one-item tuple because series only have
one dimension.

Examples
--------
>>> s = pd.Series([0, 3, 0, 4])
>>> s.nonzero()
(array([1, 3]),)
>>> s.iloc[s.nonzero()[0]]
1    3
3    4
dtype: int64

See Also
--------
numpy.nonzero

nsmallest(self, n=5, take_last=False)

 
Return the smallest `n` elements.

Parameters
----------
n : int
    Return this many ascending sorted values
take_last : bool
    Where there are duplicate values, take the last duplicate

Returns
-------
bottom_n : Series
    The n smallest values in the Series, in sorted order

Notes
-----
Faster than ``.order().head(n)`` for small `n` relative to
the size of the ``Series`` object.

See Also
--------
Series.nlargest

Examples
--------
>>> import pandas as pd
>>> import numpy as np
>>> s = pd.Series(np.random.randn(1e6))
>>> s.nsmallest(10)  # only sorts up to the N requested

order(self, na_last=None, ascending=True, kind='quicksort', na_position='last', inplace=False)

 

Sorts Series object, by value, maintaining index-value link.
This will return a new Series by default. Series.sort is the equivalent but as an inplace method.

Parameters
----------
na_last : boolean (optional, default=True) (DEPRECATED; use na_position)
    Put NaN's at beginning or end
ascending : boolean, default True
    Sort ascending. Passing False sorts descending
kind : {'mergesort', 'quicksort', 'heapsort'}, default 'quicksort'
    Choice of sorting algorithm. See np.sort for more
    information. 'mergesort' is the only stable algorithm
na_position : {'first', 'last'} (optional, default='last')
    'first' puts NaNs at the beginning
    'last' puts NaNs at the end
inplace : boolean, default False
    Do operation in place.

Returns
-------
y : Series

See Also
--------
Series.sort

plot(data, kind='line', ax=None, figsize=None, use_index=True, title=None, grid=None, legend=False, style=None, logx=False, logy=False, loglog=False, xticks=None, yticks=None, xlim=None, ylim=None, rot=None, fontsize=None, colormap=None, table=False, yerr=None, xerr=None, label=None, secondary_y=False, **kwds)

 

Make plots of Series using matplotlib / pylab.

Parameters
----------
data : Series

kind : str
    - 'line' : line plot (default)
    - 'bar' : vertical bar plot
    - 'barh' : horizontal bar plot
    - 'hist' : histogram
    - 'box' : boxplot
    - 'kde' : Kernel Density Estimation plot
    - 'density' : same as 'kde'
    - 'area' : area plot
    - 'pie' : pie plot
    
ax : matplotlib axes object
    If not passed, uses gca()
figsize : a tuple (width, height) in inches
use_index : boolean, default True
    Use index as ticks for x axis
title : string
    Title to use for the plot
grid : boolean, default None (matlab style default)
    Axis grid lines
legend : False/True/'reverse'
    Place legend on axis subplots
style : list or dict
    matplotlib line style per column
logx : boolean, default False
    Use log scaling on x axis
logy : boolean, default False
    Use log scaling on y axis
loglog : boolean, default False
    Use log scaling on both x and y axes
xticks : sequence
    Values to use for the xticks
yticks : sequence
    Values to use for the yticks
xlim : 2-tuple/list
ylim : 2-tuple/list
rot : int, default None
    Rotation for ticks
fontsize : int, default None
    Font size for ticks
colormap : str or matplotlib colormap object, default None
    Colormap to select colors from. If string, load colormap with that name
    from matplotlib.
colorbar : boolean, optional
    If True, plot colorbar (only relevant for 'scatter' and 'hexbin' plots)
position : float
    Specify relative alignments for bar plot layout.
    From 0 (left/bottom-end) to 1 (right/top-end). Default is 0.5 (center)
layout : tuple (optional)
    (rows, columns) for the layout of the plot
table : boolean, Series or DataFrame, default False
    If True, draw a table using the data in the DataFrame and the data will
    be transposed to meet matplotlib's default layout.
    If a Series or DataFrame is passed, use passed data to draw a table.
yerr : DataFrame, Series, array-like, dict and str
    See :ref:`Plotting with Error Bars <visualization.errorbars>` for detail.
xerr : same types as yerr.
label : label argument to provide to plot
secondary_y : boolean or sequence of ints, default False
    If True then y-axis will be on the right
mark_right : boolean, default True
    When using a secondary_y axis, automatically mark the column
    labels with "(right)" in the legend
kwds : keywords
    Options to pass to matplotlib plotting method

Returns
-------
axes : matplotlib.AxesSubplot or np.array of them

Notes
-----

- See matplotlib documentation online for more on this subject
- If `kind` = 'bar' or 'barh', you can specify relative alignments
  for bar plot layout by `position` keyword.
  From 0 (left/bottom-end) to 1 (right/top-end). Default is 0.5 (center)

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 or level name, 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 or level name, 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)

put(self, *args, **kwargs)

 

return a ndarray with the values put

See also
--------
numpy.ndarray.put

quantile(self, q=0.5)

 

Return value at the given quantile, a la numpy.percentile.

Parameters
----------
q : float or array-like, default 0.5 (50% quantile)
    0 <= q <= 1, the quantile(s) to compute

Returns
-------
quantile : float or Series
    if ``q`` is an array, a Series will be returned where the
    index is ``q`` and the values are the quantiles.

Examples
--------

>>> s = Series([1, 2, 3, 4])
>>> s.quantile(.5)
    2.5
>>> s.quantile([.25, .5, .75])
0.25    1.75
0.50    2.50
0.75    3.25
dtype: float64

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, pct=False)

 

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', 'dense'}
    * average: average rank of group
    * min: lowest rank in group
    * max: highest rank in group
    * first: ranks assigned in order they appear in the array
    * dense: like 'min', but rank always increases by 1 between groups
na_option : {'keep'}
    keep: leave NA values where they are
ascending : boolean, default True
    False for ranks by high (1) to low (N)
pct : boolean, default False
    Computes percentage rank of data

Returns
-------
ranks : Series

ravel(self, order='C')

 

Return the flattened underlying data as an ndarray

See also
--------
numpy.ndarray.ravel

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

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)

repeat(self, reps)

 

return a new Series with the values repeated reps times

See also
--------
numpy.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.

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

reshape(self, *args, **kwargs)

 

return an ndarray with the values shape
if the specified shape matches exactly the current shape, then
return self (for compat)

See also
--------
numpy.ndarray.take

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

searchsorted(self, v, side='left', sorter=None)

 
Find indices where elements should be inserted to maintain order.

Find the indices into a sorted Series `self` such that, if the
corresponding elements in `v` were inserted before the indices, the
order of `self` would be preserved.

Parameters
----------
v : array_like
    Values to insert into `a`.
side : {'left', 'right'}, optional
    If 'left', the index of the first suitable location found is given.
    If 'right', return the last such index.  If there is no suitable
    index, return either 0 or N (where N is the length of `a`).
sorter : 1-D array_like, optional
    Optional array of integer indices that sort `self` into ascending
    order. They are typically the result of ``np.argsort``.

Returns
-------
indices : array of ints
    Array of insertion points with the same shape as `v`.

See Also
--------
Series.sort
Series.order
numpy.searchsorted

Notes
-----
Binary search is used to find the required insertion points.

Examples
--------
>>> x = pd.Series([1, 2, 3])
>>> x
0    1
1    2
2    3
dtype: int64
>>> x.searchsorted(4)
array([3])
>>> x.searchsorted([0, 4])
array([0, 3])
>>> x.searchsorted([1, 3], side='left')
array([0, 2])
>>> x.searchsorted([1, 3], side='right')
array([1, 3])
>>> x.searchsorted([1, 2], side='right', sorter=[0, 2, 1])
array([1, 3])

Overrides: base.IndexOpsMixin.searchsorted

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

 


Return unbiased standard error of the mean over requested axis.

Normalized by N-1 by default. This can be changed using the ddof argument

Parameters
----------
axis : {index (0)}
skipna : boolean, default True
    Exclude NA/null values. If an entire row/column is NA, the result
    will be NA
level : int or level name, 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
-------
sem : scalar or Series (if level specified)

set_value(self, label, value, takeable=False)

 

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
takeable : interpret the index as indexers, default False

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 or level name, 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, ascending=True, kind='quicksort', na_position='last', inplace=True)

 

Sort values and index labels by value. This is an inplace sort by default.
Series.order is the equivalent but returns a new Series.

Parameters
----------
axis : int (can only be zero)
ascending : boolean, default True
    Sort ascending. Passing False sorts descending
kind : {'mergesort', 'quicksort', 'heapsort'}, default 'quicksort'
    Choice of sorting algorithm. See np.sort for more
    information. 'mergesort' is the only stable algorithm
na_position : {'first', 'last'} (optional, default='last')
    'first' puts NaNs at the beginning
    'last' puts NaNs at the end
inplace : boolean, default True
    Do operation in place.

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_remaining=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 or level name, default None
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 by default. This can be changed using the ddof argument

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 or level name, 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
-------
std : 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 or level name, 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, is_copy=False)

 

return Series corresponding to requested indices

Parameters
----------
indices : list / array of ints
convert : translate negative to positive indices (default)

Returns
-------
taken : Series

See also
--------
numpy.ndarray.take

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. If None is provided
    the result is returned as a string.
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, 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

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

unstack(self, level=-1)

 

Unstack, a.k.a. pivot, Series with MultiIndex to produce DataFrame.
The level involved will automatically get sorted.

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

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

 


Return unbiased variance over requested axis.

Normalized by N-1 by default. This can be changed using the ddof argument

Parameters
----------
axis : {index (0)}
skipna : boolean, default True
    Exclude NA/null values. If an entire row/column is NA, the result
    will be NA
level : int or level name, 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
-------
var : scalar or Series (if level specified)


Property Details [hide private]

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

dtype

return the dtype object of the underlying data

Get Method:
unreachable.dtype(self) - return the dtype object of the underlying data

dtypes

return the dtype object of the underlying data

Get Method:
unreachable.dtypes(self) - return the dtype object of the underlying data

ftype

return if the data is sparse|dense

Get Method:
unreachable.ftype(self) - return if the data is sparse|dense

ftypes

return if the data is sparse|dense

Get Method:
unreachable.ftypes(self) - return if the data is sparse|dense

imag

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

is_time_series

Get Method:
unreachable.is_time_series(self)

real

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

values


Return Series as ndarray

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

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