graviti.dataframe.row.series
#
The implementation of the Graviti Series.
Module Contents#
Classes#
One-dimensional array. |
- class graviti.dataframe.row.series.Series(data=None, schema=None, index=None)[source]#
One-dimensional array.
- Parameters
Examples
Constructing Series from a list.
>>> d = {"filename": "a.jpg", "attributes": {"color": "red", "pose": "frontal"}} >>> series = Series(data=d) >>> series filename a.jpg attributes color red pose frontal
- property iloc(self)[source]#
Purely integer-location based indexing for selection by position.
Allowed inputs are:
An integer, e.g.
5
.A list or array of integers, e.g.
[4, 3, 0]
.A slice object with ints, e.g.
1:7
.A boolean array of the same length as the axis being sliced.
- Returns
The instance of the ILocIndexer.
- Return type
Examples
>>> series = Series([1, 2, 3]) >>> series.loc[0] 1 >>> df.loc[[0]] 0 1 dtype: int64
- property loc(self)[source]#
Access a group of rows and columns by indexes or a boolean array.
Allowed inputs are:
A single index, e.g.
5
.A list or array of indexes, e.g.
[4, 3, 0]
.A slice object with indexes, e.g.
1:7
.A boolean array of the same length as the axis being sliced.
- Returns
The instance of the LocIndexer.
- Return type
Examples
>>> series = Series([1, 2, 3]) >>> series.loc[0] 1 >>> df.loc[[0]] 0 1 dtype: int64