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
T
return the transpose, which is by definition self at
Fast label-based scalar accessor axes
Return a list of the row axis labels base
return the base object if the memory of the underlying data is shared blocks
Internal property, property synonym for as_blocks() data
return the data pointer of the underlying data dtype
return the dtype object of the underlying data dtypes
return the dtype object of the underlying data empty
True if NDFrame is entirely empty [no items] flags
ftype
return if the data is sparse|dense ftypes
return if the data is sparse|dense hasnans
iat
Fast integer location scalar accessor. iloc
Purely integer-location based indexing for selection by position. imag
is_copy
is_time_series
itemsize
return the size of the dtype of the item of the underlying data ix
A primarily label-location based indexer, with integer position fallback. loc
Purely label-location based indexer for selection by label. nbytes
return the number of bytes in the underlying data ndim
return the number of dimensions of the underlying data, by definition 1 real
shape
return a tuple of the shape of the underlying data size
return the number of elements in the underlying data strides
return the strides of the underlying data values
Return Series as ndarray or ndarray-like Methods