mars.dataframe.Series¶
- class mars.dataframe.Series(data=None, index=None, dtype=None, name=None, copy=False, chunk_size=None, gpu=None, sparse=None, num_partitions=None)[source]¶
- __init__(data=None, index=None, dtype=None, name=None, copy=False, chunk_size=None, gpu=None, sparse=None, num_partitions=None)[source]¶
Methods
__init__([data, index, dtype, name, copy, …])abs()add(other[, level, fill_value, axis])Return Addition of series and other, element-wise (binary operator add).
add_prefix(prefix)Prefix labels with string prefix.
agg([func, axis])aggregate([func, axis])all([axis, bool_only, skipna, level, …])any([axis, bool_only, skipna, level, …])append(other[, ignore_index, …])apply(func[, convert_dtype, output_type, …])Invoke function on values of Series.
astype(dtype[, copy, errors])Cast a pandas object to a specified dtype
dtype.autocorr([lag])Compute the lag-N autocorrelation.
backfill([axis, inplace, limit, downcast])Synonym for
DataFrame.fillna()withmethod='bfill'.bfill([axis, inplace, limit, downcast])Synonym for
DataFrame.fillna()withmethod='bfill'.cartesian_chunk(right, func[, args])check_monotonic([decreasing, strict])Check if values in the object are monotonic increasing or decreasing.
copy([deep])Make a copy of this object’s indices and data.
copy_from(obj)copy_to(target)corr(other[, method, min_periods])Compute correlation with other Series, excluding missing values.
count([level, combine_size])cummax([axis, skipna])cummin([axis, skipna])cumprod([axis, skipna])cumsum([axis, skipna])describe([percentiles, include, exclude])diff([periods])First discrete difference of element.
div(other[, level, fill_value, axis])Return Floating division of series and other, element-wise (binary operator truediv).
dot(other)Compute the dot product between the Series and the columns of other.
drop([labels, axis, index, columns, level, …])Return Series with specified index labels removed.
drop_duplicates([keep, inplace, method])Return Series with duplicate values removed.
dropna([axis, inplace, how])Return a new Series with missing values removed.
duplicated([keep, method])Indicate duplicate Series values.
eq(other[, level, axis])Return Equal to of series and other, element-wise (binary operator eq).
ewm([com, span, halflife, alpha, …])Provide exponential weighted functions.
execute([session])expanding([min_periods, center, axis])Provide expanding transformations.
explode([ignore_index])Transform each element of a list-like to a row.
ffill([axis, inplace, limit, downcast])Synonym for
DataFrame.fillna()withmethod='ffill'.fillna([value, method, axis, inplace, …])Fill NA/NaN values using the specified method.
floordiv(other[, level, fill_value, axis])Return Integer division of series and other, element-wise (binary operator floordiv).
from_tensor(in_tensor[, index, name])ge(other[, level, axis])Return Greater than or equal to of series and other, element-wise (binary operator ge).
groupby([by, level, as_index, sort, group_keys])gt(other[, level, axis])Return Greater than of series and other, element-wise (binary operator gt).
head([n])Return the first n rows.
isin(values)Whether elements in Series are contained in values.
isna()Detect missing values.
isnull()Detect missing values.
items([batch_size, session])Lazily iterate over (index, value) tuples.
iteritems([batch_size, session])Lazily iterate over (index, value) tuples.
keys()Return alias for index.
kurt([axis, skipna, level, combine_size, …])kurtosis([axis, skipna, level, …])le(other[, level, axis])Return Less than or equal to of series and other, element-wise (binary operator le).
lt(other[, level, axis])Return Less than of series and other, element-wise (binary operator lt).
map(arg[, na_action, dtype, memory_scale])Map values of Series according to input correspondence.
map_chunk(func[, args])Apply function to each chunk.
mask(cond[, other, inplace, axis, level, …])Replace values where the condition is True.
max([axis, skipna, level, combine_size, method])mean([axis, skipna, level, combine_size, method])memory_usage([index, deep])Return the memory usage of the Series.
min([axis, skipna, level, combine_size, method])mod(other[, level, fill_value, axis])Return Modulo of series and other, element-wise (binary operator mod).
mul(other[, level, fill_value, axis])Return Multiplication of series and other, element-wise (binary operator mul).
multiply(other[, level, fill_value, axis])Return Multiplication of series and other, element-wise (binary operator mul).
ne(other[, level, axis])Return Not equal to of series and other, element-wise (binary operator ne).
notna()Detect existing (non-missing) values.
notnull()Detect existing (non-missing) values.
nunique([dropna, combine_size])Return number of unique elements in the object.
pad([axis, inplace, limit, downcast])Synonym for
DataFrame.fillna()withmethod='ffill'.pct_change([periods, fill_method, limit, freq])Percentage change between the current and a prior element.
pow(other[, level, fill_value, axis])Return Exponential power of series and other, element-wise (binary operator pow).
prod([axis, skipna, level, min_count, …])product([axis, skipna, level, min_count, …])quantile([q, interpolation])Return value at the given quantile.
radd(other[, level, fill_value, axis])Return Addition of series and other, element-wise (binary operator radd).
rdiv(other[, level, fill_value, axis])Return Floating division of series and other, element-wise (binary operator rtruediv).
rebalance([factor, axis, num_partitions, …])Make Data more balanced across entire cluster.
rechunk(chunk_size[, threshold, …])reindex(*args, **kwargs)Conform Series/DataFrame to new index with optional filling logic.
reindex_like(other[, method, copy, limit, …])Return an object with matching indices as other object.
rename([index, axis, copy, inplace, level, …])Alter Series index labels or name.
rename_axis([mapper, index, columns, axis, …])Set the name of the axis for the index or columns.
replace([to_replace, value, inplace, limit, …])Replace values given in to_replace with value.
reset_index([level, drop, name, inplace, …])Generate a new DataFrame or Series with the index reset.
rfloordiv(other[, level, fill_value, axis])Return Integer division of series and other, element-wise (binary operator rfloordiv).
rmod(other[, level, fill_value, axis])Return Modulo of series and other, element-wise (binary operator rmod).
rmul(other[, level, fill_value, axis])Return Multiplication of series and other, element-wise (binary operator rmul).
rolling(window[, min_periods, center, …])Provide rolling window calculations.
round([decimals])Round each value in a Series to the given number of decimals.
rpow(other[, level, fill_value, axis])Return Exponential power of series and other, element-wise (binary operator rpow).
rsub(other[, level, fill_value, axis])Return Subtraction of series and other, element-wise (binary operator rsubtract).
rtruediv(other[, level, fill_value, axis])Return Floating division of series and other, element-wise (binary operator rtruediv).
sample([n, frac, replace, weights, …])Return a random sample of items from an axis of object.
sem([axis, skipna, level, ddof, …])set_axis(labels[, axis, inplace])Assign desired index to given axis.
shift([periods, freq, axis, fill_value])Shift index by desired number of periods with an optional time freq.
skew([axis, skipna, level, combine_size, …])sort_index([axis, level, ascending, …])Sort object by labels (along an axis).
sort_values([axis, ascending, inplace, …])Sort by the values.
std([axis, skipna, level, ddof, …])sub(other[, level, fill_value, axis])Return Subtraction of series and other, element-wise (binary operator subtract).
sum([axis, skipna, level, min_count, …])tail([n])Return the last n rows.
tiles()to_cpu()to_csv(path[, sep, na_rep, float_format, …])Write object to a comma-separated values (csv) file.
to_dict([into, batch_size, session])Convert Series to {label -> value} dict or dict-like object.
to_frame([name])Convert Series to DataFrame.
to_gpu()to_pandas([session])to_sql(name, con[, schema, if_exists, …])Write records stored in a DataFrame to a SQL database.
to_tensor([dtype])transform(func[, convert_dtype, axis, dtype])Call
funcon self producing a Series with transformed values.truediv(other[, level, fill_value, axis])Return Floating division of series and other, element-wise (binary operator truediv).
tshift([periods, freq, axis])Shift the time index, using the index’s frequency if available.
unique([method])Uniques are returned in order of appearance.
value_counts([normalize, sort, ascending, …])Return a Series containing counts of unique values.
var([axis, skipna, level, ddof, …])where(cond[, other, inplace, axis, level, …])Replace values where the condition is False.
Attributes
Access a single value for a row/column label pair.
dataReturn the dtype object of the underlying data.
The index (axis labels) of the Series.
Return boolean scalar if values in the object are monotonic_increasing.
Return boolean scalar if values in the object are monotonic_decreasing.
Return boolean scalar if values in the object are monotonic_increasing.
Return an int representing the number of axes / array dimensions.
sizetype_namevalues