Detail: Series: Dictionary-Like
Overview: Series: Dictionary-Like
- Series.__contains__(value)[source]
Inclusion of value in index labels.
- Returns:
bool
>>> s = sf.Series((10, 2, 8), index=('a', 'b', 'c')) >>> s <Series> <Index> a 10 b 2 c 8 <<U1> <int64> >>> s.__contains__('a') True
- Series.__iter__()[source]
Iterator of index labels, same as
static_frame.Series.keys
.- Returns:
Iterator[Hashasble]
>>> s = sf.Series((10, 2, 8), index=('a', 'b', 'c')) >>> s <Series> <Index> a 10 b 2 c 8 <<U1> <int64> >>> tuple(s.__iter__()) ('a', 'b', 'c')
- Series.__reversed__()[source]
Returns a reverse iterator on the series’ index.
- Returns:
>>> s = sf.Series((10, 2, 8), index=('a', 'b', 'c')) >>> s <Series> <Index> a 10 b 2 c 8 <<U1> <int64> >>> tuple(s.__reversed__()) ('c', 'b', 'a')
- Series.get(key, default=None)[source]
Return the value found at the index key, else the default if the key is not found.
- Returns:
Any
>>> s = sf.Series((10, 2, 8), index=('a', 'b', 'c')) >>> s <Series> <Index> a 10 b 2 c 8 <<U1> <int64> >>> s.get('a') 10 >>> s.get('z', -1) -1
- Series.items()[source]
Iterator of pairs of index label and value.
- Returns:
Iterator[Tuple[Hashable, Any]]
>>> s = sf.Series((10, 2, 8), index=('a', 'b', 'c')) >>> s <Series> <Index> a 10 b 2 c 8 <<U1> <int64> >>> tuple(s.items()) (('a', 10), ('b', 2), ('c', 8))
- Series.keys()[source]
Iterator of index labels.
- Returns:
Iterator[TLabel]
>>> s = sf.Series((10, 2, 8), index=('a', 'b', 'c')) >>> s <Series> <Index> a 10 b 2 c 8 <<U1> <int64> >>> s.keys() <Index> a b c <<U1>
- Series.values
>>> s = sf.Series((10, 2, 8), index=('a', 'b', 'c')) >>> s <Series> <Index> a 10 b 2 c 8 <<U1> <int64> >>> s.values [10 2 8]
Series: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Assignment | Selector | Iterator | Operator Binary | Operator Unary | Accessor Values | Accessor Datetime | Accessor String | Accessor Fill Value | Accessor Regular Expression | Accessor Hashlib | Accessor Type Clinic | Accessor Mapping