partition stringclasses 3
values | func_name stringlengths 1 134 | docstring stringlengths 1 46.9k | path stringlengths 4 223 | original_string stringlengths 75 104k | code stringlengths 75 104k | docstring_tokens listlengths 1 1.97k | repo stringlengths 7 55 | language stringclasses 1
value | url stringlengths 87 315 | code_tokens listlengths 19 28.4k | sha stringlengths 40 40 |
|---|---|---|---|---|---|---|---|---|---|---|---|
train | get_table_columns | Extract columns names and python typos from metadata
Args:
metadata: Table metadata
Returns:
dict with columns names and python types | modin/experimental/engines/pandas_on_ray/sql.py | def get_table_columns(metadata):
""" Extract columns names and python typos from metadata
Args:
metadata: Table metadata
Returns:
dict with columns names and python types
"""
cols = OrderedDict()
for col in metadata.c:
name = str(col).rpartition(".")[2]
cols[nam... | def get_table_columns(metadata):
""" Extract columns names and python typos from metadata
Args:
metadata: Table metadata
Returns:
dict with columns names and python types
"""
cols = OrderedDict()
for col in metadata.c:
name = str(col).rpartition(".")[2]
cols[nam... | [
"Extract",
"columns",
"names",
"and",
"python",
"typos",
"from",
"metadata"
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/experimental/engines/pandas_on_ray/sql.py#L65-L78 | [
"def",
"get_table_columns",
"(",
"metadata",
")",
":",
"cols",
"=",
"OrderedDict",
"(",
")",
"for",
"col",
"in",
"metadata",
".",
"c",
":",
"name",
"=",
"str",
"(",
"col",
")",
".",
"rpartition",
"(",
"\".\"",
")",
"[",
"2",
"]",
"cols",
"[",
"name... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | check_query | Check query sanity
Args:
query: query string
Returns:
None | modin/experimental/engines/pandas_on_ray/sql.py | def check_query(query):
""" Check query sanity
Args:
query: query string
Returns:
None
"""
q = query.lower()
if "select " not in q:
raise InvalidQuery("SELECT word not found in the query: {0}".format(query))
if " from " not in q:
raise InvalidQuery("FROM wor... | def check_query(query):
""" Check query sanity
Args:
query: query string
Returns:
None
"""
q = query.lower()
if "select " not in q:
raise InvalidQuery("SELECT word not found in the query: {0}".format(query))
if " from " not in q:
raise InvalidQuery("FROM wor... | [
"Check",
"query",
"sanity"
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/experimental/engines/pandas_on_ray/sql.py#L93-L106 | [
"def",
"check_query",
"(",
"query",
")",
":",
"q",
"=",
"query",
".",
"lower",
"(",
")",
"if",
"\"select \"",
"not",
"in",
"q",
":",
"raise",
"InvalidQuery",
"(",
"\"SELECT word not found in the query: {0}\"",
".",
"format",
"(",
"query",
")",
")",
"if",
"... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | get_query_columns | Extract columns names and python typos from query
Args:
engine: SQLAlchemy connection engine
query: SQL query
Returns:
dict with columns names and python types | modin/experimental/engines/pandas_on_ray/sql.py | def get_query_columns(engine, query):
""" Extract columns names and python typos from query
Args:
engine: SQLAlchemy connection engine
query: SQL query
Returns:
dict with columns names and python types
"""
con = engine.connect()
result = con.execute(query).fetchone()
... | def get_query_columns(engine, query):
""" Extract columns names and python typos from query
Args:
engine: SQLAlchemy connection engine
query: SQL query
Returns:
dict with columns names and python types
"""
con = engine.connect()
result = con.execute(query).fetchone()
... | [
"Extract",
"columns",
"names",
"and",
"python",
"typos",
"from",
"query"
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/experimental/engines/pandas_on_ray/sql.py#L109-L126 | [
"def",
"get_query_columns",
"(",
"engine",
",",
"query",
")",
":",
"con",
"=",
"engine",
".",
"connect",
"(",
")",
"result",
"=",
"con",
".",
"execute",
"(",
"query",
")",
".",
"fetchone",
"(",
")",
"values",
"=",
"list",
"(",
"result",
")",
"cols_na... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | check_partition_column | Check partition_column existence and type
Args:
partition_column: partition_column name
cols: dict with columns names and python types
Returns:
None | modin/experimental/engines/pandas_on_ray/sql.py | def check_partition_column(partition_column, cols):
""" Check partition_column existence and type
Args:
partition_column: partition_column name
cols: dict with columns names and python types
Returns:
None
"""
for k, v in cols.items():
if k == partition_column:
... | def check_partition_column(partition_column, cols):
""" Check partition_column existence and type
Args:
partition_column: partition_column name
cols: dict with columns names and python types
Returns:
None
"""
for k, v in cols.items():
if k == partition_column:
... | [
"Check",
"partition_column",
"existence",
"and",
"type"
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/experimental/engines/pandas_on_ray/sql.py#L129-L149 | [
"def",
"check_partition_column",
"(",
"partition_column",
",",
"cols",
")",
":",
"for",
"k",
",",
"v",
"in",
"cols",
".",
"items",
"(",
")",
":",
"if",
"k",
"==",
"partition_column",
":",
"if",
"v",
"==",
"\"int\"",
":",
"return",
"else",
":",
"raise",... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | get_query_info | Return a columns name list and the query string
Args:
sql: SQL query or table name
con: database connection or url string
partition_column: column used to share the data between the workers
Returns:
Columns name list and query string | modin/experimental/engines/pandas_on_ray/sql.py | def get_query_info(sql, con, partition_column):
""" Return a columns name list and the query string
Args:
sql: SQL query or table name
con: database connection or url string
partition_column: column used to share the data between the workers
Returns:
Columns name list and q... | def get_query_info(sql, con, partition_column):
""" Return a columns name list and the query string
Args:
sql: SQL query or table name
con: database connection or url string
partition_column: column used to share the data between the workers
Returns:
Columns name list and q... | [
"Return",
"a",
"columns",
"name",
"list",
"and",
"the",
"query",
"string"
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/experimental/engines/pandas_on_ray/sql.py#L152-L175 | [
"def",
"get_query_info",
"(",
"sql",
",",
"con",
",",
"partition_column",
")",
":",
"engine",
"=",
"create_engine",
"(",
"con",
")",
"if",
"is_table",
"(",
"engine",
",",
"sql",
")",
":",
"table_metadata",
"=",
"get_table_metadata",
"(",
"engine",
",",
"sq... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | query_put_bounders | Put bounders in the query
Args:
query: SQL query string
partition_column: partition_column name
start: lower_bound
end: upper_bound
Returns:
Query with bounders | modin/experimental/engines/pandas_on_ray/sql.py | def query_put_bounders(query, partition_column, start, end):
""" Put bounders in the query
Args:
query: SQL query string
partition_column: partition_column name
start: lower_bound
end: upper_bound
Returns:
Query with bounders
"""
where = " WHERE TMP_TABLE.{0... | def query_put_bounders(query, partition_column, start, end):
""" Put bounders in the query
Args:
query: SQL query string
partition_column: partition_column name
start: lower_bound
end: upper_bound
Returns:
Query with bounders
"""
where = " WHERE TMP_TABLE.{0... | [
"Put",
"bounders",
"in",
"the",
"query"
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/experimental/engines/pandas_on_ray/sql.py#L178-L194 | [
"def",
"query_put_bounders",
"(",
"query",
",",
"partition_column",
",",
"start",
",",
"end",
")",
":",
"where",
"=",
"\" WHERE TMP_TABLE.{0} >= {1} AND TMP_TABLE.{0} <= {2}\"",
".",
"format",
"(",
"partition_column",
",",
"start",
",",
"end",
")",
"query_with_bounder... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.compute_index | Computes the index after a number of rows have been removed.
Note: In order for this to be used properly, the indexes must not be
changed before you compute this.
Args:
axis: The axis to extract the index from.
data_object: The new data object to extract the index f... | modin/backends/pandas/query_compiler.py | def compute_index(self, axis, data_object, compute_diff=True):
"""Computes the index after a number of rows have been removed.
Note: In order for this to be used properly, the indexes must not be
changed before you compute this.
Args:
axis: The axis to extract the index... | def compute_index(self, axis, data_object, compute_diff=True):
"""Computes the index after a number of rows have been removed.
Note: In order for this to be used properly, the indexes must not be
changed before you compute this.
Args:
axis: The axis to extract the index... | [
"Computes",
"the",
"index",
"after",
"a",
"number",
"of",
"rows",
"have",
"been",
"removed",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L64-L98 | [
"def",
"compute_index",
"(",
"self",
",",
"axis",
",",
"data_object",
",",
"compute_diff",
"=",
"True",
")",
":",
"def",
"pandas_index_extraction",
"(",
"df",
",",
"axis",
")",
":",
"if",
"not",
"axis",
":",
"return",
"df",
".",
"index",
"else",
":",
"... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler._prepare_method | Prepares methods given various metadata.
Args:
pandas_func: The function to prepare.
Returns
Helper function which handles potential transpose. | modin/backends/pandas/query_compiler.py | def _prepare_method(self, pandas_func, **kwargs):
"""Prepares methods given various metadata.
Args:
pandas_func: The function to prepare.
Returns
Helper function which handles potential transpose.
"""
if self._is_transposed:
def helper(df, in... | def _prepare_method(self, pandas_func, **kwargs):
"""Prepares methods given various metadata.
Args:
pandas_func: The function to prepare.
Returns
Helper function which handles potential transpose.
"""
if self._is_transposed:
def helper(df, in... | [
"Prepares",
"methods",
"given",
"various",
"metadata",
".",
"Args",
":",
"pandas_func",
":",
"The",
"function",
"to",
"prepare",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L141-L165 | [
"def",
"_prepare_method",
"(",
"self",
",",
"pandas_func",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"self",
".",
"_is_transposed",
":",
"def",
"helper",
"(",
"df",
",",
"internal_indices",
"=",
"[",
"]",
")",
":",
"if",
"len",
"(",
"internal_indices",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.numeric_columns | Returns the numeric columns of the Manager.
Returns:
List of index names. | modin/backends/pandas/query_compiler.py | def numeric_columns(self, include_bool=True):
"""Returns the numeric columns of the Manager.
Returns:
List of index names.
"""
columns = []
for col, dtype in zip(self.columns, self.dtypes):
if is_numeric_dtype(dtype) and (
include_bool or ... | def numeric_columns(self, include_bool=True):
"""Returns the numeric columns of the Manager.
Returns:
List of index names.
"""
columns = []
for col, dtype in zip(self.columns, self.dtypes):
if is_numeric_dtype(dtype) and (
include_bool or ... | [
"Returns",
"the",
"numeric",
"columns",
"of",
"the",
"Manager",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L167-L179 | [
"def",
"numeric_columns",
"(",
"self",
",",
"include_bool",
"=",
"True",
")",
":",
"columns",
"=",
"[",
"]",
"for",
"col",
",",
"dtype",
"in",
"zip",
"(",
"self",
".",
"columns",
",",
"self",
".",
"dtypes",
")",
":",
"if",
"is_numeric_dtype",
"(",
"d... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.numeric_function_clean_dataframe | Preprocesses numeric functions to clean dataframe and pick numeric indices.
Args:
axis: '0' if columns and '1' if rows.
Returns:
Tuple with return value(if any), indices to apply func to & cleaned Manager. | modin/backends/pandas/query_compiler.py | def numeric_function_clean_dataframe(self, axis):
"""Preprocesses numeric functions to clean dataframe and pick numeric indices.
Args:
axis: '0' if columns and '1' if rows.
Returns:
Tuple with return value(if any), indices to apply func to & cleaned Manager.
"""... | def numeric_function_clean_dataframe(self, axis):
"""Preprocesses numeric functions to clean dataframe and pick numeric indices.
Args:
axis: '0' if columns and '1' if rows.
Returns:
Tuple with return value(if any), indices to apply func to & cleaned Manager.
"""... | [
"Preprocesses",
"numeric",
"functions",
"to",
"clean",
"dataframe",
"and",
"pick",
"numeric",
"indices",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L181-L209 | [
"def",
"numeric_function_clean_dataframe",
"(",
"self",
",",
"axis",
")",
":",
"result",
"=",
"None",
"query_compiler",
"=",
"self",
"# If no numeric columns and over columns, then return empty Series",
"if",
"not",
"axis",
"and",
"len",
"(",
"self",
".",
"index",
")"... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler._join_index_objects | Joins a pair of index objects (columns or rows) by a given strategy.
Args:
axis: The axis index object to join (0 for columns, 1 for index).
other_index: The other_index to join on.
how: The type of join to join to make (e.g. right, left).
Returns:
Joine... | modin/backends/pandas/query_compiler.py | def _join_index_objects(self, axis, other_index, how, sort=True):
"""Joins a pair of index objects (columns or rows) by a given strategy.
Args:
axis: The axis index object to join (0 for columns, 1 for index).
other_index: The other_index to join on.
how: The type of... | def _join_index_objects(self, axis, other_index, how, sort=True):
"""Joins a pair of index objects (columns or rows) by a given strategy.
Args:
axis: The axis index object to join (0 for columns, 1 for index).
other_index: The other_index to join on.
how: The type of... | [
"Joins",
"a",
"pair",
"of",
"index",
"objects",
"(",
"columns",
"or",
"rows",
")",
"by",
"a",
"given",
"strategy",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L268-L289 | [
"def",
"_join_index_objects",
"(",
"self",
",",
"axis",
",",
"other_index",
",",
"how",
",",
"sort",
"=",
"True",
")",
":",
"if",
"isinstance",
"(",
"other_index",
",",
"list",
")",
":",
"joined_obj",
"=",
"self",
".",
"columns",
"if",
"not",
"axis",
"... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.join | Joins a list or two objects together.
Args:
other: The other object(s) to join on.
Returns:
Joined objects. | modin/backends/pandas/query_compiler.py | def join(self, other, **kwargs):
"""Joins a list or two objects together.
Args:
other: The other object(s) to join on.
Returns:
Joined objects.
"""
if not isinstance(other, list):
other = [other]
return self._join_list_of_managers(oth... | def join(self, other, **kwargs):
"""Joins a list or two objects together.
Args:
other: The other object(s) to join on.
Returns:
Joined objects.
"""
if not isinstance(other, list):
other = [other]
return self._join_list_of_managers(oth... | [
"Joins",
"a",
"list",
"or",
"two",
"objects",
"together",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L291-L302 | [
"def",
"join",
"(",
"self",
",",
"other",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"not",
"isinstance",
"(",
"other",
",",
"list",
")",
":",
"other",
"=",
"[",
"other",
"]",
"return",
"self",
".",
"_join_list_of_managers",
"(",
"other",
",",
"*",
"... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.concat | Concatenates two objects together.
Args:
axis: The axis index object to join (0 for columns, 1 for index).
other: The other_index to concat with.
Returns:
Concatenated objects. | modin/backends/pandas/query_compiler.py | def concat(self, axis, other, **kwargs):
"""Concatenates two objects together.
Args:
axis: The axis index object to join (0 for columns, 1 for index).
other: The other_index to concat with.
Returns:
Concatenated objects.
"""
return self._appe... | def concat(self, axis, other, **kwargs):
"""Concatenates two objects together.
Args:
axis: The axis index object to join (0 for columns, 1 for index).
other: The other_index to concat with.
Returns:
Concatenated objects.
"""
return self._appe... | [
"Concatenates",
"two",
"objects",
"together",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L304-L314 | [
"def",
"concat",
"(",
"self",
",",
"axis",
",",
"other",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"_append_list_of_managers",
"(",
"other",
",",
"axis",
",",
"*",
"*",
"kwargs",
")"
] | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.copartition | Copartition two QueryCompiler objects.
Args:
axis: The axis to copartition along.
other: The other Query Compiler(s) to copartition against.
how_to_join: How to manage joining the index object ("left", "right", etc.)
sort: Whether or not to sort the joined index.... | modin/backends/pandas/query_compiler.py | def copartition(self, axis, other, how_to_join, sort, force_repartition=False):
"""Copartition two QueryCompiler objects.
Args:
axis: The axis to copartition along.
other: The other Query Compiler(s) to copartition against.
how_to_join: How to manage joining the inde... | def copartition(self, axis, other, how_to_join, sort, force_repartition=False):
"""Copartition two QueryCompiler objects.
Args:
axis: The axis to copartition along.
other: The other Query Compiler(s) to copartition against.
how_to_join: How to manage joining the inde... | [
"Copartition",
"two",
"QueryCompiler",
"objects",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L380-L456 | [
"def",
"copartition",
"(",
"self",
",",
"axis",
",",
"other",
",",
"how_to_join",
",",
"sort",
",",
"force_repartition",
"=",
"False",
")",
":",
"if",
"isinstance",
"(",
"other",
",",
"type",
"(",
"self",
")",
")",
":",
"other",
"=",
"[",
"other",
"]... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.to_pandas | Converts Modin DataFrame to Pandas DataFrame.
Returns:
Pandas DataFrame of the DataManager. | modin/backends/pandas/query_compiler.py | def to_pandas(self):
"""Converts Modin DataFrame to Pandas DataFrame.
Returns:
Pandas DataFrame of the DataManager.
"""
df = self.data.to_pandas(is_transposed=self._is_transposed)
if df.empty:
if len(self.columns) != 0:
df = pandas.DataFra... | def to_pandas(self):
"""Converts Modin DataFrame to Pandas DataFrame.
Returns:
Pandas DataFrame of the DataManager.
"""
df = self.data.to_pandas(is_transposed=self._is_transposed)
if df.empty:
if len(self.columns) != 0:
df = pandas.DataFra... | [
"Converts",
"Modin",
"DataFrame",
"to",
"Pandas",
"DataFrame",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L468-L486 | [
"def",
"to_pandas",
"(",
"self",
")",
":",
"df",
"=",
"self",
".",
"data",
".",
"to_pandas",
"(",
"is_transposed",
"=",
"self",
".",
"_is_transposed",
")",
"if",
"df",
".",
"empty",
":",
"if",
"len",
"(",
"self",
".",
"columns",
")",
"!=",
"0",
":"... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.from_pandas | Improve simple Pandas DataFrame to an advanced and superior Modin DataFrame.
Args:
cls: DataManger object to convert the DataFrame to.
df: Pandas DataFrame object.
block_partitions_cls: BlockParitions object to store partitions
Returns:
Returns DataManag... | modin/backends/pandas/query_compiler.py | def from_pandas(cls, df, block_partitions_cls):
"""Improve simple Pandas DataFrame to an advanced and superior Modin DataFrame.
Args:
cls: DataManger object to convert the DataFrame to.
df: Pandas DataFrame object.
block_partitions_cls: BlockParitions object to store... | def from_pandas(cls, df, block_partitions_cls):
"""Improve simple Pandas DataFrame to an advanced and superior Modin DataFrame.
Args:
cls: DataManger object to convert the DataFrame to.
df: Pandas DataFrame object.
block_partitions_cls: BlockParitions object to store... | [
"Improve",
"simple",
"Pandas",
"DataFrame",
"to",
"an",
"advanced",
"and",
"superior",
"Modin",
"DataFrame",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L489-L504 | [
"def",
"from_pandas",
"(",
"cls",
",",
"df",
",",
"block_partitions_cls",
")",
":",
"new_index",
"=",
"df",
".",
"index",
"new_columns",
"=",
"df",
".",
"columns",
"new_dtypes",
"=",
"df",
".",
"dtypes",
"new_data",
"=",
"block_partitions_cls",
".",
"from_pa... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler._inter_manager_operations | Inter-data operations (e.g. add, sub).
Args:
other: The other Manager for the operation.
how_to_join: The type of join to join to make (e.g. right, outer).
Returns:
New DataManager with new data and index. | modin/backends/pandas/query_compiler.py | def _inter_manager_operations(self, other, how_to_join, func):
"""Inter-data operations (e.g. add, sub).
Args:
other: The other Manager for the operation.
how_to_join: The type of join to join to make (e.g. right, outer).
Returns:
New DataManager with new da... | def _inter_manager_operations(self, other, how_to_join, func):
"""Inter-data operations (e.g. add, sub).
Args:
other: The other Manager for the operation.
how_to_join: The type of join to join to make (e.g. right, outer).
Returns:
New DataManager with new da... | [
"Inter",
"-",
"data",
"operations",
"(",
"e",
".",
"g",
".",
"add",
"sub",
")",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L513-L552 | [
"def",
"_inter_manager_operations",
"(",
"self",
",",
"other",
",",
"how_to_join",
",",
"func",
")",
":",
"reindexed_self",
",",
"reindexed_other_list",
",",
"joined_index",
"=",
"self",
".",
"copartition",
"(",
"0",
",",
"other",
",",
"how_to_join",
",",
"Fal... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler._inter_df_op_handler | Helper method for inter-manager and scalar operations.
Args:
func: The function to use on the Manager/scalar.
other: The other Manager/scalar.
Returns:
New DataManager with new data and index. | modin/backends/pandas/query_compiler.py | def _inter_df_op_handler(self, func, other, **kwargs):
"""Helper method for inter-manager and scalar operations.
Args:
func: The function to use on the Manager/scalar.
other: The other Manager/scalar.
Returns:
New DataManager with new data and index.
... | def _inter_df_op_handler(self, func, other, **kwargs):
"""Helper method for inter-manager and scalar operations.
Args:
func: The function to use on the Manager/scalar.
other: The other Manager/scalar.
Returns:
New DataManager with new data and index.
... | [
"Helper",
"method",
"for",
"inter",
"-",
"manager",
"and",
"scalar",
"operations",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L554-L573 | [
"def",
"_inter_df_op_handler",
"(",
"self",
",",
"func",
",",
"other",
",",
"*",
"*",
"kwargs",
")",
":",
"axis",
"=",
"kwargs",
".",
"get",
"(",
"\"axis\"",
",",
"0",
")",
"axis",
"=",
"pandas",
".",
"DataFrame",
"(",
")",
".",
"_get_axis_number",
"... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.binary_op | Perform an operation between two objects.
Note: The list of operations is as follows:
- add
- eq
- floordiv
- ge
- gt
- le
- lt
- mod
- mul
- ne
- pow
- rfloordiv
... | modin/backends/pandas/query_compiler.py | def binary_op(self, op, other, **kwargs):
"""Perform an operation between two objects.
Note: The list of operations is as follows:
- add
- eq
- floordiv
- ge
- gt
- le
- lt
- mod
- mul
... | def binary_op(self, op, other, **kwargs):
"""Perform an operation between two objects.
Note: The list of operations is as follows:
- add
- eq
- floordiv
- ge
- gt
- le
- lt
- mod
- mul
... | [
"Perform",
"an",
"operation",
"between",
"two",
"objects",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L575-L608 | [
"def",
"binary_op",
"(",
"self",
",",
"op",
",",
"other",
",",
"*",
"*",
"kwargs",
")",
":",
"func",
"=",
"getattr",
"(",
"pandas",
".",
"DataFrame",
",",
"op",
")",
"return",
"self",
".",
"_inter_df_op_handler",
"(",
"func",
",",
"other",
",",
"*",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.update | Uses other manager to update corresponding values in this manager.
Args:
other: The other manager.
Returns:
New DataManager with updated data and index. | modin/backends/pandas/query_compiler.py | def update(self, other, **kwargs):
"""Uses other manager to update corresponding values in this manager.
Args:
other: The other manager.
Returns:
New DataManager with updated data and index.
"""
assert isinstance(
other, type(self)
),... | def update(self, other, **kwargs):
"""Uses other manager to update corresponding values in this manager.
Args:
other: The other manager.
Returns:
New DataManager with updated data and index.
"""
assert isinstance(
other, type(self)
),... | [
"Uses",
"other",
"manager",
"to",
"update",
"corresponding",
"values",
"in",
"this",
"manager",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L620-L639 | [
"def",
"update",
"(",
"self",
",",
"other",
",",
"*",
"*",
"kwargs",
")",
":",
"assert",
"isinstance",
"(",
"other",
",",
"type",
"(",
"self",
")",
")",
",",
"\"Must have the same DataManager subclass to perform this operation\"",
"def",
"update_builder",
"(",
"... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.where | Gets values from this manager where cond is true else from other.
Args:
cond: Condition on which to evaluate values.
Returns:
New DataManager with updated data and index. | modin/backends/pandas/query_compiler.py | def where(self, cond, other, **kwargs):
"""Gets values from this manager where cond is true else from other.
Args:
cond: Condition on which to evaluate values.
Returns:
New DataManager with updated data and index.
"""
assert isinstance(
cond... | def where(self, cond, other, **kwargs):
"""Gets values from this manager where cond is true else from other.
Args:
cond: Condition on which to evaluate values.
Returns:
New DataManager with updated data and index.
"""
assert isinstance(
cond... | [
"Gets",
"values",
"from",
"this",
"manager",
"where",
"cond",
"is",
"true",
"else",
"from",
"other",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L641-L697 | [
"def",
"where",
"(",
"self",
",",
"cond",
",",
"other",
",",
"*",
"*",
"kwargs",
")",
":",
"assert",
"isinstance",
"(",
"cond",
",",
"type",
"(",
"self",
")",
")",
",",
"\"Must have the same DataManager subclass to perform this operation\"",
"if",
"isinstance",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler._scalar_operations | Handler for mapping scalar operations across a Manager.
Args:
axis: The axis index object to execute the function on.
scalar: The scalar value to map.
func: The function to use on the Manager with the scalar.
Returns:
A new QueryCompiler with updated dat... | modin/backends/pandas/query_compiler.py | def _scalar_operations(self, axis, scalar, func):
"""Handler for mapping scalar operations across a Manager.
Args:
axis: The axis index object to execute the function on.
scalar: The scalar value to map.
func: The function to use on the Manager with the scalar.
... | def _scalar_operations(self, axis, scalar, func):
"""Handler for mapping scalar operations across a Manager.
Args:
axis: The axis index object to execute the function on.
scalar: The scalar value to map.
func: The function to use on the Manager with the scalar.
... | [
"Handler",
"for",
"mapping",
"scalar",
"operations",
"across",
"a",
"Manager",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L702-L728 | [
"def",
"_scalar_operations",
"(",
"self",
",",
"axis",
",",
"scalar",
",",
"func",
")",
":",
"if",
"isinstance",
"(",
"scalar",
",",
"(",
"list",
",",
"np",
".",
"ndarray",
",",
"pandas",
".",
"Series",
")",
")",
":",
"new_index",
"=",
"self",
".",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.reindex | Fits a new index for this Manger.
Args:
axis: The axis index object to target the reindex on.
labels: New labels to conform 'axis' on to.
Returns:
A new QueryCompiler with updated data and new index. | modin/backends/pandas/query_compiler.py | def reindex(self, axis, labels, **kwargs):
"""Fits a new index for this Manger.
Args:
axis: The axis index object to target the reindex on.
labels: New labels to conform 'axis' on to.
Returns:
A new QueryCompiler with updated data and new index.
"""
... | def reindex(self, axis, labels, **kwargs):
"""Fits a new index for this Manger.
Args:
axis: The axis index object to target the reindex on.
labels: New labels to conform 'axis' on to.
Returns:
A new QueryCompiler with updated data and new index.
"""
... | [
"Fits",
"a",
"new",
"index",
"for",
"this",
"Manger",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L733-L777 | [
"def",
"reindex",
"(",
"self",
",",
"axis",
",",
"labels",
",",
"*",
"*",
"kwargs",
")",
":",
"# To reindex, we need a function that will be shipped to each of the",
"# partitions.",
"def",
"reindex_builer",
"(",
"df",
",",
"axis",
",",
"old_labels",
",",
"new_label... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.reset_index | Removes all levels from index and sets a default level_0 index.
Returns:
A new QueryCompiler with updated data and reset index. | modin/backends/pandas/query_compiler.py | def reset_index(self, **kwargs):
"""Removes all levels from index and sets a default level_0 index.
Returns:
A new QueryCompiler with updated data and reset index.
"""
drop = kwargs.get("drop", False)
new_index = pandas.RangeIndex(len(self.index))
if not drop... | def reset_index(self, **kwargs):
"""Removes all levels from index and sets a default level_0 index.
Returns:
A new QueryCompiler with updated data and reset index.
"""
drop = kwargs.get("drop", False)
new_index = pandas.RangeIndex(len(self.index))
if not drop... | [
"Removes",
"all",
"levels",
"from",
"index",
"and",
"sets",
"a",
"default",
"level_0",
"index",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L779-L811 | [
"def",
"reset_index",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"drop",
"=",
"kwargs",
".",
"get",
"(",
"\"drop\"",
",",
"False",
")",
"new_index",
"=",
"pandas",
".",
"RangeIndex",
"(",
"len",
"(",
"self",
".",
"index",
")",
")",
"if",
"not"... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.transpose | Transposes this DataManager.
Returns:
Transposed new DataManager. | modin/backends/pandas/query_compiler.py | def transpose(self, *args, **kwargs):
"""Transposes this DataManager.
Returns:
Transposed new DataManager.
"""
new_data = self.data.transpose(*args, **kwargs)
# Switch the index and columns and transpose the
new_manager = self.__constructor__(new_data, self.c... | def transpose(self, *args, **kwargs):
"""Transposes this DataManager.
Returns:
Transposed new DataManager.
"""
new_data = self.data.transpose(*args, **kwargs)
# Switch the index and columns and transpose the
new_manager = self.__constructor__(new_data, self.c... | [
"Transposes",
"this",
"DataManager",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L828-L839 | [
"def",
"transpose",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"new_data",
"=",
"self",
".",
"data",
".",
"transpose",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"# Switch the index and columns and transpose the",
"new_manager",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler._full_reduce | Apply function that will reduce the data to a Pandas Series.
Args:
axis: 0 for columns and 1 for rows. Default is 0.
map_func: Callable function to map the dataframe.
reduce_func: Callable function to reduce the dataframe. If none,
then apply map_func twice.
... | modin/backends/pandas/query_compiler.py | def _full_reduce(self, axis, map_func, reduce_func=None):
"""Apply function that will reduce the data to a Pandas Series.
Args:
axis: 0 for columns and 1 for rows. Default is 0.
map_func: Callable function to map the dataframe.
reduce_func: Callable function to reduc... | def _full_reduce(self, axis, map_func, reduce_func=None):
"""Apply function that will reduce the data to a Pandas Series.
Args:
axis: 0 for columns and 1 for rows. Default is 0.
map_func: Callable function to map the dataframe.
reduce_func: Callable function to reduc... | [
"Apply",
"function",
"that",
"will",
"reduce",
"the",
"data",
"to",
"a",
"Pandas",
"Series",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L847-L874 | [
"def",
"_full_reduce",
"(",
"self",
",",
"axis",
",",
"map_func",
",",
"reduce_func",
"=",
"None",
")",
":",
"if",
"reduce_func",
"is",
"None",
":",
"reduce_func",
"=",
"map_func",
"mapped_parts",
"=",
"self",
".",
"data",
".",
"map_across_blocks",
"(",
"m... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.count | Counts the number of non-NaN objects for each column or row.
Return:
A new QueryCompiler object containing counts of non-NaN objects from each
column or row. | modin/backends/pandas/query_compiler.py | def count(self, **kwargs):
"""Counts the number of non-NaN objects for each column or row.
Return:
A new QueryCompiler object containing counts of non-NaN objects from each
column or row.
"""
if self._is_transposed:
kwargs["axis"] = kwargs.get("axis",... | def count(self, **kwargs):
"""Counts the number of non-NaN objects for each column or row.
Return:
A new QueryCompiler object containing counts of non-NaN objects from each
column or row.
"""
if self._is_transposed:
kwargs["axis"] = kwargs.get("axis",... | [
"Counts",
"the",
"number",
"of",
"non",
"-",
"NaN",
"objects",
"for",
"each",
"column",
"or",
"row",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L893-L906 | [
"def",
"count",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"self",
".",
"_is_transposed",
":",
"kwargs",
"[",
"\"axis\"",
"]",
"=",
"kwargs",
".",
"get",
"(",
"\"axis\"",
",",
"0",
")",
"^",
"1",
"return",
"self",
".",
"transpose",
"(",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.mean | Returns the mean for each numerical column or row.
Return:
A new QueryCompiler object containing the mean from each numerical column or
row. | modin/backends/pandas/query_compiler.py | def mean(self, **kwargs):
"""Returns the mean for each numerical column or row.
Return:
A new QueryCompiler object containing the mean from each numerical column or
row.
"""
if self._is_transposed:
kwargs["axis"] = kwargs.get("axis", 0) ^ 1
... | def mean(self, **kwargs):
"""Returns the mean for each numerical column or row.
Return:
A new QueryCompiler object containing the mean from each numerical column or
row.
"""
if self._is_transposed:
kwargs["axis"] = kwargs.get("axis", 0) ^ 1
... | [
"Returns",
"the",
"mean",
"for",
"each",
"numerical",
"column",
"or",
"row",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L920-L938 | [
"def",
"mean",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"self",
".",
"_is_transposed",
":",
"kwargs",
"[",
"\"axis\"",
"]",
"=",
"kwargs",
".",
"get",
"(",
"\"axis\"",
",",
"0",
")",
"^",
"1",
"return",
"self",
".",
"transpose",
"(",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.min | Returns the minimum from each column or row.
Return:
A new QueryCompiler object with the minimum value from each column or row. | modin/backends/pandas/query_compiler.py | def min(self, **kwargs):
"""Returns the minimum from each column or row.
Return:
A new QueryCompiler object with the minimum value from each column or row.
"""
if self._is_transposed:
kwargs["axis"] = kwargs.get("axis", 0) ^ 1
return self.transpose().... | def min(self, **kwargs):
"""Returns the minimum from each column or row.
Return:
A new QueryCompiler object with the minimum value from each column or row.
"""
if self._is_transposed:
kwargs["axis"] = kwargs.get("axis", 0) ^ 1
return self.transpose().... | [
"Returns",
"the",
"minimum",
"from",
"each",
"column",
"or",
"row",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L940-L950 | [
"def",
"min",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"self",
".",
"_is_transposed",
":",
"kwargs",
"[",
"\"axis\"",
"]",
"=",
"kwargs",
".",
"get",
"(",
"\"axis\"",
",",
"0",
")",
"^",
"1",
"return",
"self",
".",
"transpose",
"(",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler._process_sum_prod | Calculates the sum or product of the DataFrame.
Args:
func: Pandas func to apply to DataFrame.
ignore_axis: Whether to ignore axis when raising TypeError
Return:
A new QueryCompiler object with sum or prod of the object. | modin/backends/pandas/query_compiler.py | def _process_sum_prod(self, func, **kwargs):
"""Calculates the sum or product of the DataFrame.
Args:
func: Pandas func to apply to DataFrame.
ignore_axis: Whether to ignore axis when raising TypeError
Return:
A new QueryCompiler object with sum or prod of th... | def _process_sum_prod(self, func, **kwargs):
"""Calculates the sum or product of the DataFrame.
Args:
func: Pandas func to apply to DataFrame.
ignore_axis: Whether to ignore axis when raising TypeError
Return:
A new QueryCompiler object with sum or prod of th... | [
"Calculates",
"the",
"sum",
"or",
"product",
"of",
"the",
"DataFrame",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L952-L970 | [
"def",
"_process_sum_prod",
"(",
"self",
",",
"func",
",",
"*",
"*",
"kwargs",
")",
":",
"axis",
"=",
"kwargs",
".",
"get",
"(",
"\"axis\"",
",",
"0",
")",
"min_count",
"=",
"kwargs",
".",
"get",
"(",
"\"min_count\"",
",",
"0",
")",
"def",
"sum_prod_... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.prod | Returns the product of each numerical column or row.
Return:
A new QueryCompiler object with the product of each numerical column or row. | modin/backends/pandas/query_compiler.py | def prod(self, **kwargs):
"""Returns the product of each numerical column or row.
Return:
A new QueryCompiler object with the product of each numerical column or row.
"""
if self._is_transposed:
kwargs["axis"] = kwargs.get("axis", 0) ^ 1
return self.t... | def prod(self, **kwargs):
"""Returns the product of each numerical column or row.
Return:
A new QueryCompiler object with the product of each numerical column or row.
"""
if self._is_transposed:
kwargs["axis"] = kwargs.get("axis", 0) ^ 1
return self.t... | [
"Returns",
"the",
"product",
"of",
"each",
"numerical",
"column",
"or",
"row",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L972-L983 | [
"def",
"prod",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"self",
".",
"_is_transposed",
":",
"kwargs",
"[",
"\"axis\"",
"]",
"=",
"kwargs",
".",
"get",
"(",
"\"axis\"",
",",
"0",
")",
"^",
"1",
"return",
"self",
".",
"transpose",
"(",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler._process_all_any | Calculates if any or all the values are true.
Return:
A new QueryCompiler object containing boolean values or boolean. | modin/backends/pandas/query_compiler.py | def _process_all_any(self, func, **kwargs):
"""Calculates if any or all the values are true.
Return:
A new QueryCompiler object containing boolean values or boolean.
"""
axis = kwargs.get("axis", 0)
axis = 0 if axis is None else axis
kwargs["axis"] = axis
... | def _process_all_any(self, func, **kwargs):
"""Calculates if any or all the values are true.
Return:
A new QueryCompiler object containing boolean values or boolean.
"""
axis = kwargs.get("axis", 0)
axis = 0 if axis is None else axis
kwargs["axis"] = axis
... | [
"Calculates",
"if",
"any",
"or",
"all",
"the",
"values",
"are",
"true",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L998-L1008 | [
"def",
"_process_all_any",
"(",
"self",
",",
"func",
",",
"*",
"*",
"kwargs",
")",
":",
"axis",
"=",
"kwargs",
".",
"get",
"(",
"\"axis\"",
",",
"0",
")",
"axis",
"=",
"0",
"if",
"axis",
"is",
"None",
"else",
"axis",
"kwargs",
"[",
"\"axis\"",
"]",... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.all | Returns whether all the elements are true, potentially over an axis.
Return:
A new QueryCompiler object containing boolean values or boolean. | modin/backends/pandas/query_compiler.py | def all(self, **kwargs):
"""Returns whether all the elements are true, potentially over an axis.
Return:
A new QueryCompiler object containing boolean values or boolean.
"""
if self._is_transposed:
# Pandas ignores on axis=1
kwargs["bool_only"] = Fals... | def all(self, **kwargs):
"""Returns whether all the elements are true, potentially over an axis.
Return:
A new QueryCompiler object containing boolean values or boolean.
"""
if self._is_transposed:
# Pandas ignores on axis=1
kwargs["bool_only"] = Fals... | [
"Returns",
"whether",
"all",
"the",
"elements",
"are",
"true",
"potentially",
"over",
"an",
"axis",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1010-L1021 | [
"def",
"all",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"self",
".",
"_is_transposed",
":",
"# Pandas ignores on axis=1",
"kwargs",
"[",
"\"bool_only\"",
"]",
"=",
"False",
"kwargs",
"[",
"\"axis\"",
"]",
"=",
"kwargs",
".",
"get",
"(",
"\"ax... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.astype | Converts columns dtypes to given dtypes.
Args:
col_dtypes: Dictionary of {col: dtype,...} where col is the column
name and dtype is a numpy dtype.
Returns:
DataFrame with updated dtypes. | modin/backends/pandas/query_compiler.py | def astype(self, col_dtypes, **kwargs):
"""Converts columns dtypes to given dtypes.
Args:
col_dtypes: Dictionary of {col: dtype,...} where col is the column
name and dtype is a numpy dtype.
Returns:
DataFrame with updated dtypes.
"""
# Gr... | def astype(self, col_dtypes, **kwargs):
"""Converts columns dtypes to given dtypes.
Args:
col_dtypes: Dictionary of {col: dtype,...} where col is the column
name and dtype is a numpy dtype.
Returns:
DataFrame with updated dtypes.
"""
# Gr... | [
"Converts",
"columns",
"dtypes",
"to",
"given",
"dtypes",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1090-L1140 | [
"def",
"astype",
"(",
"self",
",",
"col_dtypes",
",",
"*",
"*",
"kwargs",
")",
":",
"# Group indices to update by dtype for less map operations",
"dtype_indices",
"=",
"{",
"}",
"columns",
"=",
"col_dtypes",
".",
"keys",
"(",
")",
"numeric_indices",
"=",
"list",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler._full_axis_reduce | Applies map that reduce Manager to series but require knowledge of full axis.
Args:
func: Function to reduce the Manager by. This function takes in a Manager.
axis: axis to apply the function to.
alternate_index: If the resulting series should have an index
d... | modin/backends/pandas/query_compiler.py | def _full_axis_reduce(self, axis, func, alternate_index=None):
"""Applies map that reduce Manager to series but require knowledge of full axis.
Args:
func: Function to reduce the Manager by. This function takes in a Manager.
axis: axis to apply the function to.
alter... | def _full_axis_reduce(self, axis, func, alternate_index=None):
"""Applies map that reduce Manager to series but require knowledge of full axis.
Args:
func: Function to reduce the Manager by. This function takes in a Manager.
axis: axis to apply the function to.
alter... | [
"Applies",
"map",
"that",
"reduce",
"Manager",
"to",
"series",
"but",
"require",
"knowledge",
"of",
"full",
"axis",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1148-L1166 | [
"def",
"_full_axis_reduce",
"(",
"self",
",",
"axis",
",",
"func",
",",
"alternate_index",
"=",
"None",
")",
":",
"result",
"=",
"self",
".",
"data",
".",
"map_across_full_axis",
"(",
"axis",
",",
"func",
")",
"if",
"axis",
"==",
"0",
":",
"columns",
"... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.first_valid_index | Returns index of first non-NaN/NULL value.
Return:
Scalar of index name. | modin/backends/pandas/query_compiler.py | def first_valid_index(self):
"""Returns index of first non-NaN/NULL value.
Return:
Scalar of index name.
"""
# It may be possible to incrementally check each partition, but this
# computation is fairly cheap.
def first_valid_index_builder(df):
df.... | def first_valid_index(self):
"""Returns index of first non-NaN/NULL value.
Return:
Scalar of index name.
"""
# It may be possible to incrementally check each partition, but this
# computation is fairly cheap.
def first_valid_index_builder(df):
df.... | [
"Returns",
"index",
"of",
"first",
"non",
"-",
"NaN",
"/",
"NULL",
"value",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1168-L1185 | [
"def",
"first_valid_index",
"(",
"self",
")",
":",
"# It may be possible to incrementally check each partition, but this",
"# computation is fairly cheap.",
"def",
"first_valid_index_builder",
"(",
"df",
")",
":",
"df",
".",
"index",
"=",
"pandas",
".",
"RangeIndex",
"(",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.idxmax | Returns the first occurrence of the maximum over requested axis.
Returns:
A new QueryCompiler object containing the maximum of each column or axis. | modin/backends/pandas/query_compiler.py | def idxmax(self, **kwargs):
"""Returns the first occurrence of the maximum over requested axis.
Returns:
A new QueryCompiler object containing the maximum of each column or axis.
"""
if self._is_transposed:
kwargs["axis"] = kwargs.get("axis", 0) ^ 1
r... | def idxmax(self, **kwargs):
"""Returns the first occurrence of the maximum over requested axis.
Returns:
A new QueryCompiler object containing the maximum of each column or axis.
"""
if self._is_transposed:
kwargs["axis"] = kwargs.get("axis", 0) ^ 1
r... | [
"Returns",
"the",
"first",
"occurrence",
"of",
"the",
"maximum",
"over",
"requested",
"axis",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1187-L1208 | [
"def",
"idxmax",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"self",
".",
"_is_transposed",
":",
"kwargs",
"[",
"\"axis\"",
"]",
"=",
"kwargs",
".",
"get",
"(",
"\"axis\"",
",",
"0",
")",
"^",
"1",
"return",
"self",
".",
"transpose",
"(",... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.idxmin | Returns the first occurrence of the minimum over requested axis.
Returns:
A new QueryCompiler object containing the minimum of each column or axis. | modin/backends/pandas/query_compiler.py | def idxmin(self, **kwargs):
"""Returns the first occurrence of the minimum over requested axis.
Returns:
A new QueryCompiler object containing the minimum of each column or axis.
"""
if self._is_transposed:
kwargs["axis"] = kwargs.get("axis", 0) ^ 1
r... | def idxmin(self, **kwargs):
"""Returns the first occurrence of the minimum over requested axis.
Returns:
A new QueryCompiler object containing the minimum of each column or axis.
"""
if self._is_transposed:
kwargs["axis"] = kwargs.get("axis", 0) ^ 1
r... | [
"Returns",
"the",
"first",
"occurrence",
"of",
"the",
"minimum",
"over",
"requested",
"axis",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1210-L1231 | [
"def",
"idxmin",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"self",
".",
"_is_transposed",
":",
"kwargs",
"[",
"\"axis\"",
"]",
"=",
"kwargs",
".",
"get",
"(",
"\"axis\"",
",",
"0",
")",
"^",
"1",
"return",
"self",
".",
"transpose",
"(",... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.last_valid_index | Returns index of last non-NaN/NULL value.
Return:
Scalar of index name. | modin/backends/pandas/query_compiler.py | def last_valid_index(self):
"""Returns index of last non-NaN/NULL value.
Return:
Scalar of index name.
"""
def last_valid_index_builder(df):
df.index = pandas.RangeIndex(len(df.index))
return df.apply(lambda df: df.last_valid_index())
func =... | def last_valid_index(self):
"""Returns index of last non-NaN/NULL value.
Return:
Scalar of index name.
"""
def last_valid_index_builder(df):
df.index = pandas.RangeIndex(len(df.index))
return df.apply(lambda df: df.last_valid_index())
func =... | [
"Returns",
"index",
"of",
"last",
"non",
"-",
"NaN",
"/",
"NULL",
"value",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1233-L1249 | [
"def",
"last_valid_index",
"(",
"self",
")",
":",
"def",
"last_valid_index_builder",
"(",
"df",
")",
":",
"df",
".",
"index",
"=",
"pandas",
".",
"RangeIndex",
"(",
"len",
"(",
"df",
".",
"index",
")",
")",
"return",
"df",
".",
"apply",
"(",
"lambda",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.median | Returns median of each column or row.
Returns:
A new QueryCompiler object containing the median of each column or row. | modin/backends/pandas/query_compiler.py | def median(self, **kwargs):
"""Returns median of each column or row.
Returns:
A new QueryCompiler object containing the median of each column or row.
"""
if self._is_transposed:
kwargs["axis"] = kwargs.get("axis", 0) ^ 1
return self.transpose().median... | def median(self, **kwargs):
"""Returns median of each column or row.
Returns:
A new QueryCompiler object containing the median of each column or row.
"""
if self._is_transposed:
kwargs["axis"] = kwargs.get("axis", 0) ^ 1
return self.transpose().median... | [
"Returns",
"median",
"of",
"each",
"column",
"or",
"row",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1251-L1263 | [
"def",
"median",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"self",
".",
"_is_transposed",
":",
"kwargs",
"[",
"\"axis\"",
"]",
"=",
"kwargs",
".",
"get",
"(",
"\"axis\"",
",",
"0",
")",
"^",
"1",
"return",
"self",
".",
"transpose",
"(",... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.memory_usage | Returns the memory usage of each column.
Returns:
A new QueryCompiler object containing the memory usage of each column. | modin/backends/pandas/query_compiler.py | def memory_usage(self, **kwargs):
"""Returns the memory usage of each column.
Returns:
A new QueryCompiler object containing the memory usage of each column.
"""
def memory_usage_builder(df, **kwargs):
return df.memory_usage(**kwargs)
func = self._build... | def memory_usage(self, **kwargs):
"""Returns the memory usage of each column.
Returns:
A new QueryCompiler object containing the memory usage of each column.
"""
def memory_usage_builder(df, **kwargs):
return df.memory_usage(**kwargs)
func = self._build... | [
"Returns",
"the",
"memory",
"usage",
"of",
"each",
"column",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1265-L1276 | [
"def",
"memory_usage",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"def",
"memory_usage_builder",
"(",
"df",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"df",
".",
"memory_usage",
"(",
"*",
"*",
"kwargs",
")",
"func",
"=",
"self",
".",
"_build_m... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.quantile_for_single_value | Returns quantile of each column or row.
Returns:
A new QueryCompiler object containing the quantile of each column or row. | modin/backends/pandas/query_compiler.py | def quantile_for_single_value(self, **kwargs):
"""Returns quantile of each column or row.
Returns:
A new QueryCompiler object containing the quantile of each column or row.
"""
if self._is_transposed:
kwargs["axis"] = kwargs.get("axis", 0) ^ 1
return ... | def quantile_for_single_value(self, **kwargs):
"""Returns quantile of each column or row.
Returns:
A new QueryCompiler object containing the quantile of each column or row.
"""
if self._is_transposed:
kwargs["axis"] = kwargs.get("axis", 0) ^ 1
return ... | [
"Returns",
"quantile",
"of",
"each",
"column",
"or",
"row",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1291-L1316 | [
"def",
"quantile_for_single_value",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"self",
".",
"_is_transposed",
":",
"kwargs",
"[",
"\"axis\"",
"]",
"=",
"kwargs",
".",
"get",
"(",
"\"axis\"",
",",
"0",
")",
"^",
"1",
"return",
"self",
".",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler._full_axis_reduce_along_select_indices | Reduce Manger along select indices using function that needs full axis.
Args:
func: Callable that reduces the dimension of the object and requires full
knowledge of the entire axis.
axis: 0 for columns and 1 for rows. Defaults to 0.
index: Index of the result... | modin/backends/pandas/query_compiler.py | def _full_axis_reduce_along_select_indices(self, func, axis, index):
"""Reduce Manger along select indices using function that needs full axis.
Args:
func: Callable that reduces the dimension of the object and requires full
knowledge of the entire axis.
axis: 0 f... | def _full_axis_reduce_along_select_indices(self, func, axis, index):
"""Reduce Manger along select indices using function that needs full axis.
Args:
func: Callable that reduces the dimension of the object and requires full
knowledge of the entire axis.
axis: 0 f... | [
"Reduce",
"Manger",
"along",
"select",
"indices",
"using",
"function",
"that",
"needs",
"full",
"axis",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1367-L1385 | [
"def",
"_full_axis_reduce_along_select_indices",
"(",
"self",
",",
"func",
",",
"axis",
",",
"index",
")",
":",
"# Convert indices to numeric indices",
"old_index",
"=",
"self",
".",
"index",
"if",
"axis",
"else",
"self",
".",
"columns",
"numeric_indices",
"=",
"[... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.describe | Generates descriptive statistics.
Returns:
DataFrame object containing the descriptive statistics of the DataFrame. | modin/backends/pandas/query_compiler.py | def describe(self, **kwargs):
"""Generates descriptive statistics.
Returns:
DataFrame object containing the descriptive statistics of the DataFrame.
"""
# Use pandas to calculate the correct columns
new_columns = (
pandas.DataFrame(columns=self.columns)
... | def describe(self, **kwargs):
"""Generates descriptive statistics.
Returns:
DataFrame object containing the descriptive statistics of the DataFrame.
"""
# Use pandas to calculate the correct columns
new_columns = (
pandas.DataFrame(columns=self.columns)
... | [
"Generates",
"descriptive",
"statistics",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1387-L1408 | [
"def",
"describe",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"# Use pandas to calculate the correct columns",
"new_columns",
"=",
"(",
"pandas",
".",
"DataFrame",
"(",
"columns",
"=",
"self",
".",
"columns",
")",
".",
"astype",
"(",
"self",
".",
"dtype... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.dropna | Returns a new QueryCompiler with null values dropped along given axis.
Return:
a new DataManager | modin/backends/pandas/query_compiler.py | def dropna(self, **kwargs):
"""Returns a new QueryCompiler with null values dropped along given axis.
Return:
a new DataManager
"""
axis = kwargs.get("axis", 0)
subset = kwargs.get("subset", None)
thresh = kwargs.get("thresh", None)
how = kwargs.get("h... | def dropna(self, **kwargs):
"""Returns a new QueryCompiler with null values dropped along given axis.
Return:
a new DataManager
"""
axis = kwargs.get("axis", 0)
subset = kwargs.get("subset", None)
thresh = kwargs.get("thresh", None)
how = kwargs.get("h... | [
"Returns",
"a",
"new",
"QueryCompiler",
"with",
"null",
"values",
"dropped",
"along",
"given",
"axis",
".",
"Return",
":",
"a",
"new",
"DataManager"
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1460-L1525 | [
"def",
"dropna",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"axis",
"=",
"kwargs",
".",
"get",
"(",
"\"axis\"",
",",
"0",
")",
"subset",
"=",
"kwargs",
".",
"get",
"(",
"\"subset\"",
",",
"None",
")",
"thresh",
"=",
"kwargs",
".",
"get",
"("... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.eval | Returns a new QueryCompiler with expr evaluated on columns.
Args:
expr: The string expression to evaluate.
Returns:
A new QueryCompiler with new columns after applying expr. | modin/backends/pandas/query_compiler.py | def eval(self, expr, **kwargs):
"""Returns a new QueryCompiler with expr evaluated on columns.
Args:
expr: The string expression to evaluate.
Returns:
A new QueryCompiler with new columns after applying expr.
"""
columns = self.index if self._is_transpos... | def eval(self, expr, **kwargs):
"""Returns a new QueryCompiler with expr evaluated on columns.
Args:
expr: The string expression to evaluate.
Returns:
A new QueryCompiler with new columns after applying expr.
"""
columns = self.index if self._is_transpos... | [
"Returns",
"a",
"new",
"QueryCompiler",
"with",
"expr",
"evaluated",
"on",
"columns",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1527-L1562 | [
"def",
"eval",
"(",
"self",
",",
"expr",
",",
"*",
"*",
"kwargs",
")",
":",
"columns",
"=",
"self",
".",
"index",
"if",
"self",
".",
"_is_transposed",
"else",
"self",
".",
"columns",
"index",
"=",
"self",
".",
"columns",
"if",
"self",
".",
"_is_trans... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.mode | Returns a new QueryCompiler with modes calculated for each label along given axis.
Returns:
A new QueryCompiler with modes calculated. | modin/backends/pandas/query_compiler.py | def mode(self, **kwargs):
"""Returns a new QueryCompiler with modes calculated for each label along given axis.
Returns:
A new QueryCompiler with modes calculated.
"""
axis = kwargs.get("axis", 0)
def mode_builder(df, **kwargs):
result = df.mode(**kwargs... | def mode(self, **kwargs):
"""Returns a new QueryCompiler with modes calculated for each label along given axis.
Returns:
A new QueryCompiler with modes calculated.
"""
axis = kwargs.get("axis", 0)
def mode_builder(df, **kwargs):
result = df.mode(**kwargs... | [
"Returns",
"a",
"new",
"QueryCompiler",
"with",
"modes",
"calculated",
"for",
"each",
"label",
"along",
"given",
"axis",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1564-L1601 | [
"def",
"mode",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"axis",
"=",
"kwargs",
".",
"get",
"(",
"\"axis\"",
",",
"0",
")",
"def",
"mode_builder",
"(",
"df",
",",
"*",
"*",
"kwargs",
")",
":",
"result",
"=",
"df",
".",
"mode",
"(",
"*",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.fillna | Replaces NaN values with the method provided.
Returns:
A new QueryCompiler with null values filled. | modin/backends/pandas/query_compiler.py | def fillna(self, **kwargs):
"""Replaces NaN values with the method provided.
Returns:
A new QueryCompiler with null values filled.
"""
axis = kwargs.get("axis", 0)
value = kwargs.get("value")
if isinstance(value, dict):
value = kwargs.pop("value")... | def fillna(self, **kwargs):
"""Replaces NaN values with the method provided.
Returns:
A new QueryCompiler with null values filled.
"""
axis = kwargs.get("axis", 0)
value = kwargs.get("value")
if isinstance(value, dict):
value = kwargs.pop("value")... | [
"Replaces",
"NaN",
"values",
"with",
"the",
"method",
"provided",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1603-L1635 | [
"def",
"fillna",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"axis",
"=",
"kwargs",
".",
"get",
"(",
"\"axis\"",
",",
"0",
")",
"value",
"=",
"kwargs",
".",
"get",
"(",
"\"value\"",
")",
"if",
"isinstance",
"(",
"value",
",",
"dict",
")",
":"... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.query | Query columns of the DataManager with a boolean expression.
Args:
expr: Boolean expression to query the columns with.
Returns:
DataManager containing the rows where the boolean expression is satisfied. | modin/backends/pandas/query_compiler.py | def query(self, expr, **kwargs):
"""Query columns of the DataManager with a boolean expression.
Args:
expr: Boolean expression to query the columns with.
Returns:
DataManager containing the rows where the boolean expression is satisfied.
"""
columns = se... | def query(self, expr, **kwargs):
"""Query columns of the DataManager with a boolean expression.
Args:
expr: Boolean expression to query the columns with.
Returns:
DataManager containing the rows where the boolean expression is satisfied.
"""
columns = se... | [
"Query",
"columns",
"of",
"the",
"DataManager",
"with",
"a",
"boolean",
"expression",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1637-L1663 | [
"def",
"query",
"(",
"self",
",",
"expr",
",",
"*",
"*",
"kwargs",
")",
":",
"columns",
"=",
"self",
".",
"columns",
"def",
"query_builder",
"(",
"df",
",",
"*",
"*",
"kwargs",
")",
":",
"# This is required because of an Arrow limitation",
"# TODO revisit for ... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.rank | Computes numerical rank along axis. Equal values are set to the average.
Returns:
DataManager containing the ranks of the values along an axis. | modin/backends/pandas/query_compiler.py | def rank(self, **kwargs):
"""Computes numerical rank along axis. Equal values are set to the average.
Returns:
DataManager containing the ranks of the values along an axis.
"""
axis = kwargs.get("axis", 0)
numeric_only = True if axis else kwargs.get("numeric_only", F... | def rank(self, **kwargs):
"""Computes numerical rank along axis. Equal values are set to the average.
Returns:
DataManager containing the ranks of the values along an axis.
"""
axis = kwargs.get("axis", 0)
numeric_only = True if axis else kwargs.get("numeric_only", F... | [
"Computes",
"numerical",
"rank",
"along",
"axis",
".",
"Equal",
"values",
"are",
"set",
"to",
"the",
"average",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1665-L1682 | [
"def",
"rank",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"axis",
"=",
"kwargs",
".",
"get",
"(",
"\"axis\"",
",",
"0",
")",
"numeric_only",
"=",
"True",
"if",
"axis",
"else",
"kwargs",
".",
"get",
"(",
"\"numeric_only\"",
",",
"False",
")",
"... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.sort_index | Sorts the data with respect to either the columns or the indices.
Returns:
DataManager containing the data sorted by columns or indices. | modin/backends/pandas/query_compiler.py | def sort_index(self, **kwargs):
"""Sorts the data with respect to either the columns or the indices.
Returns:
DataManager containing the data sorted by columns or indices.
"""
axis = kwargs.pop("axis", 0)
index = self.columns if axis else self.index
# sort_i... | def sort_index(self, **kwargs):
"""Sorts the data with respect to either the columns or the indices.
Returns:
DataManager containing the data sorted by columns or indices.
"""
axis = kwargs.pop("axis", 0)
index = self.columns if axis else self.index
# sort_i... | [
"Sorts",
"the",
"data",
"with",
"respect",
"to",
"either",
"the",
"columns",
"or",
"the",
"indices",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1684-L1718 | [
"def",
"sort_index",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"axis",
"=",
"kwargs",
".",
"pop",
"(",
"\"axis\"",
",",
"0",
")",
"index",
"=",
"self",
".",
"columns",
"if",
"axis",
"else",
"self",
".",
"index",
"# sort_index can have ascending be ... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler._map_across_full_axis_select_indices | Maps function to select indices along full axis.
Args:
axis: 0 for columns and 1 for rows.
func: Callable mapping function over the BlockParitions.
indices: indices along axis to map over.
keep_remaining: True if keep indices where function was not applied.
... | modin/backends/pandas/query_compiler.py | def _map_across_full_axis_select_indices(
self, axis, func, indices, keep_remaining=False
):
"""Maps function to select indices along full axis.
Args:
axis: 0 for columns and 1 for rows.
func: Callable mapping function over the BlockParitions.
indices: in... | def _map_across_full_axis_select_indices(
self, axis, func, indices, keep_remaining=False
):
"""Maps function to select indices along full axis.
Args:
axis: 0 for columns and 1 for rows.
func: Callable mapping function over the BlockParitions.
indices: in... | [
"Maps",
"function",
"to",
"select",
"indices",
"along",
"full",
"axis",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1726-L1742 | [
"def",
"_map_across_full_axis_select_indices",
"(",
"self",
",",
"axis",
",",
"func",
",",
"indices",
",",
"keep_remaining",
"=",
"False",
")",
":",
"return",
"self",
".",
"data",
".",
"apply_func_to_select_indices_along_full_axis",
"(",
"axis",
",",
"func",
",",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.quantile_for_list_of_values | Returns Manager containing quantiles along an axis for numeric columns.
Returns:
DataManager containing quantiles of original DataManager along an axis. | modin/backends/pandas/query_compiler.py | def quantile_for_list_of_values(self, **kwargs):
"""Returns Manager containing quantiles along an axis for numeric columns.
Returns:
DataManager containing quantiles of original DataManager along an axis.
"""
if self._is_transposed:
kwargs["axis"] = kwargs.get("a... | def quantile_for_list_of_values(self, **kwargs):
"""Returns Manager containing quantiles along an axis for numeric columns.
Returns:
DataManager containing quantiles of original DataManager along an axis.
"""
if self._is_transposed:
kwargs["axis"] = kwargs.get("a... | [
"Returns",
"Manager",
"containing",
"quantiles",
"along",
"an",
"axis",
"for",
"numeric",
"columns",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1744-L1800 | [
"def",
"quantile_for_list_of_values",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"self",
".",
"_is_transposed",
":",
"kwargs",
"[",
"\"axis\"",
"]",
"=",
"kwargs",
".",
"get",
"(",
"\"axis\"",
",",
"0",
")",
"^",
"1",
"return",
"self",
".",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.tail | Returns the last n rows.
Args:
n: Integer containing the number of rows to return.
Returns:
DataManager containing the last n rows of the original DataManager. | modin/backends/pandas/query_compiler.py | def tail(self, n):
"""Returns the last n rows.
Args:
n: Integer containing the number of rows to return.
Returns:
DataManager containing the last n rows of the original DataManager.
"""
# See head for an explanation of the transposed behavior
if ... | def tail(self, n):
"""Returns the last n rows.
Args:
n: Integer containing the number of rows to return.
Returns:
DataManager containing the last n rows of the original DataManager.
"""
# See head for an explanation of the transposed behavior
if ... | [
"Returns",
"the",
"last",
"n",
"rows",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1837-L1861 | [
"def",
"tail",
"(",
"self",
",",
"n",
")",
":",
"# See head for an explanation of the transposed behavior",
"if",
"n",
"<",
"0",
":",
"n",
"=",
"max",
"(",
"0",
",",
"len",
"(",
"self",
".",
"index",
")",
"+",
"n",
")",
"if",
"self",
".",
"_is_transpos... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.front | Returns the first n columns.
Args:
n: Integer containing the number of columns to return.
Returns:
DataManager containing the first n columns of the original DataManager. | modin/backends/pandas/query_compiler.py | def front(self, n):
"""Returns the first n columns.
Args:
n: Integer containing the number of columns to return.
Returns:
DataManager containing the first n columns of the original DataManager.
"""
new_dtypes = (
self._dtype_cache if self._dt... | def front(self, n):
"""Returns the first n columns.
Args:
n: Integer containing the number of columns to return.
Returns:
DataManager containing the first n columns of the original DataManager.
"""
new_dtypes = (
self._dtype_cache if self._dt... | [
"Returns",
"the",
"first",
"n",
"columns",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1863-L1888 | [
"def",
"front",
"(",
"self",
",",
"n",
")",
":",
"new_dtypes",
"=",
"(",
"self",
".",
"_dtype_cache",
"if",
"self",
".",
"_dtype_cache",
"is",
"None",
"else",
"self",
".",
"_dtype_cache",
"[",
":",
"n",
"]",
")",
"# See head for an explanation of the transpo... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.getitem_column_array | Get column data for target labels.
Args:
key: Target labels by which to retrieve data.
Returns:
A new QueryCompiler. | modin/backends/pandas/query_compiler.py | def getitem_column_array(self, key):
"""Get column data for target labels.
Args:
key: Target labels by which to retrieve data.
Returns:
A new QueryCompiler.
"""
# Convert to list for type checking
numeric_indices = list(self.columns.get_indexer_f... | def getitem_column_array(self, key):
"""Get column data for target labels.
Args:
key: Target labels by which to retrieve data.
Returns:
A new QueryCompiler.
"""
# Convert to list for type checking
numeric_indices = list(self.columns.get_indexer_f... | [
"Get",
"column",
"data",
"for",
"target",
"labels",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1920-L1944 | [
"def",
"getitem_column_array",
"(",
"self",
",",
"key",
")",
":",
"# Convert to list for type checking",
"numeric_indices",
"=",
"list",
"(",
"self",
".",
"columns",
".",
"get_indexer_for",
"(",
"key",
")",
")",
"# Internal indices is left blank and the internal",
"# `a... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.getitem_row_array | Get row data for target labels.
Args:
key: Target numeric indices by which to retrieve data.
Returns:
A new QueryCompiler. | modin/backends/pandas/query_compiler.py | def getitem_row_array(self, key):
"""Get row data for target labels.
Args:
key: Target numeric indices by which to retrieve data.
Returns:
A new QueryCompiler.
"""
# Convert to list for type checking
key = list(key)
def getitem(df, inter... | def getitem_row_array(self, key):
"""Get row data for target labels.
Args:
key: Target numeric indices by which to retrieve data.
Returns:
A new QueryCompiler.
"""
# Convert to list for type checking
key = list(key)
def getitem(df, inter... | [
"Get",
"row",
"data",
"for",
"target",
"labels",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1946-L1967 | [
"def",
"getitem_row_array",
"(",
"self",
",",
"key",
")",
":",
"# Convert to list for type checking",
"key",
"=",
"list",
"(",
"key",
")",
"def",
"getitem",
"(",
"df",
",",
"internal_indices",
"=",
"[",
"]",
")",
":",
"return",
"df",
".",
"iloc",
"[",
"i... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.setitem | Set the column defined by `key` to the `value` provided.
Args:
key: The column name to set.
value: The value to set the column to.
Returns:
A new QueryCompiler | modin/backends/pandas/query_compiler.py | def setitem(self, axis, key, value):
"""Set the column defined by `key` to the `value` provided.
Args:
key: The column name to set.
value: The value to set the column to.
Returns:
A new QueryCompiler
"""
def setitem(df, internal_indices=[])... | def setitem(self, axis, key, value):
"""Set the column defined by `key` to the `value` provided.
Args:
key: The column name to set.
value: The value to set the column to.
Returns:
A new QueryCompiler
"""
def setitem(df, internal_indices=[])... | [
"Set",
"the",
"column",
"defined",
"by",
"key",
"to",
"the",
"value",
"provided",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L1969-L2014 | [
"def",
"setitem",
"(",
"self",
",",
"axis",
",",
"key",
",",
"value",
")",
":",
"def",
"setitem",
"(",
"df",
",",
"internal_indices",
"=",
"[",
"]",
")",
":",
"def",
"_setitem",
"(",
")",
":",
"if",
"len",
"(",
"internal_indices",
")",
"==",
"1",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.drop | Remove row data for target index and columns.
Args:
index: Target index to drop.
columns: Target columns to drop.
Returns:
A new QueryCompiler. | modin/backends/pandas/query_compiler.py | def drop(self, index=None, columns=None):
"""Remove row data for target index and columns.
Args:
index: Target index to drop.
columns: Target columns to drop.
Returns:
A new QueryCompiler.
"""
if self._is_transposed:
return self.t... | def drop(self, index=None, columns=None):
"""Remove row data for target index and columns.
Args:
index: Target index to drop.
columns: Target columns to drop.
Returns:
A new QueryCompiler.
"""
if self._is_transposed:
return self.t... | [
"Remove",
"row",
"data",
"for",
"target",
"index",
"and",
"columns",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L2020-L2062 | [
"def",
"drop",
"(",
"self",
",",
"index",
"=",
"None",
",",
"columns",
"=",
"None",
")",
":",
"if",
"self",
".",
"_is_transposed",
":",
"return",
"self",
".",
"transpose",
"(",
")",
".",
"drop",
"(",
"index",
"=",
"columns",
",",
"columns",
"=",
"i... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.insert | Insert new column data.
Args:
loc: Insertion index.
column: Column labels to insert.
value: Dtype object values to insert.
Returns:
A new PandasQueryCompiler with new data inserted. | modin/backends/pandas/query_compiler.py | def insert(self, loc, column, value):
"""Insert new column data.
Args:
loc: Insertion index.
column: Column labels to insert.
value: Dtype object values to insert.
Returns:
A new PandasQueryCompiler with new data inserted.
"""
if ... | def insert(self, loc, column, value):
"""Insert new column data.
Args:
loc: Insertion index.
column: Column labels to insert.
value: Dtype object values to insert.
Returns:
A new PandasQueryCompiler with new data inserted.
"""
if ... | [
"Insert",
"new",
"column",
"data",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L2071-L2103 | [
"def",
"insert",
"(",
"self",
",",
"loc",
",",
"column",
",",
"value",
")",
":",
"if",
"is_list_like",
"(",
"value",
")",
":",
"# TODO make work with another querycompiler object as `value`.",
"# This will require aligning the indices with a `reindex` and ensuring that",
"# t... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.apply | Apply func across given axis.
Args:
func: The function to apply.
axis: Target axis to apply the function along.
Returns:
A new PandasQueryCompiler. | modin/backends/pandas/query_compiler.py | def apply(self, func, axis, *args, **kwargs):
"""Apply func across given axis.
Args:
func: The function to apply.
axis: Target axis to apply the function along.
Returns:
A new PandasQueryCompiler.
"""
if callable(func):
return sel... | def apply(self, func, axis, *args, **kwargs):
"""Apply func across given axis.
Args:
func: The function to apply.
axis: Target axis to apply the function along.
Returns:
A new PandasQueryCompiler.
"""
if callable(func):
return sel... | [
"Apply",
"func",
"across",
"given",
"axis",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L2110-L2127 | [
"def",
"apply",
"(",
"self",
",",
"func",
",",
"axis",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"callable",
"(",
"func",
")",
":",
"return",
"self",
".",
"_callable_func",
"(",
"func",
",",
"axis",
",",
"*",
"args",
",",
"*",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler._post_process_apply | Recompute the index after applying function.
Args:
result_data: a BaseFrameManager object.
axis: Target axis along which function was applied.
Returns:
A new PandasQueryCompiler. | modin/backends/pandas/query_compiler.py | def _post_process_apply(self, result_data, axis, try_scale=True):
"""Recompute the index after applying function.
Args:
result_data: a BaseFrameManager object.
axis: Target axis along which function was applied.
Returns:
A new PandasQueryCompiler.
""... | def _post_process_apply(self, result_data, axis, try_scale=True):
"""Recompute the index after applying function.
Args:
result_data: a BaseFrameManager object.
axis: Target axis along which function was applied.
Returns:
A new PandasQueryCompiler.
""... | [
"Recompute",
"the",
"index",
"after",
"applying",
"function",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L2129-L2168 | [
"def",
"_post_process_apply",
"(",
"self",
",",
"result_data",
",",
"axis",
",",
"try_scale",
"=",
"True",
")",
":",
"if",
"try_scale",
":",
"try",
":",
"internal_index",
"=",
"self",
".",
"compute_index",
"(",
"0",
",",
"result_data",
",",
"True",
")",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler._dict_func | Apply function to certain indices across given axis.
Args:
func: The function to apply.
axis: Target axis to apply the function along.
Returns:
A new PandasQueryCompiler. | modin/backends/pandas/query_compiler.py | def _dict_func(self, func, axis, *args, **kwargs):
"""Apply function to certain indices across given axis.
Args:
func: The function to apply.
axis: Target axis to apply the function along.
Returns:
A new PandasQueryCompiler.
"""
if "axis" not... | def _dict_func(self, func, axis, *args, **kwargs):
"""Apply function to certain indices across given axis.
Args:
func: The function to apply.
axis: Target axis to apply the function along.
Returns:
A new PandasQueryCompiler.
"""
if "axis" not... | [
"Apply",
"function",
"to",
"certain",
"indices",
"across",
"given",
"axis",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L2170-L2198 | [
"def",
"_dict_func",
"(",
"self",
",",
"func",
",",
"axis",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"\"axis\"",
"not",
"in",
"kwargs",
":",
"kwargs",
"[",
"\"axis\"",
"]",
"=",
"axis",
"if",
"axis",
"==",
"0",
":",
"index",
"="... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler._list_like_func | Apply list-like function across given axis.
Args:
func: The function to apply.
axis: Target axis to apply the function along.
Returns:
A new PandasQueryCompiler. | modin/backends/pandas/query_compiler.py | def _list_like_func(self, func, axis, *args, **kwargs):
"""Apply list-like function across given axis.
Args:
func: The function to apply.
axis: Target axis to apply the function along.
Returns:
A new PandasQueryCompiler.
"""
func_prepared = s... | def _list_like_func(self, func, axis, *args, **kwargs):
"""Apply list-like function across given axis.
Args:
func: The function to apply.
axis: Target axis to apply the function along.
Returns:
A new PandasQueryCompiler.
"""
func_prepared = s... | [
"Apply",
"list",
"-",
"like",
"function",
"across",
"given",
"axis",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L2200-L2225 | [
"def",
"_list_like_func",
"(",
"self",
",",
"func",
",",
"axis",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"func_prepared",
"=",
"self",
".",
"_prepare_method",
"(",
"lambda",
"df",
":",
"pandas",
".",
"DataFrame",
"(",
"df",
".",
"apply",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler._callable_func | Apply callable functions across given axis.
Args:
func: The functions to apply.
axis: Target axis to apply the function along.
Returns:
A new PandasQueryCompiler. | modin/backends/pandas/query_compiler.py | def _callable_func(self, func, axis, *args, **kwargs):
"""Apply callable functions across given axis.
Args:
func: The functions to apply.
axis: Target axis to apply the function along.
Returns:
A new PandasQueryCompiler.
"""
def callable_app... | def _callable_func(self, func, axis, *args, **kwargs):
"""Apply callable functions across given axis.
Args:
func: The functions to apply.
axis: Target axis to apply the function along.
Returns:
A new PandasQueryCompiler.
"""
def callable_app... | [
"Apply",
"callable",
"functions",
"across",
"given",
"axis",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L2227-L2251 | [
"def",
"_callable_func",
"(",
"self",
",",
"func",
",",
"axis",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"def",
"callable_apply_builder",
"(",
"df",
",",
"axis",
"=",
"0",
")",
":",
"if",
"not",
"axis",
":",
"df",
".",
"index",
"=",
"... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler._manual_repartition | This method applies all manual partitioning functions.
Args:
axis: The axis to shuffle data along.
repartition_func: The function used to repartition data.
Returns:
A `BaseFrameManager` object. | modin/backends/pandas/query_compiler.py | def _manual_repartition(self, axis, repartition_func, **kwargs):
"""This method applies all manual partitioning functions.
Args:
axis: The axis to shuffle data along.
repartition_func: The function used to repartition data.
Returns:
A `BaseFrameManager` obje... | def _manual_repartition(self, axis, repartition_func, **kwargs):
"""This method applies all manual partitioning functions.
Args:
axis: The axis to shuffle data along.
repartition_func: The function used to repartition data.
Returns:
A `BaseFrameManager` obje... | [
"This",
"method",
"applies",
"all",
"manual",
"partitioning",
"functions",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L2259-L2270 | [
"def",
"_manual_repartition",
"(",
"self",
",",
"axis",
",",
"repartition_func",
",",
"*",
"*",
"kwargs",
")",
":",
"func",
"=",
"self",
".",
"_prepare_method",
"(",
"repartition_func",
",",
"*",
"*",
"kwargs",
")",
"return",
"self",
".",
"data",
".",
"m... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.get_dummies | Convert categorical variables to dummy variables for certain columns.
Args:
columns: The columns to convert.
Returns:
A new QueryCompiler. | modin/backends/pandas/query_compiler.py | def get_dummies(self, columns, **kwargs):
"""Convert categorical variables to dummy variables for certain columns.
Args:
columns: The columns to convert.
Returns:
A new QueryCompiler.
"""
cls = type(self)
# `columns` as None does not mean all col... | def get_dummies(self, columns, **kwargs):
"""Convert categorical variables to dummy variables for certain columns.
Args:
columns: The columns to convert.
Returns:
A new QueryCompiler.
"""
cls = type(self)
# `columns` as None does not mean all col... | [
"Convert",
"categorical",
"variables",
"to",
"dummy",
"variables",
"for",
"certain",
"columns",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L2327-L2402 | [
"def",
"get_dummies",
"(",
"self",
",",
"columns",
",",
"*",
"*",
"kwargs",
")",
":",
"cls",
"=",
"type",
"(",
"self",
")",
"# `columns` as None does not mean all columns, by default it means only",
"# non-numeric columns.",
"if",
"columns",
"is",
"None",
":",
"colu... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompiler.global_idx_to_numeric_idx | Note: this function involves making copies of the index in memory.
Args:
axis: Axis to extract indices.
indices: Indices to convert to numerical.
Returns:
An Index object. | modin/backends/pandas/query_compiler.py | def global_idx_to_numeric_idx(self, axis, indices):
"""
Note: this function involves making copies of the index in memory.
Args:
axis: Axis to extract indices.
indices: Indices to convert to numerical.
Returns:
An Index object.
"""
as... | def global_idx_to_numeric_idx(self, axis, indices):
"""
Note: this function involves making copies of the index in memory.
Args:
axis: Axis to extract indices.
indices: Indices to convert to numerical.
Returns:
An Index object.
"""
as... | [
"Note",
":",
"this",
"function",
"involves",
"making",
"copies",
"of",
"the",
"index",
"in",
"memory",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L2442-L2465 | [
"def",
"global_idx_to_numeric_idx",
"(",
"self",
",",
"axis",
",",
"indices",
")",
":",
"assert",
"axis",
"in",
"[",
"\"row\"",
",",
"\"col\"",
",",
"\"columns\"",
"]",
"if",
"axis",
"==",
"\"row\"",
":",
"return",
"pandas",
".",
"Index",
"(",
"pandas",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PandasQueryCompilerView._get_data | Perform the map step
Returns:
A BaseFrameManager object. | modin/backends/pandas/query_compiler.py | def _get_data(self) -> BaseFrameManager:
"""Perform the map step
Returns:
A BaseFrameManager object.
"""
def iloc(partition, row_internal_indices, col_internal_indices):
return partition.iloc[row_internal_indices, col_internal_indices]
masked_data = sel... | def _get_data(self) -> BaseFrameManager:
"""Perform the map step
Returns:
A BaseFrameManager object.
"""
def iloc(partition, row_internal_indices, col_internal_indices):
return partition.iloc[row_internal_indices, col_internal_indices]
masked_data = sel... | [
"Perform",
"the",
"map",
"step"
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/backends/pandas/query_compiler.py#L2528-L2545 | [
"def",
"_get_data",
"(",
"self",
")",
"->",
"BaseFrameManager",
":",
"def",
"iloc",
"(",
"partition",
",",
"row_internal_indices",
",",
"col_internal_indices",
")",
":",
"return",
"partition",
".",
"iloc",
"[",
"row_internal_indices",
",",
"col_internal_indices",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PythonFrameManager.block_lengths | Gets the lengths of the blocks.
Note: This works with the property structure `_lengths_cache` to avoid
having to recompute these values each time they are needed. | modin/engines/python/pandas_on_python/frame/partition_manager.py | def block_lengths(self):
"""Gets the lengths of the blocks.
Note: This works with the property structure `_lengths_cache` to avoid
having to recompute these values each time they are needed.
"""
if self._lengths_cache is None:
# The first column will have the cor... | def block_lengths(self):
"""Gets the lengths of the blocks.
Note: This works with the property structure `_lengths_cache` to avoid
having to recompute these values each time they are needed.
"""
if self._lengths_cache is None:
# The first column will have the cor... | [
"Gets",
"the",
"lengths",
"of",
"the",
"blocks",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/engines/python/pandas_on_python/frame/partition_manager.py#L29-L44 | [
"def",
"block_lengths",
"(",
"self",
")",
":",
"if",
"self",
".",
"_lengths_cache",
"is",
"None",
":",
"# The first column will have the correct lengths. We have an",
"# invariant that requires that all blocks be the same length in a",
"# row of blocks.",
"self",
".",
"_lengths_c... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | PythonFrameManager.block_widths | Gets the widths of the blocks.
Note: This works with the property structure `_widths_cache` to avoid
having to recompute these values each time they are needed. | modin/engines/python/pandas_on_python/frame/partition_manager.py | def block_widths(self):
"""Gets the widths of the blocks.
Note: This works with the property structure `_widths_cache` to avoid
having to recompute these values each time they are needed.
"""
if self._widths_cache is None:
# The first column will have the correct... | def block_widths(self):
"""Gets the widths of the blocks.
Note: This works with the property structure `_widths_cache` to avoid
having to recompute these values each time they are needed.
"""
if self._widths_cache is None:
# The first column will have the correct... | [
"Gets",
"the",
"widths",
"of",
"the",
"blocks",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/engines/python/pandas_on_python/frame/partition_manager.py#L47-L62 | [
"def",
"block_widths",
"(",
"self",
")",
":",
"if",
"self",
".",
"_widths_cache",
"is",
"None",
":",
"# The first column will have the correct lengths. We have an",
"# invariant that requires that all blocks be the same width in a",
"# column of blocks.",
"self",
".",
"_widths_ca... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset._update_inplace | Updates the current DataFrame inplace.
Args:
new_query_compiler: The new QueryCompiler to use to manage the data | modin/pandas/base.py | def _update_inplace(self, new_query_compiler):
"""Updates the current DataFrame inplace.
Args:
new_query_compiler: The new QueryCompiler to use to manage the data
"""
old_query_compiler = self._query_compiler
self._query_compiler = new_query_compiler
... | def _update_inplace(self, new_query_compiler):
"""Updates the current DataFrame inplace.
Args:
new_query_compiler: The new QueryCompiler to use to manage the data
"""
old_query_compiler = self._query_compiler
self._query_compiler = new_query_compiler
... | [
"Updates",
"the",
"current",
"DataFrame",
"inplace",
".",
"Args",
":",
"new_query_compiler",
":",
"The",
"new",
"QueryCompiler",
"to",
"use",
"to",
"manage",
"the",
"data"
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L74-L82 | [
"def",
"_update_inplace",
"(",
"self",
",",
"new_query_compiler",
")",
":",
"old_query_compiler",
"=",
"self",
".",
"_query_compiler",
"self",
".",
"_query_compiler",
"=",
"new_query_compiler",
"old_query_compiler",
".",
"free",
"(",
")"
] | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset._validate_other | Helper method to check validity of other in inter-df operations | modin/pandas/base.py | def _validate_other(
self,
other,
axis,
numeric_only=False,
numeric_or_time_only=False,
numeric_or_object_only=False,
comparison_dtypes_only=False,
):
"""Helper method to check validity of other in inter-df operations"""
axis = self._... | def _validate_other(
self,
other,
axis,
numeric_only=False,
numeric_or_time_only=False,
numeric_or_object_only=False,
comparison_dtypes_only=False,
):
"""Helper method to check validity of other in inter-df operations"""
axis = self._... | [
"Helper",
"method",
"to",
"check",
"validity",
"of",
"other",
"in",
"inter",
"-",
"df",
"operations"
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L84-L165 | [
"def",
"_validate_other",
"(",
"self",
",",
"other",
",",
"axis",
",",
"numeric_only",
"=",
"False",
",",
"numeric_or_time_only",
"=",
"False",
",",
"numeric_or_object_only",
"=",
"False",
",",
"comparison_dtypes_only",
"=",
"False",
",",
")",
":",
"axis",
"="... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset._default_to_pandas | Helper method to use default pandas function | modin/pandas/base.py | def _default_to_pandas(self, op, *args, **kwargs):
"""Helper method to use default pandas function"""
empty_self_str = "" if not self.empty else " for empty DataFrame"
ErrorMessage.default_to_pandas(
"`{}.{}`{}".format(
self.__name__,
op if isins... | def _default_to_pandas(self, op, *args, **kwargs):
"""Helper method to use default pandas function"""
empty_self_str = "" if not self.empty else " for empty DataFrame"
ErrorMessage.default_to_pandas(
"`{}.{}`{}".format(
self.__name__,
op if isins... | [
"Helper",
"method",
"to",
"use",
"default",
"pandas",
"function"
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L181-L234 | [
"def",
"_default_to_pandas",
"(",
"self",
",",
"op",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"empty_self_str",
"=",
"\"\"",
"if",
"not",
"self",
".",
"empty",
"else",
"\" for empty DataFrame\"",
"ErrorMessage",
".",
"default_to_pandas",
"(",
"\"... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.abs | Apply an absolute value function to all numeric columns.
Returns:
A new DataFrame with the applied absolute value. | modin/pandas/base.py | def abs(self):
"""Apply an absolute value function to all numeric columns.
Returns:
A new DataFrame with the applied absolute value.
"""
self._validate_dtypes(numeric_only=True)
return self.__constructor__(query_compiler=self._query_compiler.abs()) | def abs(self):
"""Apply an absolute value function to all numeric columns.
Returns:
A new DataFrame with the applied absolute value.
"""
self._validate_dtypes(numeric_only=True)
return self.__constructor__(query_compiler=self._query_compiler.abs()) | [
"Apply",
"an",
"absolute",
"value",
"function",
"to",
"all",
"numeric",
"columns",
".",
"Returns",
":",
"A",
"new",
"DataFrame",
"with",
"the",
"applied",
"absolute",
"value",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L246-L253 | [
"def",
"abs",
"(",
"self",
")",
":",
"self",
".",
"_validate_dtypes",
"(",
"numeric_only",
"=",
"True",
")",
"return",
"self",
".",
"__constructor__",
"(",
"query_compiler",
"=",
"self",
".",
"_query_compiler",
".",
"abs",
"(",
")",
")"
] | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.add | Add this DataFrame to another or a scalar/list.
Args:
other: What to add this this DataFrame.
axis: The axis to apply addition over. Only applicaable to Series
or list 'other'.
level: A level in the multilevel axis to add over.
fill_value: ... | modin/pandas/base.py | def add(self, other, axis="columns", level=None, fill_value=None):
"""Add this DataFrame to another or a scalar/list.
Args:
other: What to add this this DataFrame.
axis: The axis to apply addition over. Only applicaable to Series
or list 'other'.
... | def add(self, other, axis="columns", level=None, fill_value=None):
"""Add this DataFrame to another or a scalar/list.
Args:
other: What to add this this DataFrame.
axis: The axis to apply addition over. Only applicaable to Series
or list 'other'.
... | [
"Add",
"this",
"DataFrame",
"to",
"another",
"or",
"a",
"scalar",
"/",
"list",
".",
"Args",
":",
"other",
":",
"What",
"to",
"add",
"this",
"this",
"DataFrame",
".",
"axis",
":",
"The",
"axis",
"to",
"apply",
"addition",
"over",
".",
"Only",
"applicaab... | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L273-L288 | [
"def",
"add",
"(",
"self",
",",
"other",
",",
"axis",
"=",
"\"columns\"",
",",
"level",
"=",
"None",
",",
"fill_value",
"=",
"None",
")",
":",
"return",
"self",
".",
"_binary_op",
"(",
"\"add\"",
",",
"other",
",",
"axis",
"=",
"axis",
",",
"level",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.all | Return whether all elements are True over requested axis
Note:
If axis=None or axis=0, this call applies df.all(axis=1)
to the transpose of df. | modin/pandas/base.py | def all(self, axis=0, bool_only=None, skipna=True, level=None, **kwargs):
"""Return whether all elements are True over requested axis
Note:
If axis=None or axis=0, this call applies df.all(axis=1)
to the transpose of df.
"""
if axis is not None:
... | def all(self, axis=0, bool_only=None, skipna=True, level=None, **kwargs):
"""Return whether all elements are True over requested axis
Note:
If axis=None or axis=0, this call applies df.all(axis=1)
to the transpose of df.
"""
if axis is not None:
... | [
"Return",
"whether",
"all",
"elements",
"are",
"True",
"over",
"requested",
"axis",
"Note",
":",
"If",
"axis",
"=",
"None",
"or",
"axis",
"=",
"0",
"this",
"call",
"applies",
"df",
".",
"all",
"(",
"axis",
"=",
"1",
")",
"to",
"the",
"transpose",
"of... | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L377-L415 | [
"def",
"all",
"(",
"self",
",",
"axis",
"=",
"0",
",",
"bool_only",
"=",
"None",
",",
"skipna",
"=",
"True",
",",
"level",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"axis",
"is",
"not",
"None",
":",
"axis",
"=",
"self",
".",
"_get_a... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.apply | Apply a function along input axis of DataFrame.
Args:
func: The function to apply
axis: The axis over which to apply the func.
broadcast: Whether or not to broadcast.
raw: Whether or not to convert to a Series.
reduce: Whether or not to try to ... | modin/pandas/base.py | def apply(
self,
func,
axis=0,
broadcast=None,
raw=False,
reduce=None,
result_type=None,
convert_dtype=True,
args=(),
**kwds
):
"""Apply a function along input axis of DataFrame.
Args:
func: T... | def apply(
self,
func,
axis=0,
broadcast=None,
raw=False,
reduce=None,
result_type=None,
convert_dtype=True,
args=(),
**kwds
):
"""Apply a function along input axis of DataFrame.
Args:
func: T... | [
"Apply",
"a",
"function",
"along",
"input",
"axis",
"of",
"DataFrame",
".",
"Args",
":",
"func",
":",
"The",
"function",
"to",
"apply",
"axis",
":",
"The",
"axis",
"over",
"which",
"to",
"apply",
"the",
"func",
".",
"broadcast",
":",
"Whether",
"or",
"... | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L457-L506 | [
"def",
"apply",
"(",
"self",
",",
"func",
",",
"axis",
"=",
"0",
",",
"broadcast",
"=",
"None",
",",
"raw",
"=",
"False",
",",
"reduce",
"=",
"None",
",",
"result_type",
"=",
"None",
",",
"convert_dtype",
"=",
"True",
",",
"args",
"=",
"(",
")",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.bfill | Synonym for DataFrame.fillna(method='bfill') | modin/pandas/base.py | def bfill(self, axis=None, inplace=False, limit=None, downcast=None):
"""Synonym for DataFrame.fillna(method='bfill')"""
return self.fillna(
method="bfill", axis=axis, limit=limit, downcast=downcast, inplace=inplace
) | def bfill(self, axis=None, inplace=False, limit=None, downcast=None):
"""Synonym for DataFrame.fillna(method='bfill')"""
return self.fillna(
method="bfill", axis=axis, limit=limit, downcast=downcast, inplace=inplace
) | [
"Synonym",
"for",
"DataFrame",
".",
"fillna",
"(",
"method",
"=",
"bfill",
")"
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L577-L581 | [
"def",
"bfill",
"(",
"self",
",",
"axis",
"=",
"None",
",",
"inplace",
"=",
"False",
",",
"limit",
"=",
"None",
",",
"downcast",
"=",
"None",
")",
":",
"return",
"self",
".",
"fillna",
"(",
"method",
"=",
"\"bfill\"",
",",
"axis",
"=",
"axis",
",",... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.bool | Return the bool of a single element PandasObject.
This must be a boolean scalar value, either True or False. Raise a
ValueError if the PandasObject does not have exactly 1 element, or that
element is not boolean | modin/pandas/base.py | def bool(self):
"""Return the bool of a single element PandasObject.
This must be a boolean scalar value, either True or False. Raise a
ValueError if the PandasObject does not have exactly 1 element, or that
element is not boolean
"""
shape = self.shape
... | def bool(self):
"""Return the bool of a single element PandasObject.
This must be a boolean scalar value, either True or False. Raise a
ValueError if the PandasObject does not have exactly 1 element, or that
element is not boolean
"""
shape = self.shape
... | [
"Return",
"the",
"bool",
"of",
"a",
"single",
"element",
"PandasObject",
".",
"This",
"must",
"be",
"a",
"boolean",
"scalar",
"value",
"either",
"True",
"or",
"False",
".",
"Raise",
"a",
"ValueError",
"if",
"the",
"PandasObject",
"does",
"not",
"have",
"ex... | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L583-L600 | [
"def",
"bool",
"(",
"self",
")",
":",
"shape",
"=",
"self",
".",
"shape",
"if",
"shape",
"!=",
"(",
"1",
",",
")",
"and",
"shape",
"!=",
"(",
"1",
",",
"1",
")",
":",
"raise",
"ValueError",
"(",
"\"\"\"The PandasObject does not have exactly\r\n ... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.copy | Creates a shallow copy of the DataFrame.
Returns:
A new DataFrame pointing to the same partitions as this one. | modin/pandas/base.py | def copy(self, deep=True):
"""Creates a shallow copy of the DataFrame.
Returns:
A new DataFrame pointing to the same partitions as this one.
"""
return self.__constructor__(query_compiler=self._query_compiler.copy()) | def copy(self, deep=True):
"""Creates a shallow copy of the DataFrame.
Returns:
A new DataFrame pointing to the same partitions as this one.
"""
return self.__constructor__(query_compiler=self._query_compiler.copy()) | [
"Creates",
"a",
"shallow",
"copy",
"of",
"the",
"DataFrame",
".",
"Returns",
":",
"A",
"new",
"DataFrame",
"pointing",
"to",
"the",
"same",
"partitions",
"as",
"this",
"one",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L647-L653 | [
"def",
"copy",
"(",
"self",
",",
"deep",
"=",
"True",
")",
":",
"return",
"self",
".",
"__constructor__",
"(",
"query_compiler",
"=",
"self",
".",
"_query_compiler",
".",
"copy",
"(",
")",
")"
] | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.count | Get the count of non-null objects in the DataFrame.
Arguments:
axis: 0 or 'index' for row-wise, 1 or 'columns' for column-wise.
level: If the axis is a MultiIndex (hierarchical), count along a
particular level, collapsing into a DataFrame.
numeric_only:... | modin/pandas/base.py | def count(self, axis=0, level=None, numeric_only=False):
"""Get the count of non-null objects in the DataFrame.
Arguments:
axis: 0 or 'index' for row-wise, 1 or 'columns' for column-wise.
level: If the axis is a MultiIndex (hierarchical), count along a
part... | def count(self, axis=0, level=None, numeric_only=False):
"""Get the count of non-null objects in the DataFrame.
Arguments:
axis: 0 or 'index' for row-wise, 1 or 'columns' for column-wise.
level: If the axis is a MultiIndex (hierarchical), count along a
part... | [
"Get",
"the",
"count",
"of",
"non",
"-",
"null",
"objects",
"in",
"the",
"DataFrame",
".",
"Arguments",
":",
"axis",
":",
"0",
"or",
"index",
"for",
"row",
"-",
"wise",
"1",
"or",
"columns",
"for",
"column",
"-",
"wise",
".",
"level",
":",
"If",
"t... | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L655-L672 | [
"def",
"count",
"(",
"self",
",",
"axis",
"=",
"0",
",",
"level",
"=",
"None",
",",
"numeric_only",
"=",
"False",
")",
":",
"axis",
"=",
"self",
".",
"_get_axis_number",
"(",
"axis",
")",
"if",
"axis",
"is",
"not",
"None",
"else",
"0",
"return",
"s... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.cummax | Perform a cumulative maximum across the DataFrame.
Args:
axis (int): The axis to take maximum on.
skipna (bool): True to skip NA values, false otherwise.
Returns:
The cumulative maximum of the DataFrame. | modin/pandas/base.py | def cummax(self, axis=None, skipna=True, *args, **kwargs):
"""Perform a cumulative maximum across the DataFrame.
Args:
axis (int): The axis to take maximum on.
skipna (bool): True to skip NA values, false otherwise.
Returns:
The cumulative maximum of... | def cummax(self, axis=None, skipna=True, *args, **kwargs):
"""Perform a cumulative maximum across the DataFrame.
Args:
axis (int): The axis to take maximum on.
skipna (bool): True to skip NA values, false otherwise.
Returns:
The cumulative maximum of... | [
"Perform",
"a",
"cumulative",
"maximum",
"across",
"the",
"DataFrame",
".",
"Args",
":",
"axis",
"(",
"int",
")",
":",
"The",
"axis",
"to",
"take",
"maximum",
"on",
".",
"skipna",
"(",
"bool",
")",
":",
"True",
"to",
"skip",
"NA",
"values",
"false",
... | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L674-L691 | [
"def",
"cummax",
"(",
"self",
",",
"axis",
"=",
"None",
",",
"skipna",
"=",
"True",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"axis",
"=",
"self",
".",
"_get_axis_number",
"(",
"axis",
")",
"if",
"axis",
"is",
"not",
"None",
"else",
"0... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.cumprod | Perform a cumulative product across the DataFrame.
Args:
axis (int): The axis to take product on.
skipna (bool): True to skip NA values, false otherwise.
Returns:
The cumulative product of the DataFrame. | modin/pandas/base.py | def cumprod(self, axis=None, skipna=True, *args, **kwargs):
"""Perform a cumulative product across the DataFrame.
Args:
axis (int): The axis to take product on.
skipna (bool): True to skip NA values, false otherwise.
Returns:
The cumulative product o... | def cumprod(self, axis=None, skipna=True, *args, **kwargs):
"""Perform a cumulative product across the DataFrame.
Args:
axis (int): The axis to take product on.
skipna (bool): True to skip NA values, false otherwise.
Returns:
The cumulative product o... | [
"Perform",
"a",
"cumulative",
"product",
"across",
"the",
"DataFrame",
".",
"Args",
":",
"axis",
"(",
"int",
")",
":",
"The",
"axis",
"to",
"take",
"product",
"on",
".",
"skipna",
"(",
"bool",
")",
":",
"True",
"to",
"skip",
"NA",
"values",
"false",
... | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L712-L728 | [
"def",
"cumprod",
"(",
"self",
",",
"axis",
"=",
"None",
",",
"skipna",
"=",
"True",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"axis",
"=",
"self",
".",
"_get_axis_number",
"(",
"axis",
")",
"if",
"axis",
"is",
"not",
"None",
"else",
"... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.describe | Generates descriptive statistics that summarize the central tendency,
dispersion and shape of a dataset's distribution, excluding NaN values.
Args:
percentiles (list-like of numbers, optional):
The percentiles to include in the output.
include: White-list o... | modin/pandas/base.py | def describe(self, percentiles=None, include=None, exclude=None):
"""
Generates descriptive statistics that summarize the central tendency,
dispersion and shape of a dataset's distribution, excluding NaN values.
Args:
percentiles (list-like of numbers, optional):
... | def describe(self, percentiles=None, include=None, exclude=None):
"""
Generates descriptive statistics that summarize the central tendency,
dispersion and shape of a dataset's distribution, excluding NaN values.
Args:
percentiles (list-like of numbers, optional):
... | [
"Generates",
"descriptive",
"statistics",
"that",
"summarize",
"the",
"central",
"tendency",
"dispersion",
"and",
"shape",
"of",
"a",
"dataset",
"s",
"distribution",
"excluding",
"NaN",
"values",
".",
"Args",
":",
"percentiles",
"(",
"list",
"-",
"like",
"of",
... | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L748-L802 | [
"def",
"describe",
"(",
"self",
",",
"percentiles",
"=",
"None",
",",
"include",
"=",
"None",
",",
"exclude",
"=",
"None",
")",
":",
"if",
"include",
"is",
"not",
"None",
"and",
"(",
"isinstance",
"(",
"include",
",",
"np",
".",
"dtype",
")",
"or",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.diff | Finds the difference between elements on the axis requested
Args:
periods: Periods to shift for forming difference
axis: Take difference over rows or columns
Returns:
DataFrame with the diff applied | modin/pandas/base.py | def diff(self, periods=1, axis=0):
"""Finds the difference between elements on the axis requested
Args:
periods: Periods to shift for forming difference
axis: Take difference over rows or columns
Returns:
DataFrame with the diff applied
"""
... | def diff(self, periods=1, axis=0):
"""Finds the difference between elements on the axis requested
Args:
periods: Periods to shift for forming difference
axis: Take difference over rows or columns
Returns:
DataFrame with the diff applied
"""
... | [
"Finds",
"the",
"difference",
"between",
"elements",
"on",
"the",
"axis",
"requested",
"Args",
":",
"periods",
":",
"Periods",
"to",
"shift",
"for",
"forming",
"difference",
"axis",
":",
"Take",
"difference",
"over",
"rows",
"or",
"columns",
"Returns",
":",
... | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L804-L817 | [
"def",
"diff",
"(",
"self",
",",
"periods",
"=",
"1",
",",
"axis",
"=",
"0",
")",
":",
"axis",
"=",
"self",
".",
"_get_axis_number",
"(",
"axis",
")",
"return",
"self",
".",
"__constructor__",
"(",
"query_compiler",
"=",
"self",
".",
"_query_compiler",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.drop | Return new object with labels in requested axis removed.
Args:
labels: Index or column labels to drop.
axis: Whether to drop labels from the index (0 / 'index') or
columns (1 / 'columns').
index, columns: Alternative to specifying axis (labels, axis=1 is
... | modin/pandas/base.py | def drop(
self,
labels=None,
axis=0,
index=None,
columns=None,
level=None,
inplace=False,
errors="raise",
):
"""Return new object with labels in requested axis removed.
Args:
labels: Index or column labels to dro... | def drop(
self,
labels=None,
axis=0,
index=None,
columns=None,
level=None,
inplace=False,
errors="raise",
):
"""Return new object with labels in requested axis removed.
Args:
labels: Index or column labels to dro... | [
"Return",
"new",
"object",
"with",
"labels",
"in",
"requested",
"axis",
"removed",
".",
"Args",
":",
"labels",
":",
"Index",
"or",
"column",
"labels",
"to",
"drop",
".",
"axis",
":",
"Whether",
"to",
"drop",
"labels",
"from",
"the",
"index",
"(",
"0",
... | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L824-L918 | [
"def",
"drop",
"(",
"self",
",",
"labels",
"=",
"None",
",",
"axis",
"=",
"0",
",",
"index",
"=",
"None",
",",
"columns",
"=",
"None",
",",
"level",
"=",
"None",
",",
"inplace",
"=",
"False",
",",
"errors",
"=",
"\"raise\"",
",",
")",
":",
"# TOD... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.dropna | Create a new DataFrame from the removed NA values from this one.
Args:
axis (int, tuple, or list): The axis to apply the drop.
how (str): How to drop the NA values.
'all': drop the label if all values are NA.
'any': drop the label if any values are ... | modin/pandas/base.py | def dropna(self, axis=0, how="any", thresh=None, subset=None, inplace=False):
"""Create a new DataFrame from the removed NA values from this one.
Args:
axis (int, tuple, or list): The axis to apply the drop.
how (str): How to drop the NA values.
'all': drop... | def dropna(self, axis=0, how="any", thresh=None, subset=None, inplace=False):
"""Create a new DataFrame from the removed NA values from this one.
Args:
axis (int, tuple, or list): The axis to apply the drop.
how (str): How to drop the NA values.
'all': drop... | [
"Create",
"a",
"new",
"DataFrame",
"from",
"the",
"removed",
"NA",
"values",
"from",
"this",
"one",
".",
"Args",
":",
"axis",
"(",
"int",
"tuple",
"or",
"list",
")",
":",
"The",
"axis",
"to",
"apply",
"the",
"drop",
".",
"how",
"(",
"str",
")",
":"... | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L920-L967 | [
"def",
"dropna",
"(",
"self",
",",
"axis",
"=",
"0",
",",
"how",
"=",
"\"any\"",
",",
"thresh",
"=",
"None",
",",
"subset",
"=",
"None",
",",
"inplace",
"=",
"False",
")",
":",
"inplace",
"=",
"validate_bool_kwarg",
"(",
"inplace",
",",
"\"inplace\"",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.drop_duplicates | Return DataFrame with duplicate rows removed, optionally only considering certain columns
Args:
subset : column label or sequence of labels, optional
Only consider certain columns for identifying duplicates, by
default use all of the columns
... | modin/pandas/base.py | def drop_duplicates(self, keep="first", inplace=False, **kwargs):
"""Return DataFrame with duplicate rows removed, optionally only considering certain columns
Args:
subset : column label or sequence of labels, optional
Only consider certain columns for ident... | def drop_duplicates(self, keep="first", inplace=False, **kwargs):
"""Return DataFrame with duplicate rows removed, optionally only considering certain columns
Args:
subset : column label or sequence of labels, optional
Only consider certain columns for ident... | [
"Return",
"DataFrame",
"with",
"duplicate",
"rows",
"removed",
"optionally",
"only",
"considering",
"certain",
"columns",
"Args",
":",
"subset",
":",
"column",
"label",
"or",
"sequence",
"of",
"labels",
"optional",
"Only",
"consider",
"certain",
"columns",
"for",
... | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L980-L1003 | [
"def",
"drop_duplicates",
"(",
"self",
",",
"keep",
"=",
"\"first\"",
",",
"inplace",
"=",
"False",
",",
"*",
"*",
"kwargs",
")",
":",
"inplace",
"=",
"validate_bool_kwarg",
"(",
"inplace",
",",
"\"inplace\"",
")",
"if",
"kwargs",
".",
"get",
"(",
"\"sub... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.eq | Checks element-wise that this is equal to other.
Args:
other: A DataFrame or Series or scalar to compare to.
axis: The axis to perform the eq over.
level: The Multilevel index level to apply eq over.
Returns:
A new DataFrame filled with Booleans. | modin/pandas/base.py | def eq(self, other, axis="columns", level=None):
"""Checks element-wise that this is equal to other.
Args:
other: A DataFrame or Series or scalar to compare to.
axis: The axis to perform the eq over.
level: The Multilevel index level to apply eq over.
... | def eq(self, other, axis="columns", level=None):
"""Checks element-wise that this is equal to other.
Args:
other: A DataFrame or Series or scalar to compare to.
axis: The axis to perform the eq over.
level: The Multilevel index level to apply eq over.
... | [
"Checks",
"element",
"-",
"wise",
"that",
"this",
"is",
"equal",
"to",
"other",
".",
"Args",
":",
"other",
":",
"A",
"DataFrame",
"or",
"Series",
"or",
"scalar",
"to",
"compare",
"to",
".",
"axis",
":",
"The",
"axis",
"to",
"perform",
"the",
"eq",
"o... | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L1008-L1019 | [
"def",
"eq",
"(",
"self",
",",
"other",
",",
"axis",
"=",
"\"columns\"",
",",
"level",
"=",
"None",
")",
":",
"return",
"self",
".",
"_binary_op",
"(",
"\"eq\"",
",",
"other",
",",
"axis",
"=",
"axis",
",",
"level",
"=",
"level",
")"
] | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.fillna | Fill NA/NaN values using the specified method.
Args:
value: Value to use to fill holes. This value cannot be a list.
method: Method to use for filling holes in reindexed Series pad.
ffill: propagate last valid observation forward to next valid
bac... | modin/pandas/base.py | def fillna(
self,
value=None,
method=None,
axis=None,
inplace=False,
limit=None,
downcast=None,
**kwargs
):
"""Fill NA/NaN values using the specified method.
Args:
value: Value to use to fill holes. This value ... | def fillna(
self,
value=None,
method=None,
axis=None,
inplace=False,
limit=None,
downcast=None,
**kwargs
):
"""Fill NA/NaN values using the specified method.
Args:
value: Value to use to fill holes. This value ... | [
"Fill",
"NA",
"/",
"NaN",
"values",
"using",
"the",
"specified",
"method",
".",
"Args",
":",
"value",
":",
"Value",
"to",
"use",
"to",
"fill",
"holes",
".",
"This",
"value",
"cannot",
"be",
"a",
"list",
".",
"method",
":",
"Method",
"to",
"use",
"for... | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L1056-L1136 | [
"def",
"fillna",
"(",
"self",
",",
"value",
"=",
"None",
",",
"method",
"=",
"None",
",",
"axis",
"=",
"None",
",",
"inplace",
"=",
"False",
",",
"limit",
"=",
"None",
",",
"downcast",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"# TODO impleme... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.filter | Subset rows or columns based on their labels
Args:
items (list): list of labels to subset
like (string): retain labels where `arg in label == True`
regex (string): retain labels matching regex input
axis: axis to filter on
Returns:
A... | modin/pandas/base.py | def filter(self, items=None, like=None, regex=None, axis=None):
"""Subset rows or columns based on their labels
Args:
items (list): list of labels to subset
like (string): retain labels where `arg in label == True`
regex (string): retain labels matching regex i... | def filter(self, items=None, like=None, regex=None, axis=None):
"""Subset rows or columns based on their labels
Args:
items (list): list of labels to subset
like (string): retain labels where `arg in label == True`
regex (string): retain labels matching regex i... | [
"Subset",
"rows",
"or",
"columns",
"based",
"on",
"their",
"labels",
"Args",
":",
"items",
"(",
"list",
")",
":",
"list",
"of",
"labels",
"to",
"subset",
"like",
"(",
"string",
")",
":",
"retain",
"labels",
"where",
"arg",
"in",
"label",
"==",
"True",
... | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L1138-L1180 | [
"def",
"filter",
"(",
"self",
",",
"items",
"=",
"None",
",",
"like",
"=",
"None",
",",
"regex",
"=",
"None",
",",
"axis",
"=",
"None",
")",
":",
"nkw",
"=",
"count_not_none",
"(",
"items",
",",
"like",
",",
"regex",
")",
"if",
"nkw",
">",
"1",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.floordiv | Divides this DataFrame against another DataFrame/Series/scalar.
Args:
other: The object to use to apply the divide against this.
axis: The axis to divide over.
level: The Multilevel index level to apply divide over.
fill_value: The value to fill NaNs with.
... | modin/pandas/base.py | def floordiv(self, other, axis="columns", level=None, fill_value=None):
"""Divides this DataFrame against another DataFrame/Series/scalar.
Args:
other: The object to use to apply the divide against this.
axis: The axis to divide over.
level: The Multilevel inde... | def floordiv(self, other, axis="columns", level=None, fill_value=None):
"""Divides this DataFrame against another DataFrame/Series/scalar.
Args:
other: The object to use to apply the divide against this.
axis: The axis to divide over.
level: The Multilevel inde... | [
"Divides",
"this",
"DataFrame",
"against",
"another",
"DataFrame",
"/",
"Series",
"/",
"scalar",
".",
"Args",
":",
"other",
":",
"The",
"object",
"to",
"use",
"to",
"apply",
"the",
"divide",
"against",
"this",
".",
"axis",
":",
"The",
"axis",
"to",
"divi... | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L1193-L1207 | [
"def",
"floordiv",
"(",
"self",
",",
"other",
",",
"axis",
"=",
"\"columns\"",
",",
"level",
"=",
"None",
",",
"fill_value",
"=",
"None",
")",
":",
"return",
"self",
".",
"_binary_op",
"(",
"\"floordiv\"",
",",
"other",
",",
"axis",
"=",
"axis",
",",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.ge | Checks element-wise that this is greater than or equal to other.
Args:
other: A DataFrame or Series or scalar to compare to.
axis: The axis to perform the gt over.
level: The Multilevel index level to apply gt over.
Returns:
A new DataFrame fille... | modin/pandas/base.py | def ge(self, other, axis="columns", level=None):
"""Checks element-wise that this is greater than or equal to other.
Args:
other: A DataFrame or Series or scalar to compare to.
axis: The axis to perform the gt over.
level: The Multilevel index level to apply gt... | def ge(self, other, axis="columns", level=None):
"""Checks element-wise that this is greater than or equal to other.
Args:
other: A DataFrame or Series or scalar to compare to.
axis: The axis to perform the gt over.
level: The Multilevel index level to apply gt... | [
"Checks",
"element",
"-",
"wise",
"that",
"this",
"is",
"greater",
"than",
"or",
"equal",
"to",
"other",
".",
"Args",
":",
"other",
":",
"A",
"DataFrame",
"or",
"Series",
"or",
"scalar",
"to",
"compare",
"to",
".",
"axis",
":",
"The",
"axis",
"to",
"... | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L1234-L1245 | [
"def",
"ge",
"(",
"self",
",",
"other",
",",
"axis",
"=",
"\"columns\"",
",",
"level",
"=",
"None",
")",
":",
"return",
"self",
".",
"_binary_op",
"(",
"\"ge\"",
",",
"other",
",",
"axis",
"=",
"axis",
",",
"level",
"=",
"level",
")"
] | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.get_dtype_counts | Get the counts of dtypes in this object.
Returns:
The counts of dtypes in this object. | modin/pandas/base.py | def get_dtype_counts(self):
"""Get the counts of dtypes in this object.
Returns:
The counts of dtypes in this object.
"""
if hasattr(self, "dtype"):
return pandas.Series({str(self.dtype): 1})
result = self.dtypes.value_counts()
result.ind... | def get_dtype_counts(self):
"""Get the counts of dtypes in this object.
Returns:
The counts of dtypes in this object.
"""
if hasattr(self, "dtype"):
return pandas.Series({str(self.dtype): 1})
result = self.dtypes.value_counts()
result.ind... | [
"Get",
"the",
"counts",
"of",
"dtypes",
"in",
"this",
"object",
".",
"Returns",
":",
"The",
"counts",
"of",
"dtypes",
"in",
"this",
"object",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L1264-L1274 | [
"def",
"get_dtype_counts",
"(",
"self",
")",
":",
"if",
"hasattr",
"(",
"self",
",",
"\"dtype\"",
")",
":",
"return",
"pandas",
".",
"Series",
"(",
"{",
"str",
"(",
"self",
".",
"dtype",
")",
":",
"1",
"}",
")",
"result",
"=",
"self",
".",
"dtypes"... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.get_ftype_counts | Get the counts of ftypes in this object.
Returns:
The counts of ftypes in this object. | modin/pandas/base.py | def get_ftype_counts(self):
"""Get the counts of ftypes in this object.
Returns:
The counts of ftypes in this object.
"""
if hasattr(self, "ftype"):
return pandas.Series({self.ftype: 1})
return self.ftypes.value_counts().sort_index() | def get_ftype_counts(self):
"""Get the counts of ftypes in this object.
Returns:
The counts of ftypes in this object.
"""
if hasattr(self, "ftype"):
return pandas.Series({self.ftype: 1})
return self.ftypes.value_counts().sort_index() | [
"Get",
"the",
"counts",
"of",
"ftypes",
"in",
"this",
"object",
".",
"Returns",
":",
"The",
"counts",
"of",
"ftypes",
"in",
"this",
"object",
"."
] | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L1276-L1284 | [
"def",
"get_ftype_counts",
"(",
"self",
")",
":",
"if",
"hasattr",
"(",
"self",
",",
"\"ftype\"",
")",
":",
"return",
"pandas",
".",
"Series",
"(",
"{",
"self",
".",
"ftype",
":",
"1",
"}",
")",
"return",
"self",
".",
"ftypes",
".",
"value_counts",
"... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.gt | Checks element-wise that this is greater than other.
Args:
other: A DataFrame or Series or scalar to compare to.
axis: The axis to perform the gt over.
level: The Multilevel index level to apply gt over.
Returns:
A new DataFrame filled with Boole... | modin/pandas/base.py | def gt(self, other, axis="columns", level=None):
"""Checks element-wise that this is greater than other.
Args:
other: A DataFrame or Series or scalar to compare to.
axis: The axis to perform the gt over.
level: The Multilevel index level to apply gt over.
... | def gt(self, other, axis="columns", level=None):
"""Checks element-wise that this is greater than other.
Args:
other: A DataFrame or Series or scalar to compare to.
axis: The axis to perform the gt over.
level: The Multilevel index level to apply gt over.
... | [
"Checks",
"element",
"-",
"wise",
"that",
"this",
"is",
"greater",
"than",
"other",
".",
"Args",
":",
"other",
":",
"A",
"DataFrame",
"or",
"Series",
"or",
"scalar",
"to",
"compare",
"to",
".",
"axis",
":",
"The",
"axis",
"to",
"perform",
"the",
"gt",
... | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L1289-L1300 | [
"def",
"gt",
"(",
"self",
",",
"other",
",",
"axis",
"=",
"\"columns\"",
",",
"level",
"=",
"None",
")",
":",
"return",
"self",
".",
"_binary_op",
"(",
"\"gt\"",
",",
"other",
",",
"axis",
"=",
"axis",
",",
"level",
"=",
"level",
")"
] | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.head | Get the first n rows of the DataFrame.
Args:
n (int): The number of rows to return.
Returns:
A new DataFrame with the first n rows of the DataFrame. | modin/pandas/base.py | def head(self, n=5):
"""Get the first n rows of the DataFrame.
Args:
n (int): The number of rows to return.
Returns:
A new DataFrame with the first n rows of the DataFrame.
"""
if n >= len(self.index):
return self.copy()
re... | def head(self, n=5):
"""Get the first n rows of the DataFrame.
Args:
n (int): The number of rows to return.
Returns:
A new DataFrame with the first n rows of the DataFrame.
"""
if n >= len(self.index):
return self.copy()
re... | [
"Get",
"the",
"first",
"n",
"rows",
"of",
"the",
"DataFrame",
".",
"Args",
":",
"n",
"(",
"int",
")",
":",
"The",
"number",
"of",
"rows",
"to",
"return",
".",
"Returns",
":",
"A",
"new",
"DataFrame",
"with",
"the",
"first",
"n",
"rows",
"of",
"the"... | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L1302-L1313 | [
"def",
"head",
"(",
"self",
",",
"n",
"=",
"5",
")",
":",
"if",
"n",
">=",
"len",
"(",
"self",
".",
"index",
")",
":",
"return",
"self",
".",
"copy",
"(",
")",
"return",
"self",
".",
"__constructor__",
"(",
"query_compiler",
"=",
"self",
".",
"_q... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.idxmax | Get the index of the first occurrence of the max value of the axis.
Args:
axis (int): Identify the max over the rows (1) or columns (0).
skipna (bool): Whether or not to skip NA values.
Returns:
A Series with the index for each maximum value for the axis
... | modin/pandas/base.py | def idxmax(self, axis=0, skipna=True, *args, **kwargs):
"""Get the index of the first occurrence of the max value of the axis.
Args:
axis (int): Identify the max over the rows (1) or columns (0).
skipna (bool): Whether or not to skip NA values.
Returns:
... | def idxmax(self, axis=0, skipna=True, *args, **kwargs):
"""Get the index of the first occurrence of the max value of the axis.
Args:
axis (int): Identify the max over the rows (1) or columns (0).
skipna (bool): Whether or not to skip NA values.
Returns:
... | [
"Get",
"the",
"index",
"of",
"the",
"first",
"occurrence",
"of",
"the",
"max",
"value",
"of",
"the",
"axis",
".",
"Args",
":",
"axis",
"(",
"int",
")",
":",
"Identify",
"the",
"max",
"over",
"the",
"rows",
"(",
"1",
")",
"or",
"columns",
"(",
"0",
... | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L1321-L1337 | [
"def",
"idxmax",
"(",
"self",
",",
"axis",
"=",
"0",
",",
"skipna",
"=",
"True",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"not",
"all",
"(",
"d",
"!=",
"np",
".",
"dtype",
"(",
"\"O\"",
")",
"for",
"d",
"in",
"self",
".",
... | 5b77d242596560c646b8405340c9ce64acb183cb |
train | BasePandasDataset.isin | Fill a DataFrame with booleans for cells contained in values.
Args:
values (iterable, DataFrame, Series, or dict): The values to find.
Returns:
A new DataFrame with booleans representing whether or not a cell
is in values.
True: cell is contained... | modin/pandas/base.py | def isin(self, values):
"""Fill a DataFrame with booleans for cells contained in values.
Args:
values (iterable, DataFrame, Series, or dict): The values to find.
Returns:
A new DataFrame with booleans representing whether or not a cell
is in values.
... | def isin(self, values):
"""Fill a DataFrame with booleans for cells contained in values.
Args:
values (iterable, DataFrame, Series, or dict): The values to find.
Returns:
A new DataFrame with booleans representing whether or not a cell
is in values.
... | [
"Fill",
"a",
"DataFrame",
"with",
"booleans",
"for",
"cells",
"contained",
"in",
"values",
".",
"Args",
":",
"values",
"(",
"iterable",
"DataFrame",
"Series",
"or",
"dict",
")",
":",
"The",
"values",
"to",
"find",
".",
"Returns",
":",
"A",
"new",
"DataFr... | modin-project/modin | python | https://github.com/modin-project/modin/blob/5b77d242596560c646b8405340c9ce64acb183cb/modin/pandas/base.py#L1360-L1374 | [
"def",
"isin",
"(",
"self",
",",
"values",
")",
":",
"return",
"self",
".",
"__constructor__",
"(",
"query_compiler",
"=",
"self",
".",
"_query_compiler",
".",
"isin",
"(",
"values",
"=",
"values",
")",
")"
] | 5b77d242596560c646b8405340c9ce64acb183cb |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.