Base Query Compiler¶
Brief description¶
BaseQueryCompiler
is an abstract class of query compiler, and sets a common interface
that every other query compiler implementation in Modin must follow. The Base class contains a basic
implementations for most of the interface methods, all of which
default to pandas.
Subclassing BaseQueryCompiler
¶
If you want to add new type of query compiler to Modin the new class needs to inherit
from BaseQueryCompiler
and implement the abstract methods:
from_pandas()
build query compiler from pandas DataFrame.from_arrow()
build query compiler from Arrow Table.to_pandas()
get query compiler representation as pandas DataFrame.default_to_pandas()
do fallback to pandas for the passed function.finalize()
finalize object constructing.free()
trigger memory cleaning.
(Please refer to the code documentation to see the full documentation for these functions).
This is a minimum set of operations to ensure a new query compiler will function in the Modin architecture, and the rest of the API can safely default to the pandas implementation via the base class implementation. To add a backend-specific implementation for some of the query compiler operations, just override the corresponding method in your query compiler class.
Example¶
As an exercise let’s define a new query compiler in Modin, just to see how easy it is. Usually, the query compiler routes formed queries to the underlying frame class, which submits operators to an execution engine. For the sake of simplicity and independence of this example, our execution engine will be the pandas itself.
We need to inherit a new class from BaseQueryCompiler
and implement all of the abstract methods.
In this case, with pandas as an execution engine, it’s trivial:
from modin.backends import BaseQueryCompiler
class DefaultToPandasQueryCompiler(BaseQueryCompiler):
def __init__(self, pandas_df):
self._pandas_df = pandas_df
@classmethod
def from_pandas(cls, df, *args, **kwargs):
return cls(df)
@classmethod
def from_arrow(cls, at, *args, **kwargs):
return cls(at.to_pandas())
def to_pandas(self):
return self._pandas_df.copy()
def default_to_pandas(self, pandas_op, *args, **kwargs):
return type(self)(pandas_op(self.to_pandas(), *args, **kwargs))
def finalize(self):
pass
def free(self):
pass
All done! Now you’ve got a fully functional query compiler, which is ready for extensions and already can be used in Modin DataFrame:
import pandas
pandas_df = pandas.DataFrame({"col1": [1, 2, 2, 1], "col2": [10, 2, 3, 40]})
# Building our query compiler from pandas object
qc = DefaultToPandasQueryCompiler.from_pandas(pandas_df)
import modin.pandas as pd
# Building Modin DataFrame from newly created query compiler
modin_df = pd.DataFrame(query_compiler=qc)
# Got fully functional Modin DataFrame
>>> print(modin_df.groupby("col1").sum().reset_index())
col1 col2
0 1 50
1 2 5
To be able to select this query compiler as default via modin.config
you also need
to define the combination of your query compiler and pandas execution engine as a backend
by adding the corresponding factory. To find more information about factories,
visit corresponding section of the flow documentation.
Query Compiler API¶
- class modin.backends.base.query_compiler.BaseQueryCompiler¶
Abstract class that handles the queries to Modin dataframes.
This class defines common query compilers API, most of the methods are already implemented and defaulting to pandas.
- lazy_execution¶
Whether underlying execution engine is designed to be executed in a lazy mode only. If True, such QueryCompiler will be handled differently at the front-end in order to reduce execution triggering as much as possible.
- Type
bool
Notes
See the Abstract Methods and Fields section immediately below this for a list of requirements for subclassing this object.
- abs()¶
Get absolute numeric value of each element.
- Returns
QueryCompiler with absolute numeric value of each element.
- Return type
- add(other, **kwargs)¶
Perform element-wise addition (
self + other
).If axes are not equal, perform frames alignment first.
- Parameters
other (BaseQueryCompiler, scalar or array-like) – Other operand of the binary operation.
broadcast (bool, default: False) – If other is a one-column query compiler, indicates whether it is a Series or not. Frames and Series have to be processed differently, however we can’t distinguish them at the query compiler level, so this parameter is a hint that is passed from a high-level API.
level (int or label) – In case of MultiIndex match index values on the passed level.
axis ({{0, 1}}) – Axis to match indices along for 1D other (list or QueryCompiler that represents Series). 0 is for index, when 1 is for columns.
fill_value (float or None) – Value to fill missing elements during frame alignment.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Result of binary operation.
- Return type
- add_prefix(prefix, axis=1)¶
Add string prefix to the index labels along specified axis.
- Parameters
prefix (str) – The string to add before each label.
axis ({0, 1}, default: 1) – Axis to add prefix along. 0 is for index and 1 is for columns.
- Returns
New query compiler with updated labels.
- Return type
- add_suffix(suffix, axis=1)¶
Add string suffix to the index labels along specified axis.
- Parameters
suffix (str) – The string to add after each label.
axis ({0, 1}, default: 1) – Axis to add suffix along. 0 is for index and 1 is for columns.
- Returns
New query compiler with updated labels.
- Return type
- all(**kwargs)¶
Return whether all the elements are true, potentially over an axis.
- Parameters
axis ({0, 1}, optional) –
bool_only (bool, optional) –
skipna (bool) –
level (int or label) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
If axis was specified return one-column QueryCompiler with index labels of the specified axis, where each row contains boolean of whether all elements at the corresponding row or column are True. Otherwise return QueryCompiler with a single bool of whether all elements are True.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.all
for more information about parameters and output format.
- any(**kwargs)¶
Return whether any element is true, potentially over an axis.
- Parameters
axis ({0, 1}, optional) –
bool_only (bool, optional) –
skipna (bool) –
level (int or label) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
If axis was specified return one-column QueryCompiler with index labels of the specified axis, where each row contains boolean of whether any element at the corresponding row or column is True. Otherwise return QueryCompiler with a single bool of whether any element is True.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.any
for more information about parameters and output format.
- apply(func, axis, *args, **kwargs)¶
Apply passed function across given axis.
- Parameters
func (callable(pandas.Series) -> scalar, str, list or dict of such) – The function to apply to each column or row.
axis ({0, 1}) – Target axis to apply the function along. 0 is for index, 1 is for columns.
*args (iterable) – Positional arguments to pass to func.
**kwargs (dict) – Keyword arguments to pass to func.
- Returns
QueryCompiler that contains the results of execution and is built by the following rules:
Labels of specified axis are the passed functions names.
Labels of the opposite axis are preserved.
Each element is the result of execution of func against corresponding row/column.
- Return type
- applymap(func)¶
Apply passed function elementwise.
- Parameters
func (callable(scalar) -> scalar) – Function to apply to each element of the QueryCompiler.
- Returns
Transformed QueryCompiler.
- Return type
- astype(col_dtypes, **kwargs)¶
Convert columns dtypes to given dtypes.
- Parameters
col_dtypes (dict) – Map for column names and new dtypes.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler with updated dtypes.
- Return type
- cat_codes()¶
Convert underlying categories data into its codes.
- Returns
New QueryCompiler containing the integer codes of the underlying categories.
- Return type
Notes
Please refer to
modin.pandas.Series.cat.codes
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- clip(lower, upper, **kwargs)¶
Trim values at input threshold.
- Parameters
lower (float or list-like) –
upper (float or list-like) –
axis ({0, 1}) –
inplace ({False}) – This parameter serves the compatibility purpose. Always has to be False.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
QueryCompiler with values limited by the specified thresholds.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.clip
for more information about parameters and output format.
- columnarize()¶
Transpose this QueryCompiler if it has a single row but multiple columns.
This method should be called for QueryCompilers representing a Series object, i.e.
self.is_series_like()
should be True.- Returns
Transposed new QueryCompiler or self.
- Return type
- combine(other, **kwargs)¶
Perform column-wise combine with another QueryCompiler with passed func.
If axes are not equal, perform frames alignment first.
- Parameters
other (BaseQueryCompiler) – Left operand of the binary operation.
func (callable(pandas.Series, pandas.Series) -> pandas.Series) – Function that takes two
pandas.Series
with aligned axes and returns onepandas.Series
as resulting combination.fill_value (float or None) – Value to fill missing values with after frame alignment occurred.
overwrite (bool) – If True, columns in self that do not exist in other will be overwritten with NaNs.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Result of combine.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.combine
for more information about parameters and output format.
- combine_first(other, **kwargs)¶
Fill null elements of self with value in the same location in other.
If axes are not equal, perform frames alignment first.
- Parameters
other (BaseQueryCompiler) – Provided frame to use to fill null values from.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
- Return type
Notes
Please refer to
modin.pandas.DataFrame.combine_first
for more information about parameters and output format.
- compare(other, align_axis, keep_shape, keep_equal)¶
Compare data of two QueryCompilers and highlight the difference.
- Parameters
other (BaseQueryCompiler) – Query compiler to compare with. Have to be the same shape and the same labeling as self.
align_axis ({0, 1}) –
keep_shape (bool) –
keep_equal (bool) –
- Returns
New QueryCompiler containing the differences between self and passed query compiler.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.compare
for more information about parameters and output format.
- concat(axis, other, **kwargs)¶
Concatenate self with passed query compilers along specified axis.
- Parameters
axis ({0, 1}) – Axis to concatenate along. 0 is for index and 1 is for columns.
other (BaseQueryCompiler or list of such) – Objects to concatenate with self.
join ({'outer', 'inner', 'right', 'left'}, default: 'outer') – Type of join that will be used if indices on the other axis are different. (note: if specified, has to be passed as
join=value
).ignore_index (bool, default: False) – If True, do not use the index values along the concatenation axis. The resulting axis will be labeled 0, …, n - 1. (note: if specified, has to be passed as
ignore_index=value
).sort (bool, default: False) – Whether or not to sort non-concatenation axis. (note: if specified, has to be passed as
sort=value
).**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Concatenated objects.
- Return type
- conj(**kwargs)¶
Get the complex conjugate for every element of self.
- Parameters
**kwargs (dict) –
- Returns
QueryCompiler with conjugate applied element-wise.
- Return type
Notes
Please refer to
numpy.conj
for parameters description.
- copy()¶
Make a copy of this object.
- Returns
Copy of self.
- Return type
Notes
For copy, we don’t want a situation where we modify the metadata of the copies if we end up modifying something here. We copy all of the metadata to prevent that.
- corr(**kwargs)¶
Compute pairwise correlation of columns, excluding NA/null values.
- Parameters
method ({'pearson', 'kendall', 'spearman'} or callable(pandas.Series, pandas.Series) -> pandas.Series) – Correlation method.
min_periods (int) – Minimum number of observations required per pair of columns to have a valid result. If fewer than min_periods non-NA values are present the result will be NA.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Correlation matrix.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.corr
for more information about parameters and output format.
- count(**kwargs)¶
Get the number of non-NaN values for each column or row.
- Parameters
axis ({{0, 1}}) –
level (None, default: None) – Serves the compatibility purpose. Always has to be None.
numeric_only (bool, optional) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
One-column QueryCompiler with index labels of the specified axis, where each row contains the number of non-NaN values for the corresponding row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.count
for more information about parameters and output format.
- cov(**kwargs)¶
Compute pairwise covariance of columns, excluding NA/null values.
- Parameters
min_periods (int) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Covariance matrix.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.cov
for more information about parameters and output format.
- cummax(**kwargs)¶
Get cummulative maximum for every row or column.
- Parameters
axis ({0, 1}) –
skipna (bool) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
QueryCompiler of the same shape as self, where each element is the maximum of all the previous values in this row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.cummax
for more information about parameters and output format.
- cummin(**kwargs)¶
Get cummulative minimum for every row or column.
- Parameters
axis ({0, 1}) –
skipna (bool) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
QueryCompiler of the same shape as self, where each element is the minimum of all the previous values in this row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.cummin
for more information about parameters and output format.
- cumprod(**kwargs)¶
Get cummulative product for every row or column.
- Parameters
axis ({0, 1}) –
skipna (bool) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
QueryCompiler of the same shape as self, where each element is the product of all the previous values in this row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.cumprod
for more information about parameters and output format.
- cumsum(**kwargs)¶
Get cummulative sum for every row or column.
- Parameters
axis ({0, 1}) –
skipna (bool) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
QueryCompiler of the same shape as self, where each element is the sum of all the previous values in this row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.cumsum
for more information about parameters and output format.
- abstract default_to_pandas(pandas_op, *args, **kwargs)¶
Do fallback to pandas for the passed function.
- Parameters
pandas_op (callable(pandas.DataFrame) -> object) – Function to apply to the casted to pandas frame.
*args (iterable) – Positional arguments to pass to pandas_op.
**kwargs (dict) – Key-value arguments to pass to pandas_op.
- Returns
The result of the pandas_op, converted back to
BaseQueryCompiler
.- Return type
- delitem(key)¶
Drop key column.
- Parameters
key (label) – Column name to drop.
- Returns
New QueryCompiler without key column.
- Return type
- describe(**kwargs)¶
Generate descriptive statistics.
- Parameters
percentiles (list-like) –
include ("all" or list of dtypes, optional) –
exclude (list of dtypes, optional) –
datetime_is_numeric (bool) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
QueryCompiler object containing the descriptive statistics of the underlying data.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.describe
for more information about parameters and output format.
- df_update(other, **kwargs)¶
Update values of self using non-NA values of other at the corresponding positions.
If axes are not equal, perform frames alignment first.
- Parameters
other (BaseQueryCompiler) – Frame to grab replacement values from.
join ({"left"}) – Specify type of join to align frames if axes are not equal (note: currently only one type of join is implemented).
overwrite (bool) – Whether to overwrite every corresponding value of self, or only if it’s NAN.
filter_func (callable(pandas.Series, pandas.Series) -> numpy.ndarray<bool>) – Function that takes column of the self and return bool mask for values, that should be overwriten in the self frame.
errors ({"raise", "ignore"}) – If “raise”, will raise a
ValueError
if self and other both contain non-NA data in the same place.**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler with updated values.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.update
for more information about parameters and output format.
- diff(**kwargs)¶
First discrete difference of element.
- Parameters
periods (int) –
axis ({0, 1}) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
QueryCompiler of the same shape as self, where each element is the difference between the corresponding value and the previous value in this row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.diff
for more information about parameters and output format.
- dot(other, **kwargs)¶
Compute the matrix multiplication of self and other.
- Parameters
other (BaseQueryCompiler or NumPy array) – The other query compiler or NumPy array to matrix multiply with self.
squeeze_self (boolean) – If self is a one-column query compiler, indicates whether it represents Series object.
squeeze_other (boolean) – If other is a one-column query compiler, indicates whether it represents Series object.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
A new query compiler that contains result of the matrix multiply.
- Return type
- drop(index=None, columns=None)¶
Drop specified rows or columns.
- Parameters
index (list of labels, optional) – Labels of rows to drop.
columns (list of labels, optional) – Labels of columns to drop.
- Returns
New QueryCompiler with removed data.
- Return type
- dropna(**kwargs)¶
Remove missing values.
- Parameters
axis ({0, 1}) –
how ({"any", "all"}) –
thresh (int, optional) –
subset (list of labels) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler with null values dropped along given axis.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.dropna
for more information about parameters and output format.
- dt_ceil(freq, ambiguous='raise', nonexistent='raise')¶
Perform ceil operation on the underlying time-series data to the specified freq.
- Parameters
freq (str) –
ambiguous ({"raise", "infer", "NaT"} or bool mask, default: "raise") –
nonexistent ({"raise", "shift_forward", "shift_backward", "NaT"} or timedelta, default: "raise") –
- Returns
New QueryCompiler with performed ceil operation on every element.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.ceil
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_components()¶
Spread each date-time value into its components (days, hours, minutes…).
- Returns
- Return type
Notes
Please refer to
modin.pandas.Series.dt.components
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_date()¶
Get the date without timezone information for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is the date without timezone information for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.date
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_day()¶
Get day component for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is day component for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.day
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_day_name(locale=None)¶
Get day name for each datetime value.
- Parameters
locale (str, optional) –
- Returns
New QueryCompiler with the same shape as self, where each element is day name for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.day_name
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_dayofweek()¶
Get integer day of week for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is integer day of week for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.dayofweek
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_dayofyear()¶
Get day of year for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is day of year for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.dayofyear
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_days()¶
Get days for each interval value.
- Returns
New QueryCompiler with the same shape as self, where each element is days for the corresponding interval value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.days
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_days_in_month()¶
Get number of days in month for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is number of days in month for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.days_in_month
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_daysinmonth()¶
Get number of days in month for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is number of days in month for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.daysinmonth
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_end_time()¶
Get the timestamp of end time for each period value.
- Returns
New QueryCompiler with the same shape as self, where each element is the timestamp of end time for the corresponding period value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.end_time
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_floor(freq, ambiguous='raise', nonexistent='raise')¶
Perform floor operation on the underlying time-series data to the specified freq.
- Parameters
freq (str) –
ambiguous ({"raise", "infer", "NaT"} or bool mask, default: "raise") –
nonexistent ({"raise", "shift_forward", "shift_backward", "NaT"} or timedelta, default: "raise") –
- Returns
New QueryCompiler with performed floor operation on every element.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.floor
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_freq()¶
Get the time frequency of the underlying time-series data.
- Returns
QueryCompiler containing a single value, the frequency of the data.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.freq
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_hour()¶
Get hour for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is hour for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.hour
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_is_leap_year()¶
Get the boolean of whether corresponding year is leap for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is the boolean of whether corresponding year is leap for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.is_leap_year
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_is_month_end()¶
Get the boolean of whether the date is the last day of the month for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is the boolean of whether the date is the last day of the month for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.is_month_end
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_is_month_start()¶
Get the boolean of whether the date is the first day of the month for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is the boolean of whether the date is the first day of the month for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.is_month_start
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_is_quarter_end()¶
Get the boolean of whether the date is the last day of the quarter for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is the boolean of whether the date is the last day of the quarter for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.is_quarter_end
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_is_quarter_start()¶
Get the boolean of whether the date is the first day of the quarter for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is the boolean of whether the date is the first day of the quarter for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.is_quarter_start
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_is_year_end()¶
Get the boolean of whether the date is the last day of the year for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is the boolean of whether the date is the last day of the year for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.is_year_end
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_is_year_start()¶
Get the boolean of whether the date is the first day of the year for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is the boolean of whether the date is the first day of the year for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.is_year_start
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_microsecond()¶
Get microseconds component for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is microseconds component for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.microsecond
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_microseconds()¶
Get microseconds component for each interval value.
- Returns
New QueryCompiler with the same shape as self, where each element is microseconds component for the corresponding interval value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.microseconds
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_minute()¶
Get minute component for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is minute component for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.minute
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_month()¶
Get month component for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is month component for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.month
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_month_name(locale=None)¶
Get the month name for each datetime value.
- Parameters
locale (str, optional) –
- Returns
New QueryCompiler with the same shape as self, where each element is the month name for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.month name
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_nanosecond()¶
Get nanoseconds component for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is nanoseconds component for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.nanosecond
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_nanoseconds()¶
Get nanoseconds component for each interval value.
- Returns
New QueryCompiler with the same shape as self, where each element is nanoseconds component for the corresponding interval value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.nanoseconds
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_normalize()¶
Set the time component of each date-time value to midnight.
- Returns
New QueryCompiler containing date-time values with midnight time.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.normalize
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_quarter()¶
Get quarter component for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is quarter component for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.quarter
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_qyear()¶
Get the fiscal year for each period value.
- Returns
New QueryCompiler with the same shape as self, where each element is the fiscal year for the corresponding period value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.qyear
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_round(freq, ambiguous='raise', nonexistent='raise')¶
Perform round operation on the underlying time-series data to the specified freq.
- Parameters
freq (str) –
ambiguous ({"raise", "infer", "NaT"} or bool mask, default: "raise") –
nonexistent ({"raise", "shift_forward", "shift_backward", "NaT"} or timedelta, default: "raise") –
- Returns
New QueryCompiler with performed round operation on every element.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.round
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_second()¶
Get seconds component for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is seconds component for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.second
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_seconds()¶
Get seconds component for each interval value.
- Returns
New QueryCompiler with the same shape as self, where each element is seconds component for the corresponding interval value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.seconds
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_start_time()¶
Get the timestamp of start time for each period value.
- Returns
New QueryCompiler with the same shape as self, where each element is the timestamp of start time for the corresponding period value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.start_time
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_strftime(date_format)¶
Format underlying date-time data using specified format.
- Parameters
date_format (str) –
- Returns
New QueryCompiler containing formated date-time values.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.strftime
for more information about parameters and output format.
- dt_time()¶
Get time component for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is time component for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.time
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_timetz()¶
Get time component with timezone information for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is time component with timezone information for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.timetz
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_to_period(freq=None)¶
Convert underlying data to the period at a particular frequency.
- Parameters
freq (str, optional) –
- Returns
New QueryCompiler containing period data.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.to_period
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_to_pydatetime()¶
Convert underlying data to array of python native
datetime
.- Returns
New QueryCompiler containing 1D array of
datetime
objects.- Return type
Notes
Please refer to
modin.pandas.Series.dt.to_pydatetime
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_to_pytimedelta()¶
Convert underlying data to array of python native
datetime.timedelta
.- Returns
New QueryCompiler containing 1D array of
datetime.timedelta
.- Return type
Notes
Please refer to
modin.pandas.Series.dt.to_pytimedelta
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_to_timestamp()¶
Get the timestamp representation for each period value.
- Returns
New QueryCompiler with the same shape as self, where each element is the timestamp representation for the corresponding period value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.to_timestamp
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_total_seconds()¶
Get duration in seconds for each interval value.
- Returns
New QueryCompiler with the same shape as self, where each element is duration in seconds for the corresponding interval value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.total_seconds
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_tz()¶
Get the time-zone of the underlying time-series data.
- Returns
QueryCompiler containing a single value, time-zone of the data.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.tz
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_tz_convert(tz)¶
Convert time-series data to the specified time zone.
- Parameters
tz (str, pytz.timezone) –
- Returns
New QueryCompiler containing values with converted time zone.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.tz_convert
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_tz_localize(tz, ambiguous='raise', nonexistent='raise')¶
Localize tz-naive to tz-aware.
- Parameters
tz (str, pytz.timezone, optional) –
ambiguous ({"raise", "inner", "NaT"} or bool mask, default: "raise") –
nonexistent ({"raise", "shift_forward", "shift_backward, "NaT"} or pandas.timedelta, default: "raise") –
- Returns
New QueryCompiler containing values with localized time zone.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.tz_localize
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_week()¶
Get week component for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is week component for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.week
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_weekday()¶
Get integer day of week for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is integer day of week for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.weekday
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_weekofyear()¶
Get week of year for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is week of year for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.weekofyear
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- dt_year()¶
Get year component for each datetime value.
- Returns
New QueryCompiler with the same shape as self, where each element is year component for the corresponding datetime value.
- Return type
Notes
Please refer to
modin.pandas.Series.dt.year
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- property dtypes¶
Get columns dtypes.
- Returns
Series with dtypes of each column.
- Return type
pandas.Series
- eq(other, **kwargs)¶
Perform element-wise equality comparison (
self == other
).If axes are not equal, perform frames alignment first.
- Parameters
other (BaseQueryCompiler, scalar or array-like) – Other operand of the binary operation.
broadcast (bool, default: False) – If other is a one-column query compiler, indicates whether it is a Series or not. Frames and Series have to be processed differently, however we can’t distinguish them at the query compiler level, so this parameter is a hint that is passed from a high-level API.
level (int or label) – In case of MultiIndex match index values on the passed level.
axis ({{0, 1}}) – Axis to match indices along for 1D other (list or QueryCompiler that represents Series). 0 is for index, when 1 is for columns.
fill_value (float or None) – Value to fill missing elements during frame alignment.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Result of binary operation.
- Return type
- eval(expr, **kwargs)¶
Evaluate string expression on QueryCompiler columns.
- Parameters
expr (str) –
**kwargs (dict) –
- Returns
QueryCompiler containing the result of evaluation.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.eval
for more information about parameters and output format.
- fillna(**kwargs)¶
Replace NaN values using provided method.
- Parameters
value (scalar or dict) –
method ({"backfill", "bfill", "pad", "ffill", None}) –
axis ({0, 1}) –
inplace ({False}) – This parameter serves the compatibility purpose. Always has to be False.
limit (int, optional) –
downcast (dict, optional) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler with all null values filled.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.fillna
for more information about parameters and output format.
- abstract finalize()¶
Finalize constructing the dataframe calling all deferred functions which were used to build it.
- first_valid_index()¶
Return index label of first non-NaN/NULL value.
- Returns
- Return type
scalar
- floordiv(other, **kwargs)¶
Perform element-wise integer division (
self // other
).If axes are not equal, perform frames alignment first.
- Parameters
other (BaseQueryCompiler, scalar or array-like) – Other operand of the binary operation.
broadcast (bool, default: False) – If other is a one-column query compiler, indicates whether it is a Series or not. Frames and Series have to be processed differently, however we can’t distinguish them at the query compiler level, so this parameter is a hint that is passed from a high-level API.
level (int or label) – In case of MultiIndex match index values on the passed level.
axis ({{0, 1}}) – Axis to match indices along for 1D other (list or QueryCompiler that represents Series). 0 is for index, when 1 is for columns.
fill_value (float or None) – Value to fill missing elements during frame alignment.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Result of binary operation.
- Return type
- abstract free()¶
Trigger a cleanup of this object.
- abstract classmethod from_arrow(at, data_cls)¶
Build QueryCompiler from Arrow Table.
- Parameters
at (Arrow Table) – The Arrow Table to convert from.
data_cls (type) –
BasePandasFrame
class (or its descendant) to convert to.
- Returns
QueryCompiler containing data from the pandas DataFrame.
- Return type
- abstract classmethod from_pandas(df, data_cls)¶
Build QueryCompiler from pandas DataFrame.
- Parameters
df (pandas.DataFrame) – The pandas DataFrame to convert from.
data_cls (type) –
BasePandasFrame
class (or its descendant) to convert to.
- Returns
QueryCompiler containing data from the pandas DataFrame.
- Return type
- ge(other, **kwargs)¶
Perform element-wise greater than or equal comparison (
self >= other
).If axes are not equal, perform frames alignment first.
- Parameters
other (BaseQueryCompiler, scalar or array-like) – Other operand of the binary operation.
broadcast (bool, default: False) – If other is a one-column query compiler, indicates whether it is a Series or not. Frames and Series have to be processed differently, however we can’t distinguish them at the query compiler level, so this parameter is a hint that is passed from a high-level API.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Result of binary operation.
- Return type
- get_axis(axis)¶
Return index labels of the specified axis.
- Parameters
axis ({0, 1}) – Axis to return labels on. 0 is for index, when 1 is for columns.
- Returns
- Return type
pandas.Index
- get_dummies(columns, **kwargs)¶
Convert categorical variables to dummy variables for certain columns.
- Parameters
columns (label or list of such) – Columns to convert.
prefix (str or list of such) –
prefix_sep (str) –
dummy_na (bool) –
drop_first (bool) –
dtype (dtype) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler with categorical variables converted to dummy.
- Return type
Notes
Please refer to
modin.pandas.get_dummies
for more information about parameters and output format.
- get_index_name(axis=0)¶
Get index name of specified axis.
- Parameters
axis ({0, 1}, default: 0) – Axis to get index name on.
- Returns
Index name, None for MultiIndex.
- Return type
hashable
- get_index_names(axis=0)¶
Get index names of specified axis.
- Parameters
axis ({0, 1}, default: 0) – Axis to get index names on.
- Returns
Index names.
- Return type
list
- getitem_array(key)¶
Mask QueryCompiler with key.
- Parameters
key (BaseQueryCompiler, np.ndarray or list of column labels) – Boolean mask represented by QueryCompiler or
np.ndarray
of the same shape as self, or enumerable of columns to pick.- Returns
New masked QueryCompiler.
- Return type
- getitem_column_array(key, numeric=False)¶
Get column data for target labels.
- Parameters
key (list-like) – Target labels by which to retrieve data.
numeric (bool, default: False) – Whether or not the key passed in represents the numeric index or the named index.
- Returns
New QueryCompiler that contains specified columns.
- Return type
- getitem_row_array(key)¶
Get row data for target indices.
- Parameters
key (list-like) – Numeric indices of the rows to pick.
- Returns
New QueryCompiler that contains specified rows.
- Return type
- groupby_agg(by, is_multi_by, axis, agg_func, agg_args, agg_kwargs, groupby_kwargs, drop=False)¶
Group QueryCompiler data and apply passed aggregation function.
- Parameters
by (BaseQueryCompiler, column or index label, Grouper or list of such) – Object that determine groups.
is_multi_by (bool) – If by is a QueryCompiler or list of such indicates whether it’s grouping on multiple columns/rows.
axis ({0, 1}) – Axis to group and apply aggregation function along. 0 is for index, when 1 is for columns.
agg_func (dict or callable(DataFrameGroupBy) -> DataFrame) – Function to apply to the GroupBy object.
agg_args (dict) – Positional arguments to pass to the agg_func.
agg_kwargs (dict) – Key arguments to pass to the agg_func.
groupby_kwargs (dict) – GroupBy parameters as expected by
modin.pandas.DataFrame.groupby
signature.drop (bool, default: False) – If by is a QueryCompiler indicates whether or not by-data came from the self.
- Returns
QueryCompiler containing the result of groupby aggregation.
- Return type
Notes
Please refer to
modin.pandas.GroupBy.aggregate
for more information about parameters and output format.
- groupby_all(by, axis, groupby_args, map_args, reduce_args=None, numeric_only=True, drop=False)¶
Group QueryCompiler data and check whether all elements are True for every group.
- Parameters
by (BaseQueryCompiler, column or index label, Grouper or list of such) – Object that determine groups.
axis ({0, 1}) – Axis to group and apply reduction function along. 0 is for index, when 1 is for columns.
groupby_args (dict) – GroupBy parameters as expected by
modin.pandas.DataFrame.groupby
signature.map_args (dict) – Keyword arguments to pass to the reduction function. If GroupBy is implemented via MapReduce approach, this argument is passed at the map phase only.
reduce_args (dict, optional) – If GroupBy is implemented with MapReduce approach, specifies arguments to pass to the reduction function at the reduce phase, has no effect otherwise.
numeric_only (bool, default: True) – Whether or not to drop non-numeric columns before executing GroupBy.
drop (bool, default: False) – If by is a QueryCompiler indicates whether or not by-data came from the self.
- Returns
BaseQueryCompiler – QueryCompiler containing the result of groupby reduction built by the following rules:
Labels on the opposit of specified axis are preserved.
If groupby_args[“as_index”] is True then labels on the specified axis are the group names, otherwise labels would be default: 0, 1 … n.
If groupby_args[“as_index”] is False, then first N columns/rows of the frame contain group names, where N is the columns/rows to group on.
Each element of QueryCompiler is the boolean of whether all elements are True for the corresponding group and column/row.
.. warning – map_args and reduce_args parameters are deprecated. They’re leaked here from
PandasQueryCompiler.groupby_*
, pandas backend implements groupby via MapReduce approach, but for other backends these parameters make no sense, and so they’ll be removed in the future.
Notes
Please refer to
modin.pandas.GroupBy.all
for more information about parameters and output format.
- groupby_any(by, axis, groupby_args, map_args, reduce_args=None, numeric_only=True, drop=False)¶
Group QueryCompiler data and check whether any element is True for every group.
- Parameters
by (BaseQueryCompiler, column or index label, Grouper or list of such) – Object that determine groups.
axis ({0, 1}) – Axis to group and apply reduction function along. 0 is for index, when 1 is for columns.
groupby_args (dict) – GroupBy parameters as expected by
modin.pandas.DataFrame.groupby
signature.map_args (dict) – Keyword arguments to pass to the reduction function. If GroupBy is implemented via MapReduce approach, this argument is passed at the map phase only.
reduce_args (dict, optional) – If GroupBy is implemented with MapReduce approach, specifies arguments to pass to the reduction function at the reduce phase, has no effect otherwise.
numeric_only (bool, default: True) – Whether or not to drop non-numeric columns before executing GroupBy.
drop (bool, default: False) – If by is a QueryCompiler indicates whether or not by-data came from the self.
- Returns
BaseQueryCompiler – QueryCompiler containing the result of groupby reduction built by the following rules:
Labels on the opposit of specified axis are preserved.
If groupby_args[“as_index”] is True then labels on the specified axis are the group names, otherwise labels would be default: 0, 1 … n.
If groupby_args[“as_index”] is False, then first N columns/rows of the frame contain group names, where N is the columns/rows to group on.
Each element of QueryCompiler is the boolean of whether there is any element which is True for the corresponding group and column/row.
.. warning – map_args and reduce_args parameters are deprecated. They’re leaked here from
PandasQueryCompiler.groupby_*
, pandas backend implements groupby via MapReduce approach, but for other backends these parameters make no sense, and so they’ll be removed in the future.
Notes
Please refer to
modin.pandas.GroupBy.any
for more information about parameters and output format.
- groupby_count(by, axis, groupby_args, map_args, reduce_args=None, numeric_only=True, drop=False)¶
Group QueryCompiler data and count non-null values for every group.
- Parameters
by (BaseQueryCompiler, column or index label, Grouper or list of such) – Object that determine groups.
axis ({0, 1}) – Axis to group and apply reduction function along. 0 is for index, when 1 is for columns.
groupby_args (dict) – GroupBy parameters as expected by
modin.pandas.DataFrame.groupby
signature.map_args (dict) – Keyword arguments to pass to the reduction function. If GroupBy is implemented via MapReduce approach, this argument is passed at the map phase only.
reduce_args (dict, optional) – If GroupBy is implemented with MapReduce approach, specifies arguments to pass to the reduction function at the reduce phase, has no effect otherwise.
numeric_only (bool, default: True) – Whether or not to drop non-numeric columns before executing GroupBy.
drop (bool, default: False) – If by is a QueryCompiler indicates whether or not by-data came from the self.
- Returns
BaseQueryCompiler – QueryCompiler containing the result of groupby reduction built by the following rules:
Labels on the opposit of specified axis are preserved.
If groupby_args[“as_index”] is True then labels on the specified axis are the group names, otherwise labels would be default: 0, 1 … n.
If groupby_args[“as_index”] is False, then first N columns/rows of the frame contain group names, where N is the columns/rows to group on.
Each element of QueryCompiler is the number of non-null values for the corresponding group and column/row.
.. warning – map_args and reduce_args parameters are deprecated. They’re leaked here from
PandasQueryCompiler.groupby_*
, pandas backend implements groupby via MapReduce approach, but for other backends these parameters make no sense, and so they’ll be removed in the future.
Notes
Please refer to
modin.pandas.GroupBy.count
for more information about parameters and output format.
- groupby_max(by, axis, groupby_args, map_args, reduce_args=None, numeric_only=True, drop=False)¶
Group QueryCompiler data and get the maximum value for every group.
- Parameters
by (BaseQueryCompiler, column or index label, Grouper or list of such) – Object that determine groups.
axis ({0, 1}) – Axis to group and apply reduction function along. 0 is for index, when 1 is for columns.
groupby_args (dict) – GroupBy parameters as expected by
modin.pandas.DataFrame.groupby
signature.map_args (dict) – Keyword arguments to pass to the reduction function. If GroupBy is implemented via MapReduce approach, this argument is passed at the map phase only.
reduce_args (dict, optional) – If GroupBy is implemented with MapReduce approach, specifies arguments to pass to the reduction function at the reduce phase, has no effect otherwise.
numeric_only (bool, default: True) – Whether or not to drop non-numeric columns before executing GroupBy.
drop (bool, default: False) – If by is a QueryCompiler indicates whether or not by-data came from the self.
- Returns
BaseQueryCompiler – QueryCompiler containing the result of groupby reduction built by the following rules:
Labels on the opposit of specified axis are preserved.
If groupby_args[“as_index”] is True then labels on the specified axis are the group names, otherwise labels would be default: 0, 1 … n.
If groupby_args[“as_index”] is False, then first N columns/rows of the frame contain group names, where N is the columns/rows to group on.
Each element of QueryCompiler is the maximum value for the corresponding group and column/row.
.. warning – map_args and reduce_args parameters are deprecated. They’re leaked here from
PandasQueryCompiler.groupby_*
, pandas backend implements groupby via MapReduce approach, but for other backends these parameters make no sense, and so they’ll be removed in the future.
Notes
Please refer to
modin.pandas.GroupBy.max
for more information about parameters and output format.
- groupby_min(by, axis, groupby_args, map_args, reduce_args=None, numeric_only=True, drop=False)¶
Group QueryCompiler data and get the minimum value for every group.
- Parameters
by (BaseQueryCompiler, column or index label, Grouper or list of such) – Object that determine groups.
axis ({0, 1}) – Axis to group and apply reduction function along. 0 is for index, when 1 is for columns.
groupby_args (dict) – GroupBy parameters as expected by
modin.pandas.DataFrame.groupby
signature.map_args (dict) – Keyword arguments to pass to the reduction function. If GroupBy is implemented via MapReduce approach, this argument is passed at the map phase only.
reduce_args (dict, optional) – If GroupBy is implemented with MapReduce approach, specifies arguments to pass to the reduction function at the reduce phase, has no effect otherwise.
numeric_only (bool, default: True) – Whether or not to drop non-numeric columns before executing GroupBy.
drop (bool, default: False) – If by is a QueryCompiler indicates whether or not by-data came from the self.
- Returns
BaseQueryCompiler – QueryCompiler containing the result of groupby reduction built by the following rules:
Labels on the opposit of specified axis are preserved.
If groupby_args[“as_index”] is True then labels on the specified axis are the group names, otherwise labels would be default: 0, 1 … n.
If groupby_args[“as_index”] is False, then first N columns/rows of the frame contain group names, where N is the columns/rows to group on.
Each element of QueryCompiler is the minimum value for the corresponding group and column/row.
.. warning – map_args and reduce_args parameters are deprecated. They’re leaked here from
PandasQueryCompiler.groupby_*
, pandas backend implements groupby via MapReduce approach, but for other backends these parameters make no sense, and so they’ll be removed in the future.
Notes
Please refer to
modin.pandas.GroupBy.min
for more information about parameters and output format.
- groupby_prod(by, axis, groupby_args, map_args, reduce_args=None, numeric_only=True, drop=False)¶
Group QueryCompiler data and compute product for every group.
- Parameters
by (BaseQueryCompiler, column or index label, Grouper or list of such) – Object that determine groups.
axis ({0, 1}) – Axis to group and apply reduction function along. 0 is for index, when 1 is for columns.
groupby_args (dict) – GroupBy parameters as expected by
modin.pandas.DataFrame.groupby
signature.map_args (dict) – Keyword arguments to pass to the reduction function. If GroupBy is implemented via MapReduce approach, this argument is passed at the map phase only.
reduce_args (dict, optional) – If GroupBy is implemented with MapReduce approach, specifies arguments to pass to the reduction function at the reduce phase, has no effect otherwise.
numeric_only (bool, default: True) – Whether or not to drop non-numeric columns before executing GroupBy.
drop (bool, default: False) – If by is a QueryCompiler indicates whether or not by-data came from the self.
- Returns
BaseQueryCompiler – QueryCompiler containing the result of groupby reduction built by the following rules:
Labels on the opposit of specified axis are preserved.
If groupby_args[“as_index”] is True then labels on the specified axis are the group names, otherwise labels would be default: 0, 1 … n.
If groupby_args[“as_index”] is False, then first N columns/rows of the frame contain group names, where N is the columns/rows to group on.
Each element of QueryCompiler is the product for the corresponding group and column/row.
.. warning – map_args and reduce_args parameters are deprecated. They’re leaked here from
PandasQueryCompiler.groupby_*
, pandas backend implements groupby via MapReduce approach, but for other backends these parameters make no sense, and so they’ll be removed in the future.
Notes
Please refer to
modin.pandas.GroupBy.prod
for more information about parameters and output format.
- groupby_size(by, axis, groupby_args, map_args, reduce_args=None, numeric_only=True, drop=False)¶
Group QueryCompiler data and get the number of elements for every group.
- Parameters
by (BaseQueryCompiler, column or index label, Grouper or list of such) – Object that determine groups.
axis ({0, 1}) – Axis to group and apply reduction function along. 0 is for index, when 1 is for columns.
groupby_args (dict) – GroupBy parameters as expected by
modin.pandas.DataFrame.groupby
signature.map_args (dict) – Keyword arguments to pass to the reduction function. If GroupBy is implemented via MapReduce approach, this argument is passed at the map phase only.
reduce_args (dict, optional) – If GroupBy is implemented with MapReduce approach, specifies arguments to pass to the reduction function at the reduce phase, has no effect otherwise.
numeric_only (bool, default: True) – Whether or not to drop non-numeric columns before executing GroupBy.
drop (bool, default: False) – If by is a QueryCompiler indicates whether or not by-data came from the self.
- Returns
BaseQueryCompiler – QueryCompiler containing the result of groupby reduction built by the following rules:
Labels on the opposit of specified axis are preserved.
If groupby_args[“as_index”] is True then labels on the specified axis are the group names, otherwise labels would be default: 0, 1 … n.
If groupby_args[“as_index”] is False, then first N columns/rows of the frame contain group names, where N is the columns/rows to group on.
Each element of QueryCompiler is the number of elements for the corresponding group and column/row.
.. warning – map_args and reduce_args parameters are deprecated. They’re leaked here from
PandasQueryCompiler.groupby_*
, pandas backend implements groupby via MapReduce approach, but for other backends these parameters make no sense, and so they’ll be removed in the future.
Notes
Please refer to
modin.pandas.GroupBy.size
for more information about parameters and output format.
- groupby_sum(by, axis, groupby_args, map_args, reduce_args=None, numeric_only=True, drop=False)¶
Group QueryCompiler data and compute sum for every group.
- Parameters
by (BaseQueryCompiler, column or index label, Grouper or list of such) – Object that determine groups.
axis ({0, 1}) – Axis to group and apply reduction function along. 0 is for index, when 1 is for columns.
groupby_args (dict) – GroupBy parameters as expected by
modin.pandas.DataFrame.groupby
signature.map_args (dict) – Keyword arguments to pass to the reduction function. If GroupBy is implemented via MapReduce approach, this argument is passed at the map phase only.
reduce_args (dict, optional) – If GroupBy is implemented with MapReduce approach, specifies arguments to pass to the reduction function at the reduce phase, has no effect otherwise.
numeric_only (bool, default: True) – Whether or not to drop non-numeric columns before executing GroupBy.
drop (bool, default: False) – If by is a QueryCompiler indicates whether or not by-data came from the self.
- Returns
BaseQueryCompiler – QueryCompiler containing the result of groupby reduction built by the following rules:
Labels on the opposit of specified axis are preserved.
If groupby_args[“as_index”] is True then labels on the specified axis are the group names, otherwise labels would be default: 0, 1 … n.
If groupby_args[“as_index”] is False, then first N columns/rows of the frame contain group names, where N is the columns/rows to group on.
Each element of QueryCompiler is the sum for the corresponding group and column/row.
.. warning – map_args and reduce_args parameters are deprecated. They’re leaked here from
PandasQueryCompiler.groupby_*
, pandas backend implements groupby via MapReduce approach, but for other backends these parameters make no sense, and so they’ll be removed in the future.
Notes
Please refer to
modin.pandas.GroupBy.sum
for more information about parameters and output format.
- gt(other, **kwargs)¶
Perform element-wise greater than comparison (
self > other
).If axes are not equal, perform frames alignment first.
- Parameters
other (BaseQueryCompiler, scalar or array-like) – Other operand of the binary operation.
broadcast (bool, default: False) – If other is a one-column query compiler, indicates whether it is a Series or not. Frames and Series have to be processed differently, however we can’t distinguish them at the query compiler level, so this parameter is a hint that is passed from a high-level API.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Result of binary operation.
- Return type
- has_multiindex(axis=0)¶
Check if specified axis is indexed by MultiIndex.
- Parameters
axis ({0, 1}, default: 0) – The axis to check (0 - index, 1 - columns).
- Returns
True if index at specified axis is MultiIndex and False otherwise.
- Return type
bool
- idxmax(**kwargs)¶
Get position of the first occurence of the maximum for each row or column.
- Parameters
axis ({0, 1}) –
skipna (bool) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
One-column QueryCompiler with index labels of the specified axis, where each row contains position of the maximum element for the corresponding row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.idxmax
for more information about parameters and output format.
- idxmin(**kwargs)¶
Get position of the first occurence of the minimum for each row or column.
- Parameters
axis ({0, 1}) –
skipna (bool) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
One-column QueryCompiler with index labels of the specified axis, where each row contains position of the minimum element for the corresponding row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.idxmin
for more information about parameters and output format.
- insert(loc, column, value)¶
Insert new column.
- Parameters
loc (int) – Insertion position.
column (label) – Label of the new column.
value (One-column BaseQueryCompiler, 1D array or scalar) – Data to fill new column with.
- Returns
QueryCompiler with new column inserted.
- Return type
- insert_item(axis, loc, value, how='inner', replace=False)¶
Insert rows/columns defined by value at the specified position.
If frames are not aligned along specified axis, perform frames alignment first.
- Parameters
axis ({0, 1}) – Axis to insert along. 0 means insert rows, when 1 means insert columns.
loc (int) – Position to insert value.
value (BaseQueryCompiler) – Rows/columns to insert.
how ({"inner", "outer", "left", "right"}, default: "inner") – Type of join that will be used if frames are not aligned.
replace (bool, default: False) – Whether to insert item after column/row at loc-th position or to replace it by value.
- Returns
New QueryCompiler with inserted values.
- Return type
- invert()¶
Apply bitwise invertion for each element of the QueryCompiler.
- Returns
New QueryCompiler containing bitwise invertion for each value.
- Return type
- is_monotonic_decreasing()¶
Return boolean if values in the object are monotonicly decreasing.
- Returns
- Return type
bool
- is_monotonic_increasing()¶
Return boolean if values in the object are monotonicly increasing.
- Returns
- Return type
bool
- is_series_like()¶
Check whether this QueryCompiler can represent
modin.pandas.Series
object.- Returns
Return True if QueryCompiler has a single column or row, False otherwise.
- Return type
bool
- isin(**kwargs)¶
Check for each element of self whether it’s contained in passed values.
- Parameters
values (list-like, modin.pandas.Series, modin.pandas.DataFrame or dict) – Values to check elements of self in.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Boolean mask for self of whether an element at the corresponding position is contained in values.
- Return type
- isna()¶
Check for each element of self whether it’s NaN.
- Returns
Boolean mask for self of whether an element at the corresponding position is NaN.
- Return type
- join(right, **kwargs)¶
Join columns of another QueryCompiler.
- Parameters
right (BaseQueryCompiler) – QueryCompiler of the right frame to join with.
on (label or list of such) –
how ({"left", "right", "outer", "inner"}) –
lsuffix (str) –
rsuffix (str) –
sort (bool) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
QueryCompiler that contains result of the join.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.join
for more information about parameters and output format.
- kurt(axis, level=None, numeric_only=None, skipna=True, **kwargs)¶
Get the unbiased kurtosis for each column or row.
- Parameters
axis ({{0, 1}}) –
level (None, default: None) – Serves the compatibility purpose. Always has to be None.
numeric_only (bool, optional) –
skipna (bool, default: True) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
One-column QueryCompiler with index labels of the specified axis, where each row contains the unbiased kurtosis for the corresponding row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.kurt
for more information about parameters and output format.
- last_valid_index()¶
Return index label of last non-NaN/NULL value.
- Returns
- Return type
scalar
- le(other, **kwargs)¶
Perform element-wise less than or equal comparison (
self <= other
).If axes are not equal, perform frames alignment first.
- Parameters
other (BaseQueryCompiler, scalar or array-like) – Other operand of the binary operation.
broadcast (bool, default: False) – If other is a one-column query compiler, indicates whether it is a Series or not. Frames and Series have to be processed differently, however we can’t distinguish them at the query compiler level, so this parameter is a hint that is passed from a high-level API.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Result of binary operation.
- Return type
- lt(other, **kwargs)¶
Perform element-wise less than comparison (
self < other
).If axes are not equal, perform frames alignment first.
- Parameters
other (BaseQueryCompiler, scalar or array-like) – Other operand of the binary operation.
broadcast (bool, default: False) – If other is a one-column query compiler, indicates whether it is a Series or not. Frames and Series have to be processed differently, however we can’t distinguish them at the query compiler level, so this parameter is a hint that is passed from a high-level API.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Result of binary operation.
- Return type
- mad(axis, skipna, level=None)¶
Get the mean absolute deviation for each column or row.
- Parameters
axis ({0, 1}) –
skipna (bool) –
level (None, default: None) – Serves the compatibility purpose. Always has to be None.
- Returns
One-column QueryCompiler with index labels of the specified axis, where each row contains the mean absolute deviation for the corresponding row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.mad
for more information about parameters and output format.
- max(**kwargs)¶
Get the maximum value for each column or row.
- Parameters
axis ({{0, 1}}) –
level (None, default: None) – Serves the compatibility purpose. Always has to be None.
numeric_only (bool, optional) –
skipna (bool, default: True) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
One-column QueryCompiler with index labels of the specified axis, where each row contains the maximum value for the corresponding row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.max
for more information about parameters and output format.
- mean(**kwargs)¶
Get the mean value for each column or row.
- Parameters
axis ({{0, 1}}) –
level (None, default: None) – Serves the compatibility purpose. Always has to be None.
numeric_only (bool, optional) –
skipna (bool, default: True) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
One-column QueryCompiler with index labels of the specified axis, where each row contains the mean value for the corresponding row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.mean
for more information about parameters and output format.
- median(**kwargs)¶
Get the median value for each column or row.
- Parameters
axis ({{0, 1}}) –
level (None, default: None) – Serves the compatibility purpose. Always has to be None.
numeric_only (bool, optional) –
skipna (bool, default: True) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
One-column QueryCompiler with index labels of the specified axis, where each row contains the median value for the corresponding row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.median
for more information about parameters and output format.
- melt(*args, **kwargs)¶
Unpivot QueryCompiler data from wide to long format.
- Parameters
id_vars (list of labels, optional) –
value_vars (list of labels, optional) –
var_name (label) –
value_name (label) –
col_level (int or label) –
ignore_index (bool) –
*args (iterable) – Serves the compatibility purpose. Does not affect the result.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler with unpivoted data.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.melt
for more information about parameters and output format.
- memory_usage(**kwargs)¶
Return the memory usage of each column in bytes.
- Parameters
index (bool) –
deep (bool) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
One-column QueryCompiler with index labels of self, where each row contains the memory usage for the corresponding column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.memory_usage
for more information about parameters and output format.
- merge(right, **kwargs)¶
Merge QueryCompiler objects using a database-style join.
- Parameters
right (BaseQueryCompiler) – QueryCompiler of the right frame to merge with.
how ({"left", "right", "outer", "inner", "cross"}) –
on (label or list of such) –
left_on (label or list of such) –
right_on (label or list of such) –
left_index (bool) –
right_index (bool) –
sort (bool) –
suffixes (list-like) –
copy (bool) –
indicator (bool or str) –
validate (str) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
QueryCompiler that contains result of the merge.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.merge
for more information about parameters and output format.
- min(**kwargs)¶
Get the minimum value for each column or row.
- Parameters
axis ({{0, 1}}) –
level (None, default: None) – Serves the compatibility purpose. Always has to be None.
numeric_only (bool, optional) –
skipna (bool, default: True) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
One-column QueryCompiler with index labels of the specified axis, where each row contains the minimum value for the corresponding row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.min
for more information about parameters and output format.
- mod(other, **kwargs)¶
Perform element-wise modulo (
self % other
).If axes are not equal, perform frames alignment first.
- Parameters
other (BaseQueryCompiler, scalar or array-like) – Other operand of the binary operation.
broadcast (bool, default: False) – If other is a one-column query compiler, indicates whether it is a Series or not. Frames and Series have to be processed differently, however we can’t distinguish them at the query compiler level, so this parameter is a hint that is passed from a high-level API.
level (int or label) – In case of MultiIndex match index values on the passed level.
axis ({{0, 1}}) – Axis to match indices along for 1D other (list or QueryCompiler that represents Series). 0 is for index, when 1 is for columns.
fill_value (float or None) – Value to fill missing elements during frame alignment.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Result of binary operation.
- Return type
- mode(**kwargs)¶
Get the modes for every column or row.
- Parameters
axis ({0, 1}) –
numeric_only (bool) –
dropna (bool) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler with modes calculated alogn given axis.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.mode
for more information about parameters and output format.
- mul(other, **kwargs)¶
Perform element-wise multiplication (
self * other
).If axes are not equal, perform frames alignment first.
- Parameters
other (BaseQueryCompiler, scalar or array-like) – Other operand of the binary operation.
broadcast (bool, default: False) – If other is a one-column query compiler, indicates whether it is a Series or not. Frames and Series have to be processed differently, however we can’t distinguish them at the query compiler level, so this parameter is a hint that is passed from a high-level API.
level (int or label) – In case of MultiIndex match index values on the passed level.
axis ({{0, 1}}) – Axis to match indices along for 1D other (list or QueryCompiler that represents Series). 0 is for index, when 1 is for columns.
fill_value (float or None) – Value to fill missing elements during frame alignment.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Result of binary operation.
- Return type
- ne(other, **kwargs)¶
Perform element-wise not equal comparison (
self != other
).If axes are not equal, perform frames alignment first.
- Parameters
other (BaseQueryCompiler, scalar or array-like) – Other operand of the binary operation.
broadcast (bool, default: False) – If other is a one-column query compiler, indicates whether it is a Series or not. Frames and Series have to be processed differently, however we can’t distinguish them at the query compiler level, so this parameter is a hint that is passed from a high-level API.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Result of binary operation.
- Return type
- negative(**kwargs)¶
Change the sign for every value of self.
- Parameters
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
- Return type
Notes
Be aware, that all QueryCompiler values have to be numeric.
- nlargest(n=5, columns=None, keep='first')¶
Return the first n rows ordered by columns in descending order.
- Parameters
n (int, default: 5) –
columns (list of labels, optional) – Column labels to order by. (note: this parameter can be omitted only for a single-column query compilers representing Series object, otherwise columns has to be specified).
keep ({"first", "last", "all"}, default: "first") –
- Returns
- Return type
Notes
Please refer to
modin.pandas.DataFrame.nlargest
for more information about parameters and output format.
- notna()¶
Check for each element of self whether it’s existing (non-missing) value.
- Returns
Boolean mask for self of whether an element at the corresponding position is not NaN.
- Return type
- nsmallest(n=5, columns=None, keep='first')¶
Return the first n rows ordered by columns in ascending order.
- Parameters
n (int, default: 5) –
columns (list of labels, optional) – Column labels to order by. (note: this parameter can be omitted only for a single-column query compilers representing Series object, otherwise columns has to be specified).
keep ({"first", "last", "all"}, default: "first") –
- Returns
- Return type
Notes
Please refer to
modin.pandas.DataFrame.nsmallest
for more information about parameters and output format.
- nunique(**kwargs)¶
Get the number of unique values for each column or row.
- Parameters
axis ({0, 1}) –
dropna (bool) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
One-column QueryCompiler with index labels of the specified axis, where each row contains the number of unique values for the corresponding row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.nunique
for more information about parameters and output format.
- pivot(index, columns, values)¶
Produce pivot table based on column values.
- Parameters
index (label or list of such, pandas.Index, optional) –
columns (label or list of such) –
values (label or list of such, optional) –
- Returns
New QueryCompiler containing pivot table.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.pivot
for more information about parameters and output format.
- pivot_table(index, values, columns, aggfunc, fill_value, margins, dropna, margins_name, observed, sort)¶
Create a spreadsheet-style pivot table from underlying data.
- Parameters
index (label, pandas.Grouper, array or list of such) –
values (label, optional) –
columns (column, pandas.Grouper, array or list of such) –
aggfunc (callable(pandas.Series) -> scalar, dict of list of such) –
fill_value (scalar, optional) –
margins (bool) –
dropna (bool) –
margins_name (str) –
observed (bool) –
sort (bool) –
- Returns
- Return type
Notes
Please refer to
modin.pandas.DataFrame.pivot_table
for more information about parameters and output format.
- pow(other, **kwargs)¶
Perform element-wise exponential power (
self ** other
).If axes are not equal, perform frames alignment first.
- Parameters
other (BaseQueryCompiler, scalar or array-like) – Other operand of the binary operation.
broadcast (bool, default: False) – If other is a one-column query compiler, indicates whether it is a Series or not. Frames and Series have to be processed differently, however we can’t distinguish them at the query compiler level, so this parameter is a hint that is passed from a high-level API.
level (int or label) – In case of MultiIndex match index values on the passed level.
axis ({{0, 1}}) – Axis to match indices along for 1D other (list or QueryCompiler that represents Series). 0 is for index, when 1 is for columns.
fill_value (float or None) – Value to fill missing elements during frame alignment.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Result of binary operation.
- Return type
- prod(**kwargs)¶
Get the production for each column or row.
- Parameters
axis ({0, 1}) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
One-column QueryCompiler with index labels of the specified axis, where each row contains the production for the corresponding row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.prod
for more information about parameters and output format.
- prod_min_count(**kwargs)¶
Get the production for each column or row.
- Parameters
axis ({0, 1}) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
One-column QueryCompiler with index labels of the specified axis, where each row contains the production for the corresponding row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.prod
for more information about parameters and output format.
- quantile_for_list_of_values(**kwargs)¶
Get the value at the given quantile for each column or row.
- Parameters
q (list-like) –
axis ({0, 1}) –
numeric_only (bool) –
interpolation ({"linear", "lower", "higher", "midpoint", "nearest"}) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
One-column QueryCompiler with index labels of the specified axis, where each row contains the value at the given quantile for the corresponding row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.quantile
for more information about parameters and output format.
- quantile_for_single_value(**kwargs)¶
Get the value at the given quantile for each column or row.
- Parameters
q (float) –
axis ({0, 1}) –
numeric_only (bool) –
interpolation ({"linear", "lower", "higher", "midpoint", "nearest"}) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
One-column QueryCompiler with index labels of the specified axis, where each row contains the value at the given quantile for the corresponding row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.quantile
for more information about parameters and output format.
- query(expr, **kwargs)¶
Query columns of the QueryCompiler with a boolean expression.
- Parameters
expr (str) –
**kwargs (dict) –
- Returns
New QueryCompiler containing the rows where the boolean expression is satisfied.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.query
for more information about parameters and output format.
- rank(**kwargs)¶
Compute numerical rank along the specified axis.
By default, equal values are assigned a rank that is the average of the ranks of those values, this behaviour can be changed via method parameter.
- Parameters
axis ({0, 1}) –
method ({"average", "min", "max", "first", "dense"}) –
numeric_only (bool) –
na_option ({"keep", "top", "bottom"}) –
ascending (bool) –
pct (bool) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
QueryCompiler of the same shape as self, where each element is the numerical rank of the corresponding value along row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.rank
for more information about parameters and output format.
- reindex(axis, labels, **kwargs)¶
Align QueryCompiler data with a new index along specified axis.
- Parameters
axis ({0, 1}) – Axis to align labels along. 0 is for index, 1 is for columns.
labels (list-like) – Index-labels to align with.
method ({None, "backfill"/"bfill", "pad"/"ffill", "nearest"}) – Method to use for filling holes in reindexed frame.
fill_value (scalar) – Value to use for missing values in the resulted frame.
limit (int) –
tolerance (int) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
QueryCompiler with aligned axis.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.reindex
for more information about parameters and output format.
- repeat(repeats)¶
Repeat each element of one-column QueryCompiler given number of times.
- Parameters
repeats (int or array of ints) – The number of repetitions for each element. This should be a non-negative integer. Repeating 0 times will return an empty QueryCompiler.
- Returns
New QueryCompiler with repeated elements.
- Return type
Notes
Please refer to
modin.pandas.Series.repeat
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- replace(**kwargs)¶
Replace values given in to_replace by value.
- Parameters
to_replace (scalar, list-like, regex, modin.pandas.Series, or None) –
value (scalar, list-like, regex or dict) –
inplace ({False}) – This parameter serves the compatibility purpose. Always has to be False.
limit (int or None) –
regex (bool or same types as to_replace) –
method ({"pad", "ffill", "bfill", None}) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
QueryCompiler with all to_replace values replaced by value.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.replace
for more information about parameters and output format.
- resample_agg_df(resample_args, func, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and apply passed aggregation function for each group over the specified axis.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature.func (str, dict, callable(pandas.Series) -> scalar, or list of such) –
*args (iterable) – Positional arguments to pass to the aggregation function.
**kwargs (dict) – Keyword arguments to pass to the aggregation function.
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
Labels on the specified axis are the group names (time-stamps)
Labels on the opposit of specified axis are a MultiIndex, where first level contains preserved labels of this axis and the second level is the function names.
Each element of QueryCompiler is the result of corresponding function for the corresponding group and column/row.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.agg
for more information about parameters and output format.
- resample_agg_ser(resample_args, func, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and apply passed aggregation function in a one-column query compiler for each group over the specified axis.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature.func (str, dict, callable(pandas.Series) -> scalar, or list of such) –
*args (iterable) – Positional arguments to pass to the aggregation function.
**kwargs (dict) – Keyword arguments to pass to the aggregation function.
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
Labels on the specified axis are the group names (time-stamps)
Labels on the opposit of specified axis are a MultiIndex, where first level contains preserved labels of this axis and the second level is the function names.
Each element of QueryCompiler is the result of corresponding function for the corresponding group and column/row.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.agg
for more information about parameters and output format.Warning
This method duplicates logic of
resample_agg_df
and will be removed soon.
- resample_app_df(resample_args, func, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and apply passed aggregation function for each group over the specified axis.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature.func (str, dict, callable(pandas.Series) -> scalar, or list of such) –
*args (iterable) – Positional arguments to pass to the aggregation function.
**kwargs (dict) – Keyword arguments to pass to the aggregation function.
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
Labels on the specified axis are the group names (time-stamps)
Labels on the opposit of specified axis are a MultiIndex, where first level contains preserved labels of this axis and the second level is the function names.
Each element of QueryCompiler is the result of corresponding function for the corresponding group and column/row.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.apply
for more information about parameters and output format.Warning
This method duplicates logic of
resample_agg_df
and will be removed soon.
- resample_app_ser(resample_args, func, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and apply passed aggregation function in a one-column query compiler for each group over the specified axis.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature.func (str, dict, callable(pandas.Series) -> scalar, or list of such) –
*args (iterable) – Positional arguments to pass to the aggregation function.
**kwargs (dict) – Keyword arguments to pass to the aggregation function.
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
Labels on the specified axis are the group names (time-stamps)
Labels on the opposit of specified axis are a MultiIndex, where first level contains preserved labels of this axis and the second level is the function names.
Each element of QueryCompiler is the result of corresponding function for the corresponding group and column/row.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.apply
for more information about parameters and output format.Warning
This method duplicates logic of
resample_agg_df
and will be removed soon.
- resample_asfreq(resample_args, fill_value)¶
Resample time-series data and get the values at the new frequency.
Group data into intervals by time-series row/column with a specified frequency and get values at the new frequency.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature.fill_value (scalar) –
- Returns
New QueryCompiler containing values at the specified frequency.
- Return type
- resample_backfill(resample_args, limit)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and fill missing values in each group independently using back-fill method.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature.limit (int) –
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
QueryCompiler contains unsampled data with missing values filled.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.backfill
for more information about parameters and output format.
- resample_bfill(resample_args, limit)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and fill missing values in each group independently using back-fill method.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature.limit (int) –
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
QueryCompiler contains unsampled data with missing values filled.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.bfill
for more information about parameters and output format.
- resample_count(resample_args)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and compute number of non-NA values for each group.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature.- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
Labels on the specified axis are the group names (time-stamps)
Labels on the opposit of specified axis are preserved.
Each element of QueryCompiler is the number of non-NA values for the corresponding group and column/row.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.count
for more information about parameters and output format.
- resample_ffill(resample_args, limit)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and fill missing values in each group independently using forward-fill method.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature.limit (int) –
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
QueryCompiler contains unsampled data with missing values filled.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.ffill
for more information about parameters and output format.
- resample_fillna(resample_args, method, limit)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and fill missing values in each group independently using specified method.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature.method (str) –
limit (int) –
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
QueryCompiler contains unsampled data with missing values filled.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.fillna
for more information about parameters and output format.
- resample_first(resample_args, _method, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and compute first element for each group.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature._method (str) –
*args (iterable) – Serves the compatibility purpose. Does not affect the result.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
Labels on the specified axis are the group names (time-stamps)
Labels on the opposit of specified axis are preserved.
Each element of QueryCompiler is the first element for the corresponding group and column/row.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.first
for more information about parameters and output format.
- resample_get_group(resample_args, name, obj)¶
Resample time-series data and get the specified group.
Group data into intervals by time-series row/column with a specified frequency and get the values of the specified group.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature.name (object) –
obj (modin.pandas.DataFrame, optional) –
- Returns
New QueryCompiler containing the values from the specified group.
- Return type
- resample_interpolate(resample_args, method, axis, limit, inplace, limit_direction, limit_area, downcast, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and fill missing values in each group independently using specified interpolation method.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature.method (str) –
axis ({0, 1}) –
limit (int) –
inplace ({False}) – This parameter serves the compatibility purpose. Always has to be False.
limit_direction ({"forward", "backward", "both"}) –
limit_area ({None, "inside", "outside"}) –
downcast (str, optional) –
**kwargs (dict) –
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
QueryCompiler contains unsampled data with missing values filled.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.interpolate
for more information about parameters and output format.
- resample_last(resample_args, _method, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and compute last element for each group.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature._method (str) –
*args (iterable) – Serves the compatibility purpose. Does not affect the result.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
Labels on the specified axis are the group names (time-stamps)
Labels on the opposit of specified axis are preserved.
Each element of QueryCompiler is the last element for the corresponding group and column/row.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.last
for more information about parameters and output format.
- resample_max(resample_args, _method, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and compute maximum value for each group.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature._method (str) –
*args (iterable) – Serves the compatibility purpose. Does not affect the result.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
Labels on the specified axis are the group names (time-stamps)
Labels on the opposit of specified axis are preserved.
Each element of QueryCompiler is the maximum value for the corresponding group and column/row.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.max
for more information about parameters and output format.
- resample_mean(resample_args, _method, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and compute mean value for each group.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature._method (str) –
*args (iterable) – Serves the compatibility purpose. Does not affect the result.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
Labels on the specified axis are the group names (time-stamps)
Labels on the opposit of specified axis are preserved.
Each element of QueryCompiler is the mean value for the corresponding group and column/row.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.mean
for more information about parameters and output format.
- resample_median(resample_args, _method, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and compute median value for each group.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature._method (str) –
*args (iterable) – Serves the compatibility purpose. Does not affect the result.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
Labels on the specified axis are the group names (time-stamps)
Labels on the opposit of specified axis are preserved.
Each element of QueryCompiler is the median value for the corresponding group and column/row.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.median
for more information about parameters and output format.
- resample_min(resample_args, _method, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and compute minimum value for each group.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature._method (str) –
*args (iterable) – Serves the compatibility purpose. Does not affect the result.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
Labels on the specified axis are the group names (time-stamps)
Labels on the opposit of specified axis are preserved.
Each element of QueryCompiler is the minimum value for the corresponding group and column/row.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.min
for more information about parameters and output format.
- resample_nearest(resample_args, limit)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and fill missing values in each group independently using ‘nearest’ method.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature.limit (int) –
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
QueryCompiler contains unsampled data with missing values filled.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.nearest
for more information about parameters and output format.
- resample_nunique(resample_args, _method, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and compute number of unique values for each group.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature._method (str) –
*args (iterable) – Serves the compatibility purpose. Does not affect the result.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
Labels on the specified axis are the group names (time-stamps)
Labels on the opposit of specified axis are preserved.
Each element of QueryCompiler is the number of unique values for the corresponding group and column/row.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.nunique
for more information about parameters and output format.
- resample_ohlc_df(resample_args, _method, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and compute open, high, low and close values for each group over the specified axis.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature._method (str) –
*args (iterable) – Positional arguments to pass to the aggregation function.
**kwargs (dict) – Keyword arguments to pass to the aggregation function.
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
Labels on the specified axis are the group names (time-stamps)
Labels on the opposit of specified axis are a MultiIndex, where first level contains preserved labels of this axis and the second level is the labels of columns containing computed values.
Each element of QueryCompiler is the result of corresponding function for the corresponding group and column/row.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.ohlc
for more information about parameters and output format.
- resample_ohlc_ser(resample_args, _method, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and compute open, high, low and close values for each group over the specified axis.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature._method (str) –
*args (iterable) – Positional arguments to pass to the aggregation function.
**kwargs (dict) – Keyword arguments to pass to the aggregation function.
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
Labels on the specified axis are the group names (time-stamps)
Labels on the opposit of specified axis are a MultiIndex, where first level contains preserved labels of this axis and the second level is the labels of columns containing computed values.
Each element of QueryCompiler is the result of corresponding function for the corresponding group and column/row.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.ohlc
for more information about parameters and output format.
- resample_pad(resample_args, limit)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and fill missing values in each group independently using ‘pad’ method.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature.limit (int) –
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
QueryCompiler contains unsampled data with missing values filled.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.pad
for more information about parameters and output format.
- resample_pipe(resample_args, func, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency, build equivalent
pandas.Resampler
object and apply passed function to it.- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature.func (callable(pandas.Resampler) -> object or tuple(callable, str)) –
*args (iterable) – Positional arguments to pass to function.
**kwargs (dict) – Keyword arguments to pass to function.
- Returns
New QueryCompiler containing the result of passed function.
- Return type
Notes
Please refer to
modin.pandas.Resampler.pipe
for more information about parameters and output format.
- resample_prod(resample_args, _method, min_count, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and compute product for each group.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature._method (str) –
min_count (int) –
*args (iterable) – Serves the compatibility purpose. Does not affect the result.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
Labels on the specified axis are the group names (time-stamps)
Labels on the opposit of specified axis are preserved.
Each element of QueryCompiler is the product for the corresponding group and column/row.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.prod
for more information about parameters and output format.
- resample_quantile(resample_args, q, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and compute quantile for each group.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature.q (float) –
*args (iterable) – Serves the compatibility purpose. Does not affect the result.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
Labels on the specified axis are the group names (time-stamps)
Labels on the opposit of specified axis are preserved.
Each element of QueryCompiler is the quantile for the corresponding group and column/row.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.quantile
for more information about parameters and output format.
- resample_sem(resample_args, ddof=1, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and compute standart error of the mean for each group.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature.ddof (int, default: 1) –
*args (iterable) – Serves the compatibility purpose. Does not affect the result.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
Labels on the specified axis are the group names (time-stamps)
Labels on the opposit of specified axis are preserved.
Each element of QueryCompiler is the standart error of the mean for the corresponding group and column/row.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.sem
for more information about parameters and output format.
- resample_size(resample_args, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and compute number of elements in a group for each group.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature.*args (iterable) – Serves the compatibility purpose. Does not affect the result.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
Labels on the specified axis are the group names (time-stamps)
Labels on the opposit of specified axis are preserved.
Each element of QueryCompiler is the number of elements in a group for the corresponding group and column/row.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.size
for more information about parameters and output format.
- resample_std(resample_args, ddof, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and compute standart deviation for each group.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature.ddof (int) –
*args (iterable) – Serves the compatibility purpose. Does not affect the result.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
Labels on the specified axis are the group names (time-stamps)
Labels on the opposit of specified axis are preserved.
Each element of QueryCompiler is the standart deviation for the corresponding group and column/row.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.std
for more information about parameters and output format.
- resample_sum(resample_args, _method, min_count, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and compute sum for each group.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature._method (str) –
min_count (int) –
*args (iterable) – Serves the compatibility purpose. Does not affect the result.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
Labels on the specified axis are the group names (time-stamps)
Labels on the opposit of specified axis are preserved.
Each element of QueryCompiler is the sum for the corresponding group and column/row.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.sum
for more information about parameters and output format.
- resample_transform(resample_args, arg, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and call passed function on each group. In contrast to
resample_app_df
apply function to the whole group, instead of a single axis.- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature.arg (callable(pandas.DataFrame) -> pandas.Series) –
*args (iterable) – Positional arguments to pass to function.
**kwargs (dict) – Keyword arguments to pass to function.
- Returns
New QueryCompiler containing the result of passed function.
- Return type
- resample_var(resample_args, ddof, *args, **kwargs)¶
Resample time-series data and apply aggregation on it.
Group data into intervals by time-series row/column with a specified frequency and compute variance for each group.
- Parameters
resample_args (list) – Resample parameters as expected by
modin.pandas.DataFrame.resample
signature.ddof (int) –
*args (iterable) – Serves the compatibility purpose. Does not affect the result.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler containing the result of resample aggregation built by the following rules:
Labels on the specified axis are the group names (time-stamps)
Labels on the opposit of specified axis are preserved.
Each element of QueryCompiler is the variance for the corresponding group and column/row.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.Resampler.var
for more information about parameters and output format.
- reset_index(**kwargs)¶
Reset the index, or a level of it.
- Parameters
drop (bool) – Whether to drop the reset index or insert it at the beginning of the frame.
level (int or label, optional) – Level to remove from index. Removes all levels by default.
col_level (int or label) – If the columns have multiple levels, determines which level the labels are inserted into.
col_fill (label) – If the columns have multiple levels, determines how the other levels are named.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
QueryCompiler with reset index.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.reset_index
for more information about parameters and output format.
- rfloordiv(other, **kwargs)¶
Perform element-wise integer division (
other // self
).If axes are not equal, perform frames alignment first.
- Parameters
other (BaseQueryCompiler, scalar or array-like) – Other operand of the binary operation.
broadcast (bool, default: False) – If other is a one-column query compiler, indicates whether it is a Series or not. Frames and Series have to be processed differently, however we can’t distinguish them at the query compiler level, so this parameter is a hint that is passed from a high-level API.
level (int or label) – In case of MultiIndex match index values on the passed level.
axis ({{0, 1}}) – Axis to match indices along for 1D other (list or QueryCompiler that represents Series). 0 is for index, when 1 is for columns.
fill_value (float or None) – Value to fill missing elements during frame alignment.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Result of binary operation.
- Return type
- rmod(other, **kwargs)¶
Perform element-wise modulo (
other % self
).If axes are not equal, perform frames alignment first.
- Parameters
other (BaseQueryCompiler, scalar or array-like) – Other operand of the binary operation.
broadcast (bool, default: False) – If other is a one-column query compiler, indicates whether it is a Series or not. Frames and Series have to be processed differently, however we can’t distinguish them at the query compiler level, so this parameter is a hint that is passed from a high-level API.
level (int or label) – In case of MultiIndex match index values on the passed level.
axis ({{0, 1}}) – Axis to match indices along for 1D other (list or QueryCompiler that represents Series). 0 is for index, when 1 is for columns.
fill_value (float or None) – Value to fill missing elements during frame alignment.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Result of binary operation.
- Return type
- rolling_aggregate(rolling_args, func, *args, **kwargs)¶
Create rolling window and apply specified functions for each window.
- Parameters
rolling_args (list) – Rolling windows arguments with the same signature as
modin.pandas.DataFrame.rolling
.func (str, dict, callable(pandas.Series) -> scalar, or list of such) –
*args (iterable) –
**kwargs (dict) –
- Returns
New QueryCompiler containing the result of passed functions for each window, built by the following rulles:
Labels on the specified axis are preserved.
Labels on the opposit of specified axis are MultiIndex, where first level contains preserved labels of this axis and the second level has the function names.
Each element of QueryCompiler is the result of corresponding function for the corresponding window and column/row.
- Return type
Notes
Please refer to
modin.pandas.Rolling.aggregate
for more information about parameters and output format.
- rolling_apply(rolling_args, func, raw=False, engine=None, engine_kwargs=None, args=None, kwargs=None)¶
Create rolling window and apply specified function for each window.
- Parameters
rolling_args (list) – Rolling windows arguments with the same signature as
modin.pandas.DataFrame.rolling
.func (callable(pandas.Series) -> scalar) –
raw (bool, default: False) –
engine (None, default: None) – This parameters serves the compatibility purpose. Always has to be None.
engine_kwargs (None, default: None) – This parameters serves the compatibility purpose. Always has to be None.
args (tuple, optional) –
kwargs (dict, optional) –
- Returns
New QueryCompiler containing the result of passed function for each window, built by the following rulles:
Labels on the specified axis are preserved.
Labels on the opposit of specified axis are MultiIndex, where first level contains preserved labels of this axis and the second level has the function names.
Each element of QueryCompiler is the result of corresponding function for the corresponding window and column/row.
- Return type
Notes
Please refer to
modin.pandas.Rolling.apply
for more information about parameters and output format.Warning
This method duplicates logic of
rolling_aggregate
and will be removed soon.
- rolling_corr(rolling_args, other=None, pairwise=None, *args, **kwargs)¶
Create rolling window and compute correlation for each window.
- Parameters
rolling_args (list) – Rolling windows arguments with the same signature as
modin.pandas.DataFrame.rolling
.other (modin.pandas.Series, modin.pandas.DataFrame, list-like, optional) –
pairwise (bool, optional) –
*args (iterable) –
**kwargs (dict) –
- Returns
New QueryCompiler containing correlation for each window, built by the following rulles:
Output QueryCompiler has the same shape and axes labels as the source.
Each element is the correlation for the corresponding window.
- Return type
Notes
Please refer to
modin.pandas.Rolling.corr
for more information about parameters and output format.
- rolling_count(rolling_args)¶
Create rolling window and compute number of non-NA values for each window.
- Parameters
rolling_args (list) – Rolling windows arguments with the same signature as
modin.pandas.DataFrame.rolling
.- Returns
New QueryCompiler containing number of non-NA values for each window, built by the following rulles:
Output QueryCompiler has the same shape and axes labels as the source.
Each element is the number of non-NA values for the corresponding window.
- Return type
Notes
Please refer to
modin.pandas.Rolling.count
for more information about parameters and output format.
- rolling_cov(rolling_args, other=None, pairwise=None, ddof=1, **kwargs)¶
Create rolling window and compute covariance for each window.
- Parameters
rolling_args (list) – Rolling windows arguments with the same signature as
modin.pandas.DataFrame.rolling
.other (modin.pandas.Series, modin.pandas.DataFrame, list-like, optional) –
pairwise (bool, optional) –
ddof (int, default: 1) –
**kwargs (dict) –
- Returns
New QueryCompiler containing covariance for each window, built by the following rulles:
Output QueryCompiler has the same shape and axes labels as the source.
Each element is the covariance for the corresponding window.
- Return type
Notes
Please refer to
modin.pandas.Rolling.cov
for more information about parameters and output format.
- rolling_kurt(rolling_args, **kwargs)¶
Create rolling window and compute unbiased kurtosis for each window.
- Parameters
rolling_args (list) – Rolling windows arguments with the same signature as
modin.pandas.DataFrame.rolling
.**kwargs (dict) –
- Returns
New QueryCompiler containing unbiased kurtosis for each window, built by the following rulles:
Output QueryCompiler has the same shape and axes labels as the source.
Each element is the unbiased kurtosis for the corresponding window.
- Return type
Notes
Please refer to
modin.pandas.Rolling.kurt
for more information about parameters and output format.
- rolling_max(rolling_args, *args, **kwargs)¶
Create rolling window and compute maximum value for each window.
- Parameters
rolling_args (list) – Rolling windows arguments with the same signature as
modin.pandas.DataFrame.rolling
.*args (iterable) –
**kwargs (dict) –
- Returns
New QueryCompiler containing maximum value for each window, built by the following rulles:
Output QueryCompiler has the same shape and axes labels as the source.
Each element is the maximum value for the corresponding window.
- Return type
Notes
Please refer to
modin.pandas.Rolling.max
for more information about parameters and output format.
- rolling_mean(rolling_args, *args, **kwargs)¶
Create rolling window and compute mean value for each window.
- Parameters
rolling_args (list) – Rolling windows arguments with the same signature as
modin.pandas.DataFrame.rolling
.*args (iterable) –
**kwargs (dict) –
- Returns
New QueryCompiler containing mean value for each window, built by the following rulles:
Output QueryCompiler has the same shape and axes labels as the source.
Each element is the mean value for the corresponding window.
- Return type
Notes
Please refer to
modin.pandas.Rolling.mean
for more information about parameters and output format.
- rolling_median(rolling_args, **kwargs)¶
Create rolling window and compute median value for each window.
- Parameters
rolling_args (list) – Rolling windows arguments with the same signature as
modin.pandas.DataFrame.rolling
.**kwargs (dict) –
- Returns
New QueryCompiler containing median value for each window, built by the following rulles:
Output QueryCompiler has the same shape and axes labels as the source.
Each element is the median value for the corresponding window.
- Return type
Notes
Please refer to
modin.pandas.Rolling.median
for more information about parameters and output format.
- rolling_min(rolling_args, *args, **kwargs)¶
Create rolling window and compute minimum value for each window.
- Parameters
rolling_args (list) – Rolling windows arguments with the same signature as
modin.pandas.DataFrame.rolling
.*args (iterable) –
**kwargs (dict) –
- Returns
New QueryCompiler containing minimum value for each window, built by the following rulles:
Output QueryCompiler has the same shape and axes labels as the source.
Each element is the minimum value for the corresponding window.
- Return type
Notes
Please refer to
modin.pandas.Rolling.min
for more information about parameters and output format.
- rolling_quantile(rolling_args, quantile, interpolation='linear', **kwargs)¶
Create rolling window and compute quantile for each window.
- Parameters
rolling_args (list) – Rolling windows arguments with the same signature as
modin.pandas.DataFrame.rolling
.quantile (float) –
interpolation ({'linear', 'lower', 'higher', 'midpoint', 'nearest'}, default: 'linear') –
**kwargs (dict) –
- Returns
New QueryCompiler containing quantile for each window, built by the following rulles:
Output QueryCompiler has the same shape and axes labels as the source.
Each element is the quantile for the corresponding window.
- Return type
Notes
Please refer to
modin.pandas.Rolling.quantile
for more information about parameters and output format.
- rolling_skew(rolling_args, **kwargs)¶
Create rolling window and compute unbiased skewness for each window.
- Parameters
rolling_args (list) – Rolling windows arguments with the same signature as
modin.pandas.DataFrame.rolling
.**kwargs (dict) –
- Returns
New QueryCompiler containing unbiased skewness for each window, built by the following rulles:
Output QueryCompiler has the same shape and axes labels as the source.
Each element is the unbiased skewness for the corresponding window.
- Return type
Notes
Please refer to
modin.pandas.Rolling.skew
for more information about parameters and output format.
- rolling_std(rolling_args, ddof=1, *args, **kwargs)¶
Create rolling window and compute standart deviation for each window.
- Parameters
rolling_args (list) – Rolling windows arguments with the same signature as
modin.pandas.DataFrame.rolling
.ddof (int, default: 1) –
*args (iterable) –
**kwargs (dict) –
- Returns
New QueryCompiler containing standart deviation for each window, built by the following rulles:
Output QueryCompiler has the same shape and axes labels as the source.
Each element is the standart deviation for the corresponding window.
- Return type
Notes
Please refer to
modin.pandas.Rolling.std
for more information about parameters and output format.
- rolling_sum(rolling_args, *args, **kwargs)¶
Create rolling window and compute sum for each window.
- Parameters
rolling_args (list) – Rolling windows arguments with the same signature as
modin.pandas.DataFrame.rolling
.*args (iterable) –
**kwargs (dict) –
- Returns
New QueryCompiler containing sum for each window, built by the following rulles:
Output QueryCompiler has the same shape and axes labels as the source.
Each element is the sum for the corresponding window.
- Return type
Notes
Please refer to
modin.pandas.Rolling.sum
for more information about parameters and output format.
- rolling_var(rolling_args, ddof=1, *args, **kwargs)¶
Create rolling window and compute variance for each window.
- Parameters
rolling_args (list) – Rolling windows arguments with the same signature as
modin.pandas.DataFrame.rolling
.ddof (int, default: 1) –
*args (iterable) –
**kwargs (dict) –
- Returns
New QueryCompiler containing variance for each window, built by the following rulles:
Output QueryCompiler has the same shape and axes labels as the source.
Each element is the variance for the corresponding window.
- Return type
Notes
Please refer to
modin.pandas.Rolling.var
for more information about parameters and output format.
- round(**kwargs)¶
Round every numeric value up to specified number of decimals.
- Parameters
decimals (int or list-like) – Number of decimals to round each column to.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
QueryCompiler with rounded values.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.round
for more information about parameters and output format.
- rpow(other, **kwargs)¶
Perform element-wise exponential power (
other ** self
).If axes are not equal, perform frames alignment first.
- Parameters
other (BaseQueryCompiler, scalar or array-like) – Other operand of the binary operation.
broadcast (bool, default: False) – If other is a one-column query compiler, indicates whether it is a Series or not. Frames and Series have to be processed differently, however we can’t distinguish them at the query compiler level, so this parameter is a hint that is passed from a high-level API.
level (int or label) – In case of MultiIndex match index values on the passed level.
axis ({{0, 1}}) – Axis to match indices along for 1D other (list or QueryCompiler that represents Series). 0 is for index, when 1 is for columns.
fill_value (float or None) – Value to fill missing elements during frame alignment.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Result of binary operation.
- Return type
- rsub(other, **kwargs)¶
Perform element-wise substraction (
other - self
).If axes are not equal, perform frames alignment first.
- Parameters
other (BaseQueryCompiler, scalar or array-like) – Other operand of the binary operation.
broadcast (bool, default: False) – If other is a one-column query compiler, indicates whether it is a Series or not. Frames and Series have to be processed differently, however we can’t distinguish them at the query compiler level, so this parameter is a hint that is passed from a high-level API.
level (int or label) – In case of MultiIndex match index values on the passed level.
axis ({{0, 1}}) – Axis to match indices along for 1D other (list or QueryCompiler that represents Series). 0 is for index, when 1 is for columns.
fill_value (float or None) – Value to fill missing elements during frame alignment.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Result of binary operation.
- Return type
- rtruediv(other, **kwargs)¶
Perform element-wise division (
other / self
).If axes are not equal, perform frames alignment first.
- Parameters
other (BaseQueryCompiler, scalar or array-like) – Other operand of the binary operation.
broadcast (bool, default: False) – If other is a one-column query compiler, indicates whether it is a Series or not. Frames and Series have to be processed differently, however we can’t distinguish them at the query compiler level, so this parameter is a hint that is passed from a high-level API.
level (int or label) – In case of MultiIndex match index values on the passed level.
axis ({{0, 1}}) – Axis to match indices along for 1D other (list or QueryCompiler that represents Series). 0 is for index, when 1 is for columns.
fill_value (float or None) – Value to fill missing elements during frame alignment.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Result of binary operation.
- Return type
- searchsorted(**kwargs)¶
Find positions in a sorted self where value should be inserted to maintain order.
- Parameters
value (list-like) –
side ({"left", "right"}) –
sorter (list-like, optional) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
One-column QueryCompiler which contains indices to insert.
- Return type
Notes
Please refer to
modin.pandas.Series.searchsorted
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- sem(**kwargs)¶
Get the standard deviation of the mean for each column or row.
- Parameters
axis ({{0, 1}}) –
level (None, default: None) – Serves the compatibility purpose. Always has to be None.
numeric_only (bool, optional) –
skipna (bool, default: True) –
ddof (int) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
One-column QueryCompiler with index labels of the specified axis, where each row contains the standard deviation of the mean for the corresponding row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.sem
for more information about parameters and output format.
- series_update(other, **kwargs)¶
Update values of self using values of other at the corresponding indices.
- Parameters
other (BaseQueryCompiler) – One-column query compiler with updated values.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler with updated values.
- Return type
Notes
Please refer to
modin.pandas.Series.update
for more information about parameters and output format.
- series_view(**kwargs)¶
Reinterpret underlying data with new dtype.
- Parameters
dtype (dtype) – Data type to reinterpret underlying data with.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler of the same data in memory, with reinterpreted values.
- Return type
Notes
Be aware, that if this method do fallback to pandas, then newly created QueryCompiler will be the copy of the original data.
Please refer to
modin.pandas.Series.view
for more information about parameters and output format.
Warning
This method is supported only by one-column query compilers.
- set_index_from_columns(keys: List[Hashable], drop: bool = True, append: bool = False)¶
Create new row labels from a list of columns.
- Parameters
keys (list of hashable) – The list of column names that will become the new index.
drop (bool, default: True) – Whether or not to drop the columns provided in the keys argument.
append (bool, default: True) – Whether or not to add the columns in keys as new levels appended to the existing index.
- Returns
A new QueryCompiler with updated index.
- Return type
- set_index_name(name, axis=0)¶
Set index name for the specified axis.
- Parameters
name (hashable) – New index name.
axis ({0, 1}, default: 0) – Axis to set name along.
- set_index_names(names, axis=0)¶
Set index names for the specified axis.
- Parameters
names (list) – New index names.
axis ({0, 1}, default: 0) – Axis to set names along.
- setitem(axis, key, value)¶
Set the row/column defined by key to the value provided.
- Parameters
axis ({0, 1}) – Axis to set value along. 0 means set row, 1 means set column.
key (label) – Row/column label to set value in.
value (BaseQueryCompiler, list-like or scalar) – Define new row/column value.
- Returns
New QueryCompiler with updated key value.
- Return type
- skew(**kwargs)¶
Get the unbiased skew for each column or row.
- Parameters
axis ({{0, 1}}) –
level (None, default: None) – Serves the compatibility purpose. Always has to be None.
numeric_only (bool, optional) –
skipna (bool, default: True) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
One-column QueryCompiler with index labels of the specified axis, where each row contains the unbiased skew for the corresponding row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.skew
for more information about parameters and output format.
- sort_columns_by_row_values(rows, ascending=True, **kwargs)¶
Reorder the columns based on the lexicographic order of the given rows.
- Parameters
rows (label or list of labels) – The row or rows to sort by.
ascending (bool, default: True) – Sort in ascending order (True) or descending order (False).
kind ({"quicksort", "mergesort", "heapsort"}) –
na_position ({"first", "last"}) –
ignore_index (bool) –
key (callable(pandas.Index) -> pandas.Index, optional) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler that contains result of the sort.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.sort_values
for more information about parameters and output format.
- sort_index(**kwargs)¶
Sort data by index or column labels.
- Parameters
axis ({0, 1}) –
level (int, label or list of such) –
ascending (bool) –
inplace (bool) –
kind ({"quicksort", "mergesort", "heapsort"}) –
na_position ({"first", "last"}) –
sort_remaining (bool) –
ignore_index (bool) –
key (callable(pandas.Index) -> pandas.Index, optional) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler containing the data sorted by columns or indices.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.sort_index
for more information about parameters and output format.
- sort_rows_by_column_values(columns, ascending=True, **kwargs)¶
Reorder the rows based on the lexicographic order of the given columns.
- Parameters
columns (label or list of labels) – The column or columns to sort by.
ascending (bool, default: True) – Sort in ascending order (True) or descending order (False).
kind ({"quicksort", "mergesort", "heapsort"}) –
na_position ({"first", "last"}) –
ignore_index (bool) –
key (callable(pandas.Index) -> pandas.Index, optional) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler that contains result of the sort.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.sort_values
for more information about parameters and output format.
- stack(level, dropna)¶
Stack the prescribed level(s) from columns to index.
- Parameters
level (int or label) –
dropna (bool) –
- Returns
- Return type
Notes
Please refer to
modin.pandas.DataFrame.stack
for more information about parameters and output format.
- std(**kwargs)¶
Get the standard deviation for each column or row.
- Parameters
axis ({{0, 1}}) –
level (None, default: None) – Serves the compatibility purpose. Always has to be None.
numeric_only (bool, optional) –
skipna (bool, default: True) –
ddof (int) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
One-column QueryCompiler with index labels of the specified axis, where each row contains the standard deviation for the corresponding row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.std
for more information about parameters and output format.
- str___getitem__(key)¶
Apply “__getitem__” function to each string value in QueryCompiler.
- Parameters
key (object) –
- Returns
New QueryCompiler containing the result of execution of the “__getitem__” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.__getitem__
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_capitalize()¶
Apply “capitalize” function to each string value in QueryCompiler.
- Returns
New QueryCompiler containing the result of execution of the “capitalize” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.capitalize
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_center(width, fillchar=' ')¶
Apply “center” function to each string value in QueryCompiler.
- Parameters
width (int) –
fillchar (str, default: ' ') –
- Returns
New QueryCompiler containing the result of execution of the “center” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.center
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_contains(pat, case=True, flags=0, na=nan, regex=True)¶
Apply “contains” function to each string value in QueryCompiler.
- Parameters
pat (str) –
case (bool, default: True) –
flags (int, default: 0) –
na (object, default: np.NaN) –
regex (bool, default: True) –
- Returns
New QueryCompiler containing the result of execution of the “contains” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.contains
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_count(pat, flags=0, **kwargs)¶
Apply “count” function to each string value in QueryCompiler.
- Parameters
pat (str) –
flags (int, default: 0) –
**kwargs (dict) –
- Returns
New QueryCompiler containing the result of execution of the “count” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.count
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_endswith(pat, na=nan)¶
Apply “endswith” function to each string value in QueryCompiler.
- Parameters
pat (str) –
na (object, default: np.NaN) –
- Returns
New QueryCompiler containing the result of execution of the “endswith” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.endswith
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_find(sub, start=0, end=None)¶
Apply “find” function to each string value in QueryCompiler.
- Parameters
sub (str) –
start (int, default: 0) –
end (int, optional) –
- Returns
New QueryCompiler containing the result of execution of the “find” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.find
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_findall(pat, flags=0, **kwargs)¶
Apply “findall” function to each string value in QueryCompiler.
- Parameters
pat (str) –
flags (int, default: 0) –
**kwargs (dict) –
- Returns
New QueryCompiler containing the result of execution of the “findall” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.findall
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_get(i)¶
Apply “get” function to each string value in QueryCompiler.
- Parameters
i (int) –
- Returns
New QueryCompiler containing the result of execution of the “get” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.get
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_index(sub, start=0, end=None)¶
Apply “index” function to each string value in QueryCompiler.
- Parameters
sub (str) –
start (int, default: 0) –
end (int, optional) –
- Returns
New QueryCompiler containing the result of execution of the “index” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.index
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_isalnum()¶
Apply “isalnum” function to each string value in QueryCompiler.
- Returns
New QueryCompiler containing the result of execution of the “isalnum” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.isalnum
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_isalpha()¶
Apply “isalpha” function to each string value in QueryCompiler.
- Returns
New QueryCompiler containing the result of execution of the “isalpha” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.isalpha
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_isdecimal()¶
Apply “isdecimal” function to each string value in QueryCompiler.
- Returns
New QueryCompiler containing the result of execution of the “isdecimal” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.isdecimal
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_isdigit()¶
Apply “isdigit” function to each string value in QueryCompiler.
- Returns
New QueryCompiler containing the result of execution of the “isdigit” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.isdigit
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_islower()¶
Apply “islower” function to each string value in QueryCompiler.
- Returns
New QueryCompiler containing the result of execution of the “islower” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.islower
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_isnumeric()¶
Apply “isnumeric” function to each string value in QueryCompiler.
- Returns
New QueryCompiler containing the result of execution of the “isnumeric” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.isnumeric
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_isspace()¶
Apply “isspace” function to each string value in QueryCompiler.
- Returns
New QueryCompiler containing the result of execution of the “isspace” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.isspace
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_istitle()¶
Apply “istitle” function to each string value in QueryCompiler.
- Returns
New QueryCompiler containing the result of execution of the “istitle” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.istitle
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_isupper()¶
Apply “isupper” function to each string value in QueryCompiler.
- Returns
New QueryCompiler containing the result of execution of the “isupper” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.isupper
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_join(sep)¶
Apply “join” function to each string value in QueryCompiler.
- Parameters
sep (str) –
- Returns
New QueryCompiler containing the result of execution of the “join” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.join
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_len()¶
Apply “len” function to each string value in QueryCompiler.
- Returns
New QueryCompiler containing the result of execution of the “len” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.len
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_ljust(width, fillchar=' ')¶
Apply “ljust” function to each string value in QueryCompiler.
- Parameters
width (int) –
fillchar (str, default: ' ') –
- Returns
New QueryCompiler containing the result of execution of the “ljust” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.ljust
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_lower()¶
Apply “lower” function to each string value in QueryCompiler.
- Returns
New QueryCompiler containing the result of execution of the “lower” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.lower
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_lstrip(to_strip=None)¶
Apply “lstrip” function to each string value in QueryCompiler.
- Parameters
to_strip (str, optional) –
- Returns
New QueryCompiler containing the result of execution of the “lstrip” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.lstrip
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_match(pat, case=True, flags=0, na=nan)¶
Apply “match” function to each string value in QueryCompiler.
- Parameters
pat (str) –
case (bool, default: True) –
flags (int, default: 0) –
na (object, default: np.NaN) –
- Returns
New QueryCompiler containing the result of execution of the “match” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.match
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_normalize(form)¶
Apply “normalize” function to each string value in QueryCompiler.
- Parameters
form ({'NFC', 'NFKC', 'NFD', 'NFKD'}) –
- Returns
New QueryCompiler containing the result of execution of the “normalize” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.normalize
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_pad(width, side='left', fillchar=' ')¶
Apply “pad” function to each string value in QueryCompiler.
- Parameters
width (int) –
side ({'left', 'right', 'both'}, default: 'left') –
fillchar (str, default: ' ') –
- Returns
New QueryCompiler containing the result of execution of the “pad” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.pad
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_partition(sep=' ', expand=True)¶
Apply “partition” function to each string value in QueryCompiler.
- Parameters
sep (str, default: ' ') –
expand (bool, default: True) –
- Returns
New QueryCompiler containing the result of execution of the “partition” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.partition
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_repeat(repeats)¶
Apply “repeat” function to each string value in QueryCompiler.
- Parameters
repeats (int) –
- Returns
New QueryCompiler containing the result of execution of the “repeat” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.repeat
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_replace(pat, repl, n=- 1, case=None, flags=0, regex=True)¶
Apply “replace” function to each string value in QueryCompiler.
- Parameters
pat (str) –
repl (str or callable) –
n (int, default: -1) –
case (bool, optional) –
flags (int, default: 0) –
regex (bool, default: True) –
- Returns
New QueryCompiler containing the result of execution of the “replace” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.replace
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_rfind(sub, start=0, end=None)¶
Apply “rfind” function to each string value in QueryCompiler.
- Parameters
sub (str) –
start (int, default: 0) –
end (int, optional) –
- Returns
New QueryCompiler containing the result of execution of the “rfind” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.rfind
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_rindex(sub, start=0, end=None)¶
Apply “rindex” function to each string value in QueryCompiler.
- Parameters
sub (str) –
start (int, default: 0) –
end (int, optional) –
- Returns
New QueryCompiler containing the result of execution of the “rindex” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.rindex
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_rjust(width, fillchar=' ')¶
Apply “rjust” function to each string value in QueryCompiler.
- Parameters
width (int) –
fillchar (str, default: ' ') –
- Returns
New QueryCompiler containing the result of execution of the “rjust” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.rjust
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_rpartition(sep=' ', expand=True)¶
Apply “rpartition” function to each string value in QueryCompiler.
- Parameters
sep (str, default: ' ') –
expand (bool, default: True) –
- Returns
New QueryCompiler containing the result of execution of the “rpartition” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.rpartition
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_rsplit(pat=None, n=- 1, expand=False)¶
Apply “rsplit” function to each string value in QueryCompiler.
- Parameters
pat (str, optional) –
n (int, default: -1) –
expand (bool, default: False) –
- Returns
New QueryCompiler containing the result of execution of the “rsplit” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.rsplit
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_rstrip(to_strip=None)¶
Apply “rstrip” function to each string value in QueryCompiler.
- Parameters
to_strip (str, optional) –
- Returns
New QueryCompiler containing the result of execution of the “rstrip” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.rstrip
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_slice(start=None, stop=None, step=None)¶
Apply “slice” function to each string value in QueryCompiler.
- Parameters
start (int, optional) –
stop (int, optional) –
step (int, optional) –
- Returns
New QueryCompiler containing the result of execution of the “slice” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.slice
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_slice_replace(start=None, stop=None, repl=None)¶
Apply “slice_replace” function to each string value in QueryCompiler.
- Parameters
start (int, optional) –
stop (int, optional) –
repl (str or callable, optional) –
- Returns
New QueryCompiler containing the result of execution of the “slice_replace” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.slice_replace
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_split(pat=None, n=- 1, expand=False)¶
Apply “split” function to each string value in QueryCompiler.
- Parameters
pat (str, optional) –
n (int, default: -1) –
expand (bool, default: False) –
- Returns
New QueryCompiler containing the result of execution of the “split” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.split
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_startswith(pat, na=nan)¶
Apply “startswith” function to each string value in QueryCompiler.
- Parameters
pat (str) –
na (object, default: np.NaN) –
- Returns
New QueryCompiler containing the result of execution of the “startswith” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.startswith
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_strip(to_strip=None)¶
Apply “strip” function to each string value in QueryCompiler.
- Parameters
to_strip (str, optional) –
- Returns
New QueryCompiler containing the result of execution of the “strip” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.strip
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_swapcase()¶
Apply “swapcase” function to each string value in QueryCompiler.
- Returns
New QueryCompiler containing the result of execution of the “swapcase” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.swapcase
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_title()¶
Apply “title” function to each string value in QueryCompiler.
- Returns
New QueryCompiler containing the result of execution of the “title” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.title
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_translate(table)¶
Apply “translate” function to each string value in QueryCompiler.
- Parameters
table (dict) –
- Returns
New QueryCompiler containing the result of execution of the “translate” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.translate
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_upper()¶
Apply “upper” function to each string value in QueryCompiler.
- Returns
New QueryCompiler containing the result of execution of the “upper” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.upper
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_wrap(width, **kwargs)¶
Apply “wrap” function to each string value in QueryCompiler.
- Parameters
width (int) –
**kwargs (dict) –
- Returns
New QueryCompiler containing the result of execution of the “wrap” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.wrap
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- str_zfill(width)¶
Apply “zfill” function to each string value in QueryCompiler.
- Parameters
width (int) –
- Returns
New QueryCompiler containing the result of execution of the “zfill” function against each string element.
- Return type
Notes
Please refer to
modin.pandas.Series.str.zfill
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- sub(other, **kwargs)¶
Perform element-wise substraction (
self - other
).If axes are not equal, perform frames alignment first.
- Parameters
other (BaseQueryCompiler, scalar or array-like) – Other operand of the binary operation.
broadcast (bool, default: False) – If other is a one-column query compiler, indicates whether it is a Series or not. Frames and Series have to be processed differently, however we can’t distinguish them at the query compiler level, so this parameter is a hint that is passed from a high-level API.
level (int or label) – In case of MultiIndex match index values on the passed level.
axis ({{0, 1}}) – Axis to match indices along for 1D other (list or QueryCompiler that represents Series). 0 is for index, when 1 is for columns.
fill_value (float or None) – Value to fill missing elements during frame alignment.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Result of binary operation.
- Return type
- sum(**kwargs)¶
Get the sum for each column or row.
- Parameters
axis ({0, 1}) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
One-column QueryCompiler with index labels of the specified axis, where each row contains the sum for the corresponding row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.sum
for more information about parameters and output format.
- sum_min_count(**kwargs)¶
Get the sum for each column or row.
- Parameters
axis ({0, 1}) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
One-column QueryCompiler with index labels of the specified axis, where each row contains the sum for the corresponding row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.sum
for more information about parameters and output format.
- to_datetime(*args, **kwargs)¶
Convert columns of the QueryCompiler to the datetime dtype.
- Parameters
*args (iterable) –
**kwargs (dict) –
- Returns
QueryCompiler with all columns converted to datetime dtype.
- Return type
Notes
Please refer to
modin.pandas.to_datetime
for more information about parameters and output format.
- to_numeric(*args, **kwargs)¶
Convert underlying data to numeric dtype.
- Parameters
errors ({"ignore", "raise", "coerce"}) –
downcast ({"integer", "signed", "unsigned", "float", None}) –
*args (iterable) – Serves the compatibility purpose. Does not affect the result.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler with converted to numeric values.
- Return type
Notes
Please refer to
modin.pandas.to_numeric
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- to_numpy(**kwargs)¶
Convert underlying query compilers data to NumPy array.
- Parameters
dtype (dtype) – The dtype of the resulted array.
copy (bool) – Whether to ensure that the returned value is not a view on another array.
na_value (object) – The value to replace missing values with.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
The QueryCompiler converted to NumPy array.
- Return type
np.ndarray
- abstract to_pandas()¶
Convert underlying query compilers data to
pandas.DataFrame
.- Returns
The QueryCompiler converted to pandas.
- Return type
- transpose(*args, **kwargs)¶
Transpose this QueryCompiler.
- Parameters
copy (bool) – Whether to copy the data after transposing.
*args (iterable) – Serves the compatibility purpose. Does not affect the result.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Transposed new QueryCompiler.
- Return type
- truediv(other, **kwargs)¶
Perform element-wise division (
self / other
).If axes are not equal, perform frames alignment first.
- Parameters
other (BaseQueryCompiler, scalar or array-like) – Other operand of the binary operation.
broadcast (bool, default: False) – If other is a one-column query compiler, indicates whether it is a Series or not. Frames and Series have to be processed differently, however we can’t distinguish them at the query compiler level, so this parameter is a hint that is passed from a high-level API.
level (int or label) – In case of MultiIndex match index values on the passed level.
axis ({{0, 1}}) – Axis to match indices along for 1D other (list or QueryCompiler that represents Series). 0 is for index, when 1 is for columns.
fill_value (float or None) – Value to fill missing elements during frame alignment.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
Result of binary operation.
- Return type
- unique(**kwargs)¶
Get unique values of self.
- Parameters
**kwargs (dict) – Serves compatibility purpose. Does not affect the result.
- Returns
New QueryCompiler with unique values.
- Return type
Notes
Please refer to
modin.pandas.Series.unique
for more information about parameters and output format.Warning
This method is supported only by one-column query compilers.
- unstack(level, fill_value)¶
Pivot a level of the (necessarily hierarchical) index labels.
- Parameters
level (int or label) –
fill_value (scalar or dict) –
- Returns
- Return type
Notes
Please refer to
modin.pandas.DataFrame.unstack
for more information about parameters and output format.
- var(**kwargs)¶
Get the variance for each column or row.
- Parameters
axis ({{0, 1}}) –
level (None, default: None) – Serves the compatibility purpose. Always has to be None.
numeric_only (bool, optional) –
skipna (bool, default: True) –
ddof (int) –
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
One-column QueryCompiler with index labels of the specified axis, where each row contains the variance for the corresponding row or column.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.var
for more information about parameters and output format.
- view(index=None, columns=None)¶
Mask QueryCompiler with passed keys.
- Parameters
index (list of ints, optional) – Positional indices of rows to grab.
columns (list of ints, optional) – Positional indices of columns to grab.
- Returns
New masked QueryCompiler.
- Return type
- where(cond, other, **kwargs)¶
Update values of self using values from other at positions where cond is False.
- Parameters
cond (BaseQueryCompiler) – Boolean mask. True - keep the self value, False - replace by other value.
other (BaseQueryCompiler or pandas.Series) – Object to grab replacement values from.
axis ({0, 1}) – Axis to align frames along if axes of self, cond and other are not equal. 0 is for index, when 1 is for columns.
level (int or label, optional) – Level of MultiIndex to align frames along if axes of self, cond and other are not equal. Currently level parameter is not implemented, so only None value is acceptable.
**kwargs (dict) – Serves the compatibility purpose. Does not affect the result.
- Returns
QueryCompiler with updated data.
- Return type
Notes
Please refer to
modin.pandas.DataFrame.where
for more information about parameters and output format.
- window_mean(window_args, *args, **kwargs)¶
Create window of the specified type and compute mean for each window.
- Parameters
window_args (list) – Rolling windows arguments with the same signature as
modin.pandas.DataFrame.rolling
.*args (iterable) –
**kwargs (dict) –
- Returns
New QueryCompiler containing mean for each window, built by the following rulles:
Output QueryCompiler has the same shape and axes labels as the source.
Each element is the mean for the corresponding window.
- Return type
Notes
Please refer to
modin.pandas.Rolling.mean
for more information about parameters and output format.
- window_std(window_args, ddof=1, *args, **kwargs)¶
Create window of the specified type and compute standart deviation for each window.
- Parameters
window_args (list) – Rolling windows arguments with the same signature as
modin.pandas.DataFrame.rolling
.ddof (int, default: 1) –
*args (iterable) –
**kwargs (dict) –
- Returns
New QueryCompiler containing standart deviation for each window, built by the following rulles:
Output QueryCompiler has the same shape and axes labels as the source.
Each element is the standart deviation for the corresponding window.
- Return type
Notes
Please refer to
modin.pandas.Rolling.std
for more information about parameters and output format.
- window_sum(window_args, *args, **kwargs)¶
Create window of the specified type and compute sum for each window.
- Parameters
window_args (list) – Rolling windows arguments with the same signature as
modin.pandas.DataFrame.rolling
.*args (iterable) –
**kwargs (dict) –
- Returns
New QueryCompiler containing sum for each window, built by the following rulles:
Output QueryCompiler has the same shape and axes labels as the source.
Each element is the sum for the corresponding window.
- Return type
Notes
Please refer to
modin.pandas.Rolling.sum
for more information about parameters and output format.
- window_var(window_args, ddof=1, *args, **kwargs)¶
Create window of the specified type and compute variance for each window.
- Parameters
window_args (list) – Rolling windows arguments with the same signature as
modin.pandas.DataFrame.rolling
.ddof (int, default: 1) –
*args (iterable) –
**kwargs (dict) –
- Returns
New QueryCompiler containing variance for each window, built by the following rulles:
Output QueryCompiler has the same shape and axes labels as the source.
Each element is the variance for the corresponding window.
- Return type
Notes
Please refer to
modin.pandas.Rolling.var
for more information about parameters and output format.
- write_items(row_numeric_index, col_numeric_index, broadcasted_items)¶
Update QueryCompiler elements at the specified positions by passed values.
In contrast to
setitem
this method allows to do 2D assignments.- Parameters
row_numeric_index (list of ints) – Row positions to write value.
col_numeric_index (list of ints) – Column positions to write value.
broadcasted_items (2D-array) – Values to write. Have to be same size as defined by row_numeric_index and col_numeric_index.
- Returns
New QueryCompiler with updated values.
- Return type