pandas.Series¶
-
class
pandas.Series(data=None, index=None, dtype=None, name=None, copy=False, fastpath=False)¶ 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
Attributes
Treturn the transpose, which is by definition self atFast label-based scalar accessor axesReturn a list of the row axis labels basereturn the base object if the memory of the underlying data is shared blocksInternal property, property synonym for as_blocks() datareturn the data pointer of the underlying data dtypereturn the dtype object of the underlying data dtypesreturn the dtype object of the underlying data emptyTrue if NDFrame is entirely empty [no items] flagsftypereturn if the data is sparse|dense ftypesreturn if the data is sparse|dense hasnansiatFast integer location scalar accessor. ilocPurely integer-location based indexing for selection by position. imagis_copyis_time_seriesitemsizereturn the size of the dtype of the item of the underlying data ixA primarily label-location based indexer, with integer position fallback. locPurely label-location based indexer for selection by label. nbytesreturn the number of bytes in the underlying data ndimreturn the number of dimensions of the underlying data, by definition 1 realshapereturn a tuple of the shape of the underlying data sizereturn the number of elements in the underlying data stridesreturn the strides of the underlying data valuesReturn Series as ndarray or ndarray-like Methods