toypandas.series

Descizione modulo

Module Contents

Classes

Series

Represenation of a series of values (usually a column).

Locating_s

Index-based locator for Series

class toypandas.series.Series(*args)

Bases: pandas.core.series.Series

Represenation of a series of values (usually a column).

property indexlocate: Locating_s

Locate an element by index.

Returns:

The element.

Return type:

Locating_s

__add__(other)

Sums two series row by row.

Parameters:

other – The other series to sum.

Returns:

A new series in which each value is the sum of the two rows.

Return type:

Series

__getitem__(match)

Returns only the rows matching the argument.

Parameters:

match (pandas.core.series.Series) – A Series of booleans (True/False). If an element is True, it will be returned.

Returns:

A new Series with only the elements matching the argument.

Return type:

Series

apply(function)

Apply a function of each value of the Series.

Parameters:

function – Function to apply to each element.

Returns:

The resulting Series.

Return type:

Series

append(elem)

Appends a value at the end of the Series.

Parameters:

elem – The value to append.

drop(index=None)

Removes a given element from the Series.

Parameters:

elem – The index of the element to remove. If not specified, remove the last element.

astype(dtype)

Cast a Series to type dtype.

Parameters:

dtype – Data type

Returns:

This Series, properly cast.

Return type:

Series

dropna()

Removes all NaN values.

Returns:

This Series, without NaN values.

Return type:

Series

show()

descr

fillna(value)

Fill missing values with the given value.

Parameters:

value – Value to use to fill holes.

class toypandas.series.Locating_s(val)

Bases: pandas.core.indexing._iLocIndexer

Index-based locator for Series

__getitem__(*args)

Return the element(s) in the required position(s).

Parameters:

args – Index of the row to return or condition to apply to whole Series.

Returns:

The element(s) in the required position(s).

__setitem__(*args)

Set the given position to the given value.

Parameters:

args – Position and new value.

Returns:

The Series.

Return type:

Series