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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
test | VaexApp.open | Add a dataset and add it to the UI | packages/vaex-ui/vaex/ui/main.py | def open(self, path):
"""Add a dataset and add it to the UI"""
logger.debug("open dataset: %r", path)
if path.startswith("http") or path.startswith("ws"):
dataset = vaex.open(path, thread_mover=self.call_in_main_thread)
else:
dataset = vaex.open(path)
self... | def open(self, path):
"""Add a dataset and add it to the UI"""
logger.debug("open dataset: %r", path)
if path.startswith("http") or path.startswith("ws"):
dataset = vaex.open(path, thread_mover=self.call_in_main_thread)
else:
dataset = vaex.open(path)
self... | [
"Add",
"a",
"dataset",
"and",
"add",
"it",
"to",
"the",
"UI"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-ui/vaex/ui/main.py#L1608-L1617 | [
"def",
"open",
"(",
"self",
",",
"path",
")",
":",
"logger",
".",
"debug",
"(",
"\"open dataset: %r\"",
",",
"path",
")",
"if",
"path",
".",
"startswith",
"(",
"\"http\"",
")",
"or",
"path",
".",
"startswith",
"(",
"\"ws\"",
")",
":",
"dataset",
"=",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DatasetRest.evaluate | basic support for evaluate at server, at least to run some unittest, do not expect this to work from strings | packages/vaex-core/vaex/remote.py | def evaluate(self, expression, i1=None, i2=None, out=None, selection=None, delay=False):
expression = _ensure_strings_from_expressions(expression)
"""basic support for evaluate at server, at least to run some unittest, do not expect this to work from strings"""
result = self.server._call_dataset... | def evaluate(self, expression, i1=None, i2=None, out=None, selection=None, delay=False):
expression = _ensure_strings_from_expressions(expression)
"""basic support for evaluate at server, at least to run some unittest, do not expect this to work from strings"""
result = self.server._call_dataset... | [
"basic",
"support",
"for",
"evaluate",
"at",
"server",
"at",
"least",
"to",
"run",
"some",
"unittest",
"do",
"not",
"expect",
"this",
"to",
"work",
"from",
"strings"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/remote.py#L564-L569 | [
"def",
"evaluate",
"(",
"self",
",",
"expression",
",",
"i1",
"=",
"None",
",",
"i2",
"=",
"None",
",",
"out",
"=",
"None",
",",
"selection",
"=",
"None",
",",
"delay",
"=",
"False",
")",
":",
"expression",
"=",
"_ensure_strings_from_expressions",
"(",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | delayed | Decorator to transparantly accept delayed computation.
Example:
>>> delayed_sum = ds.sum(ds.E, binby=ds.x, limits=limits,
>>> shape=4, delay=True)
>>> @vaex.delayed
>>> def total_sum(sums):
>>> return sums.sum()
>>> sum_of_sums = total_sum(delayed_sum)
>>> ds.exec... | packages/vaex-core/vaex/delayed.py | def delayed(f):
'''Decorator to transparantly accept delayed computation.
Example:
>>> delayed_sum = ds.sum(ds.E, binby=ds.x, limits=limits,
>>> shape=4, delay=True)
>>> @vaex.delayed
>>> def total_sum(sums):
>>> return sums.sum()
>>> sum_of_sums = total_sum(delay... | def delayed(f):
'''Decorator to transparantly accept delayed computation.
Example:
>>> delayed_sum = ds.sum(ds.E, binby=ds.x, limits=limits,
>>> shape=4, delay=True)
>>> @vaex.delayed
>>> def total_sum(sums):
>>> return sums.sum()
>>> sum_of_sums = total_sum(delay... | [
"Decorator",
"to",
"transparantly",
"accept",
"delayed",
"computation",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/delayed.py#L28-L73 | [
"def",
"delayed",
"(",
"f",
")",
":",
"def",
"wrapped",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"# print \"calling\", f, \"with\", kwargs",
"# key_values = kwargs.items()",
"key_promise",
"=",
"list",
"(",
"[",
"(",
"key",
",",
"promisify",
"(",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | Selection._depending_columns | Find all columns that this selection depends on for df ds | packages/vaex-core/vaex/selections.py | def _depending_columns(self, ds):
'''Find all columns that this selection depends on for df ds'''
depending = set()
for expression in self.expressions:
expression = ds._expr(expression) # make sure it is an expression
depending |= expression.variables()
if self.p... | def _depending_columns(self, ds):
'''Find all columns that this selection depends on for df ds'''
depending = set()
for expression in self.expressions:
expression = ds._expr(expression) # make sure it is an expression
depending |= expression.variables()
if self.p... | [
"Find",
"all",
"columns",
"that",
"this",
"selection",
"depends",
"on",
"for",
"df",
"ds"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/selections.py#L47-L55 | [
"def",
"_depending_columns",
"(",
"self",
",",
"ds",
")",
":",
"depending",
"=",
"set",
"(",
")",
"for",
"expression",
"in",
"self",
".",
"expressions",
":",
"expression",
"=",
"ds",
".",
"_expr",
"(",
"expression",
")",
"# make sure it is an expression",
"d... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | Subspace.limits | TODO: doc + server side implementation | packages/vaex-core/vaex/legacy.py | def limits(self, value, square=False):
"""TODO: doc + server side implementation"""
if isinstance(value, six.string_types):
import re
match = re.match(r"(\d*)(\D*)", value)
if match is None:
raise ValueError("do not understand limit specifier %r, examp... | def limits(self, value, square=False):
"""TODO: doc + server side implementation"""
if isinstance(value, six.string_types):
import re
match = re.match(r"(\d*)(\D*)", value)
if match is None:
raise ValueError("do not understand limit specifier %r, examp... | [
"TODO",
":",
"doc",
"+",
"server",
"side",
"implementation"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/legacy.py#L512-L535 | [
"def",
"limits",
"(",
"self",
",",
"value",
",",
"square",
"=",
"False",
")",
":",
"if",
"isinstance",
"(",
"value",
",",
"six",
".",
"string_types",
")",
":",
"import",
"re",
"match",
"=",
"re",
".",
"match",
"(",
"r\"(\\d*)(\\D*)\"",
",",
"value",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | Subspace.plot | Plot the subspace using sane defaults to get a quick look at the data.
:param grid: A 2d numpy array with the counts, if None it will be calculated using limits provided and Subspace.histogram
:param size: Passed to Subspace.histogram
:param limits: Limits for the subspace in the form [[xmin, x... | packages/vaex-core/vaex/legacy.py | def plot(self, grid=None, size=256, limits=None, square=False, center=None, weight=None, weight_stat="mean", figsize=None,
aspect="auto", f="identity", axes=None, xlabel=None, ylabel=None,
group_by=None, group_limits=None, group_colors='jet', group_labels=None, group_count=None,
v... | def plot(self, grid=None, size=256, limits=None, square=False, center=None, weight=None, weight_stat="mean", figsize=None,
aspect="auto", f="identity", axes=None, xlabel=None, ylabel=None,
group_by=None, group_limits=None, group_colors='jet', group_labels=None, group_count=None,
v... | [
"Plot",
"the",
"subspace",
"using",
"sane",
"defaults",
"to",
"get",
"a",
"quick",
"look",
"at",
"the",
"data",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/legacy.py#L663-L740 | [
"def",
"plot",
"(",
"self",
",",
"grid",
"=",
"None",
",",
"size",
"=",
"256",
",",
"limits",
"=",
"None",
",",
"square",
"=",
"False",
",",
"center",
"=",
"None",
",",
"weight",
"=",
"None",
",",
"weight_stat",
"=",
"\"mean\"",
",",
"figsize",
"="... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | Subspace.plot1d | Plot the subspace using sane defaults to get a quick look at the data.
:param grid: A 2d numpy array with the counts, if None it will be calculated using limits provided and Subspace.histogram
:param size: Passed to Subspace.histogram
:param limits: Limits for the subspace in the form [[xmin, x... | packages/vaex-core/vaex/legacy.py | def plot1d(self, grid=None, size=64, limits=None, weight=None, figsize=None, f="identity", axes=None, xlabel=None, ylabel=None, **kwargs):
"""Plot the subspace using sane defaults to get a quick look at the data.
:param grid: A 2d numpy array with the counts, if None it will be calculated using limits ... | def plot1d(self, grid=None, size=64, limits=None, weight=None, figsize=None, f="identity", axes=None, xlabel=None, ylabel=None, **kwargs):
"""Plot the subspace using sane defaults to get a quick look at the data.
:param grid: A 2d numpy array with the counts, if None it will be calculated using limits ... | [
"Plot",
"the",
"subspace",
"using",
"sane",
"defaults",
"to",
"get",
"a",
"quick",
"look",
"at",
"the",
"data",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/legacy.py#L742-L774 | [
"def",
"plot1d",
"(",
"self",
",",
"grid",
"=",
"None",
",",
"size",
"=",
"64",
",",
"limits",
"=",
"None",
",",
"weight",
"=",
"None",
",",
"figsize",
"=",
"None",
",",
"f",
"=",
"\"identity\"",
",",
"axes",
"=",
"None",
",",
"xlabel",
"=",
"Non... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | Subspace.bounded_by_sigmas | Returns a bounded subspace (SubspaceBounded) with limits given by Subspace.limits_sigma()
:rtype: SubspaceBounded | packages/vaex-core/vaex/legacy.py | def bounded_by_sigmas(self, sigmas=3, square=False):
"""Returns a bounded subspace (SubspaceBounded) with limits given by Subspace.limits_sigma()
:rtype: SubspaceBounded
"""
bounds = self.limits_sigma(sigmas=sigmas, square=square)
return SubspaceBounded(self, bounds) | def bounded_by_sigmas(self, sigmas=3, square=False):
"""Returns a bounded subspace (SubspaceBounded) with limits given by Subspace.limits_sigma()
:rtype: SubspaceBounded
"""
bounds = self.limits_sigma(sigmas=sigmas, square=square)
return SubspaceBounded(self, bounds) | [
"Returns",
"a",
"bounded",
"subspace",
"(",
"SubspaceBounded",
")",
"with",
"limits",
"given",
"by",
"Subspace",
".",
"limits_sigma",
"()"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/legacy.py#L990-L996 | [
"def",
"bounded_by_sigmas",
"(",
"self",
",",
"sigmas",
"=",
"3",
",",
"square",
"=",
"False",
")",
":",
"bounds",
"=",
"self",
".",
"limits_sigma",
"(",
"sigmas",
"=",
"sigmas",
",",
"square",
"=",
"square",
")",
"return",
"SubspaceBounded",
"(",
"self"... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | SubspaceLocal._task | Helper function for returning tasks results, result when immediate is True, otherwise the task itself, which is a promise | packages/vaex-core/vaex/legacy.py | def _task(self, task, progressbar=False):
"""Helper function for returning tasks results, result when immediate is True, otherwise the task itself, which is a promise"""
if self.delay:
# should return a task or a promise nesting it
return self.executor.schedule(task)
else... | def _task(self, task, progressbar=False):
"""Helper function for returning tasks results, result when immediate is True, otherwise the task itself, which is a promise"""
if self.delay:
# should return a task or a promise nesting it
return self.executor.schedule(task)
else... | [
"Helper",
"function",
"for",
"returning",
"tasks",
"results",
"result",
"when",
"immediate",
"is",
"True",
"otherwise",
"the",
"task",
"itself",
"which",
"is",
"a",
"promise"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/legacy.py#L1047-L1071 | [
"def",
"_task",
"(",
"self",
",",
"task",
",",
"progressbar",
"=",
"False",
")",
":",
"if",
"self",
".",
"delay",
":",
"# should return a task or a promise nesting it",
"return",
"self",
".",
"executor",
".",
"schedule",
"(",
"task",
")",
"else",
":",
"impor... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | ____RankingTableModel.sort | Sort table by given column number. | packages/vaex-ui/vaex/ui/ranking.py | def sort(self, Ncol, order):
"""Sort table by given column number.
"""
self.emit(QtCore.SIGNAL("layoutAboutToBeChanged()"))
if Ncol == 0:
print("by name")
# get indices, sorted by pair name
sortlist = list(zip(self.pairs, list(range(len(self.pairs)))))... | def sort(self, Ncol, order):
"""Sort table by given column number.
"""
self.emit(QtCore.SIGNAL("layoutAboutToBeChanged()"))
if Ncol == 0:
print("by name")
# get indices, sorted by pair name
sortlist = list(zip(self.pairs, list(range(len(self.pairs)))))... | [
"Sort",
"table",
"by",
"given",
"column",
"number",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-ui/vaex/ui/ranking.py#L210-L235 | [
"def",
"sort",
"(",
"self",
",",
"Ncol",
",",
"order",
")",
":",
"self",
".",
"emit",
"(",
"QtCore",
".",
"SIGNAL",
"(",
"\"layoutAboutToBeChanged()\"",
")",
")",
"if",
"Ncol",
"==",
"0",
":",
"print",
"(",
"\"by name\"",
")",
"# get indices, sorted by pai... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | export_hdf5_v1 | :param DatasetLocal dataset: dataset to export
:param str path: path for file
:param lis[str] column_names: list of column names to export or None for all columns
:param str byteorder: = for native, < for little endian and > for big endian
:param bool shuffle: export rows in random order
:param bool... | packages/vaex-astro/vaex/astro/export.py | def export_hdf5_v1(dataset, path, column_names=None, byteorder="=", shuffle=False, selection=False, progress=None, virtual=True):
"""
:param DatasetLocal dataset: dataset to export
:param str path: path for file
:param lis[str] column_names: list of column names to export or None for all columns
:pa... | def export_hdf5_v1(dataset, path, column_names=None, byteorder="=", shuffle=False, selection=False, progress=None, virtual=True):
"""
:param DatasetLocal dataset: dataset to export
:param str path: path for file
:param lis[str] column_names: list of column names to export or None for all columns
:pa... | [
":",
"param",
"DatasetLocal",
"dataset",
":",
"dataset",
"to",
"export",
":",
"param",
"str",
"path",
":",
"path",
"for",
"file",
":",
"param",
"lis",
"[",
"str",
"]",
"column_names",
":",
"list",
"of",
"column",
"names",
"to",
"export",
"or",
"None",
... | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-astro/vaex/astro/export.py#L23-L107 | [
"def",
"export_hdf5_v1",
"(",
"dataset",
",",
"path",
",",
"column_names",
"=",
"None",
",",
"byteorder",
"=",
"\"=\"",
",",
"shuffle",
"=",
"False",
",",
"selection",
"=",
"False",
",",
"progress",
"=",
"None",
",",
"virtual",
"=",
"True",
")",
":",
"... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | getinfo | Read header data from Gadget data file 'filename' with Gadget file
type 'gtype'. Returns offsets of positions and velocities. | packages/vaex-core/vaex/file/gadget.py | def getinfo(filename, seek=None):
"""Read header data from Gadget data file 'filename' with Gadget file
type 'gtype'. Returns offsets of positions and velocities."""
DESC = '=I4sII' # struct formatting string
HEAD = '=I6I6dddii6iiiddddii6ii60xI' # struct formatting string
keys... | def getinfo(filename, seek=None):
"""Read header data from Gadget data file 'filename' with Gadget file
type 'gtype'. Returns offsets of positions and velocities."""
DESC = '=I4sII' # struct formatting string
HEAD = '=I6I6dddii6iiiddddii6ii60xI' # struct formatting string
keys... | [
"Read",
"header",
"data",
"from",
"Gadget",
"data",
"file",
"filename",
"with",
"Gadget",
"file",
"type",
"gtype",
".",
"Returns",
"offsets",
"of",
"positions",
"and",
"velocities",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/file/gadget.py#L5-L42 | [
"def",
"getinfo",
"(",
"filename",
",",
"seek",
"=",
"None",
")",
":",
"DESC",
"=",
"'=I4sII'",
"# struct formatting string",
"HEAD",
"=",
"'=I6I6dddii6iiiddddii6ii60xI'",
"# struct formatting string",
"keys",
"=",
"(",
"'Npart'",
",",
"'Massarr'",
",",
"'Time'",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | _export | :param DatasetLocal dataset: dataset to export
:param str path: path for file
:param lis[str] column_names: list of column names to export or None for all columns
:param str byteorder: = for native, < for little endian and > for big endian
:param bool shuffle: export rows in random order
:param bool... | packages/vaex-core/vaex/export.py | def _export(dataset_input, dataset_output, random_index_column, path, column_names=None, byteorder="=", shuffle=False, selection=False, progress=None, virtual=True, sort=None, ascending=True):
"""
:param DatasetLocal dataset: dataset to export
:param str path: path for file
:param lis[str] column_names:... | def _export(dataset_input, dataset_output, random_index_column, path, column_names=None, byteorder="=", shuffle=False, selection=False, progress=None, virtual=True, sort=None, ascending=True):
"""
:param DatasetLocal dataset: dataset to export
:param str path: path for file
:param lis[str] column_names:... | [
":",
"param",
"DatasetLocal",
"dataset",
":",
"dataset",
"to",
"export",
":",
"param",
"str",
"path",
":",
"path",
"for",
"file",
":",
"param",
"lis",
"[",
"str",
"]",
"column_names",
":",
"list",
"of",
"column",
"names",
"to",
"export",
"or",
"None",
... | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/export.py#L34-L157 | [
"def",
"_export",
"(",
"dataset_input",
",",
"dataset_output",
",",
"random_index_column",
",",
"path",
",",
"column_names",
"=",
"None",
",",
"byteorder",
"=",
"\"=\"",
",",
"shuffle",
"=",
"False",
",",
"selection",
"=",
"False",
",",
"progress",
"=",
"Non... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | export_fits | :param DatasetLocal dataset: dataset to export
:param str path: path for file
:param lis[str] column_names: list of column names to export or None for all columns
:param bool shuffle: export rows in random order
:param bool selection: export selection or not
:param progress: progress callback that g... | packages/vaex-core/vaex/export.py | def export_fits(dataset, path, column_names=None, shuffle=False, selection=False, progress=None, virtual=True, sort=None, ascending=True):
"""
:param DatasetLocal dataset: dataset to export
:param str path: path for file
:param lis[str] column_names: list of column names to export or None for all column... | def export_fits(dataset, path, column_names=None, shuffle=False, selection=False, progress=None, virtual=True, sort=None, ascending=True):
"""
:param DatasetLocal dataset: dataset to export
:param str path: path for file
:param lis[str] column_names: list of column names to export or None for all column... | [
":",
"param",
"DatasetLocal",
"dataset",
":",
"dataset",
"to",
"export",
":",
"param",
"str",
"path",
":",
"path",
"for",
"file",
":",
"param",
"lis",
"[",
"str",
"]",
"column_names",
":",
"list",
"of",
"column",
"names",
"to",
"export",
"or",
"None",
... | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/export.py#L270-L330 | [
"def",
"export_fits",
"(",
"dataset",
",",
"path",
",",
"column_names",
"=",
"None",
",",
"shuffle",
"=",
"False",
",",
"selection",
"=",
"False",
",",
"progress",
"=",
"None",
",",
"virtual",
"=",
"True",
",",
"sort",
"=",
"None",
",",
"ascending",
"=... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | Slicer.clear | clear the cursor | packages/vaex-ui/vaex/ui/plot_windows.py | def clear(self, event):
"""clear the cursor"""
if self.useblit:
self.background = (
self.canvas.copy_from_bbox(self.canvas.figure.bbox))
for line in self.vlines + self.hlines:
line.set_visible(False)
self.ellipse.set_visible(False) | def clear(self, event):
"""clear the cursor"""
if self.useblit:
self.background = (
self.canvas.copy_from_bbox(self.canvas.figure.bbox))
for line in self.vlines + self.hlines:
line.set_visible(False)
self.ellipse.set_visible(False) | [
"clear",
"the",
"cursor"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-ui/vaex/ui/plot_windows.py#L121-L128 | [
"def",
"clear",
"(",
"self",
",",
"event",
")",
":",
"if",
"self",
".",
"useblit",
":",
"self",
".",
"background",
"=",
"(",
"self",
".",
"canvas",
".",
"copy_from_bbox",
"(",
"self",
".",
"canvas",
".",
"figure",
".",
"bbox",
")",
")",
"for",
"lin... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | PlotDialog._wait | Used for unittesting to make sure the plots are all done | packages/vaex-ui/vaex/ui/plot_windows.py | def _wait(self):
"""Used for unittesting to make sure the plots are all done"""
logger.debug("will wait for last plot to finish")
self._plot_event = threading.Event()
self.queue_update._wait()
self.queue_replot._wait()
self.queue_redraw._wait()
qt_app = QtCore.QCo... | def _wait(self):
"""Used for unittesting to make sure the plots are all done"""
logger.debug("will wait for last plot to finish")
self._plot_event = threading.Event()
self.queue_update._wait()
self.queue_replot._wait()
self.queue_redraw._wait()
qt_app = QtCore.QCo... | [
"Used",
"for",
"unittesting",
"to",
"make",
"sure",
"the",
"plots",
"are",
"all",
"done"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-ui/vaex/ui/plot_windows.py#L588-L601 | [
"def",
"_wait",
"(",
"self",
")",
":",
"logger",
".",
"debug",
"(",
"\"will wait for last plot to finish\"",
")",
"self",
".",
"_plot_event",
"=",
"threading",
".",
"Event",
"(",
")",
"self",
".",
"queue_update",
".",
"_wait",
"(",
")",
"self",
".",
"queue... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | PlotDialog._update_step2 | Each layer has it's own ranges_grid computed now, unless something went wrong
But all layers are shown with the same ranges (self.state.ranges_viewport)
If any of the ranges is None, take the min/max of each layer | packages/vaex-ui/vaex/ui/plot_windows.py | def _update_step2(self, layers):
"""Each layer has it's own ranges_grid computed now, unless something went wrong
But all layers are shown with the same ranges (self.state.ranges_viewport)
If any of the ranges is None, take the min/max of each layer
"""
logger.info("done with ran... | def _update_step2(self, layers):
"""Each layer has it's own ranges_grid computed now, unless something went wrong
But all layers are shown with the same ranges (self.state.ranges_viewport)
If any of the ranges is None, take the min/max of each layer
"""
logger.info("done with ran... | [
"Each",
"layer",
"has",
"it",
"s",
"own",
"ranges_grid",
"computed",
"now",
"unless",
"something",
"went",
"wrong",
"But",
"all",
"layers",
"are",
"shown",
"with",
"the",
"same",
"ranges",
"(",
"self",
".",
"state",
".",
"ranges_viewport",
")",
"If",
"any"... | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-ui/vaex/ui/plot_windows.py#L1218-L1247 | [
"def",
"_update_step2",
"(",
"self",
",",
"layers",
")",
":",
"logger",
".",
"info",
"(",
"\"done with ranges, now update step2 for layers: %r\"",
",",
"layers",
")",
"for",
"dimension",
"in",
"range",
"(",
"self",
".",
"dimensions",
")",
":",
"if",
"self",
".... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | subdivide | Generates a list with start end stop indices of length parts, [(0, length/parts), ..., (.., length)] | packages/vaex-core/vaex/utils.py | def subdivide(length, parts=None, max_length=None):
"""Generates a list with start end stop indices of length parts, [(0, length/parts), ..., (.., length)]"""
if max_length:
i1 = 0
done = False
while not done:
i2 = min(length, i1 + max_length)
# print i1, i2
... | def subdivide(length, parts=None, max_length=None):
"""Generates a list with start end stop indices of length parts, [(0, length/parts), ..., (.., length)]"""
if max_length:
i1 = 0
done = False
while not done:
i2 = min(length, i1 + max_length)
# print i1, i2
... | [
"Generates",
"a",
"list",
"with",
"start",
"end",
"stop",
"indices",
"of",
"length",
"parts",
"[",
"(",
"0",
"length",
"/",
"parts",
")",
"...",
"(",
"..",
"length",
")",
"]"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/utils.py#L59-L77 | [
"def",
"subdivide",
"(",
"length",
",",
"parts",
"=",
"None",
",",
"max_length",
"=",
"None",
")",
":",
"if",
"max_length",
":",
"i1",
"=",
"0",
"done",
"=",
"False",
"while",
"not",
"done",
":",
"i2",
"=",
"min",
"(",
"length",
",",
"i1",
"+",
"... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | os_open | Open document by the default handler of the OS, could be a url opened by a browser, a text file by an editor etc | packages/vaex-core/vaex/utils.py | def os_open(document):
"""Open document by the default handler of the OS, could be a url opened by a browser, a text file by an editor etc"""
osname = platform.system().lower()
if osname == "darwin":
os.system("open \"" + document + "\"")
if osname == "linux":
cmd = "xdg-open \"" + docum... | def os_open(document):
"""Open document by the default handler of the OS, could be a url opened by a browser, a text file by an editor etc"""
osname = platform.system().lower()
if osname == "darwin":
os.system("open \"" + document + "\"")
if osname == "linux":
cmd = "xdg-open \"" + docum... | [
"Open",
"document",
"by",
"the",
"default",
"handler",
"of",
"the",
"OS",
"could",
"be",
"a",
"url",
"opened",
"by",
"a",
"browser",
"a",
"text",
"file",
"by",
"an",
"editor",
"etc"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/utils.py#L150-L159 | [
"def",
"os_open",
"(",
"document",
")",
":",
"osname",
"=",
"platform",
".",
"system",
"(",
")",
".",
"lower",
"(",
")",
"if",
"osname",
"==",
"\"darwin\"",
":",
"os",
".",
"system",
"(",
"\"open \\\"\"",
"+",
"document",
"+",
"\"\\\"\"",
")",
"if",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | write_to | Flexible writing, where f can be a filename or f object, if filename, closed after writing | packages/vaex-core/vaex/utils.py | def write_to(f, mode):
"""Flexible writing, where f can be a filename or f object, if filename, closed after writing"""
if hasattr(f, 'write'):
yield f
else:
f = open(f, mode)
yield f
f.close() | def write_to(f, mode):
"""Flexible writing, where f can be a filename or f object, if filename, closed after writing"""
if hasattr(f, 'write'):
yield f
else:
f = open(f, mode)
yield f
f.close() | [
"Flexible",
"writing",
"where",
"f",
"can",
"be",
"a",
"filename",
"or",
"f",
"object",
"if",
"filename",
"closed",
"after",
"writing"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/utils.py#L588-L595 | [
"def",
"write_to",
"(",
"f",
",",
"mode",
")",
":",
"if",
"hasattr",
"(",
"f",
",",
"'write'",
")",
":",
"yield",
"f",
"else",
":",
"f",
"=",
"open",
"(",
"f",
",",
"mode",
")",
"yield",
"f",
"f",
".",
"close",
"(",
")"
] | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | _split_and_combine_mask | Combines all masks from a list of arrays, and logically ors them into a single mask | packages/vaex-core/vaex/utils.py | def _split_and_combine_mask(arrays):
'''Combines all masks from a list of arrays, and logically ors them into a single mask'''
masks = [np.ma.getmaskarray(block) for block in arrays if np.ma.isMaskedArray(block)]
arrays = [block.data if np.ma.isMaskedArray(block) else block for block in arrays]
mask = None
if mask... | def _split_and_combine_mask(arrays):
'''Combines all masks from a list of arrays, and logically ors them into a single mask'''
masks = [np.ma.getmaskarray(block) for block in arrays if np.ma.isMaskedArray(block)]
arrays = [block.data if np.ma.isMaskedArray(block) else block for block in arrays]
mask = None
if mask... | [
"Combines",
"all",
"masks",
"from",
"a",
"list",
"of",
"arrays",
"and",
"logically",
"ors",
"them",
"into",
"a",
"single",
"mask"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/utils.py#L832-L841 | [
"def",
"_split_and_combine_mask",
"(",
"arrays",
")",
":",
"masks",
"=",
"[",
"np",
".",
"ma",
".",
"getmaskarray",
"(",
"block",
")",
"for",
"block",
"in",
"arrays",
"if",
"np",
".",
"ma",
".",
"isMaskedArray",
"(",
"block",
")",
"]",
"arrays",
"=",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | plot2d_contour | Plot conting contours on 2D grid.
:param x: {expression}
:param y: {expression}
:param what: What to plot, count(*) will show a N-d histogram, mean('x'), the mean of the x column, sum('x') the sum, std('x') the standard deviation, correlation('vx', 'vy') the correlation coefficient. Can also be a list of v... | packages/vaex-viz/vaex/viz/contour.py | def plot2d_contour(self, x=None, y=None, what="count(*)", limits=None, shape=256,
selection=None, f="identity", figsize=None,
xlabel=None, ylabel=None,
aspect="auto", levels=None, fill=False,
colorbar=False, colorbar_label=None,
... | def plot2d_contour(self, x=None, y=None, what="count(*)", limits=None, shape=256,
selection=None, f="identity", figsize=None,
xlabel=None, ylabel=None,
aspect="auto", levels=None, fill=False,
colorbar=False, colorbar_label=None,
... | [
"Plot",
"conting",
"contours",
"on",
"2D",
"grid",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-viz/vaex/viz/contour.py#L6-L115 | [
"def",
"plot2d_contour",
"(",
"self",
",",
"x",
"=",
"None",
",",
"y",
"=",
"None",
",",
"what",
"=",
"\"count(*)\"",
",",
"limits",
"=",
"None",
",",
"shape",
"=",
"256",
",",
"selection",
"=",
"None",
",",
"f",
"=",
"\"identity\"",
",",
"figsize",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | _export_table | :param DatasetLocal dataset: dataset to export
:param str path: path for file
:param lis[str] column_names: list of column names to export or None for all columns
:param str byteorder: = for native, < for little endian and > for big endian
:param bool shuffle: export rows in random order
:param bool... | packages/vaex-arrow/vaex_arrow/export.py | def _export_table(dataset, column_names=None, byteorder="=", shuffle=False, selection=False, progress=None, virtual=True, sort=None, ascending=True):
"""
:param DatasetLocal dataset: dataset to export
:param str path: path for file
:param lis[str] column_names: list of column names to export or None for... | def _export_table(dataset, column_names=None, byteorder="=", shuffle=False, selection=False, progress=None, virtual=True, sort=None, ascending=True):
"""
:param DatasetLocal dataset: dataset to export
:param str path: path for file
:param lis[str] column_names: list of column names to export or None for... | [
":",
"param",
"DatasetLocal",
"dataset",
":",
"dataset",
"to",
"export",
":",
"param",
"str",
"path",
":",
"path",
"for",
"file",
":",
"param",
"lis",
"[",
"str",
"]",
"column_names",
":",
"list",
"of",
"column",
"names",
"to",
"export",
"or",
"None",
... | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-arrow/vaex_arrow/export.py#L36-L108 | [
"def",
"_export_table",
"(",
"dataset",
",",
"column_names",
"=",
"None",
",",
"byteorder",
"=",
"\"=\"",
",",
"shuffle",
"=",
"False",
",",
"selection",
"=",
"False",
",",
"progress",
"=",
"None",
",",
"virtual",
"=",
"True",
",",
"sort",
"=",
"None",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.nop | Evaluates expression, and drop the result, usefull for benchmarking, since vaex is usually lazy | packages/vaex-core/vaex/dataframe.py | def nop(self, expression, progress=False, delay=False):
"""Evaluates expression, and drop the result, usefull for benchmarking, since vaex is usually lazy"""
expression = _ensure_string_from_expression(expression)
def map(ar):
pass
def reduce(a, b):
pass
r... | def nop(self, expression, progress=False, delay=False):
"""Evaluates expression, and drop the result, usefull for benchmarking, since vaex is usually lazy"""
expression = _ensure_string_from_expression(expression)
def map(ar):
pass
def reduce(a, b):
pass
r... | [
"Evaluates",
"expression",
"and",
"drop",
"the",
"result",
"usefull",
"for",
"benchmarking",
"since",
"vaex",
"is",
"usually",
"lazy"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L302-L309 | [
"def",
"nop",
"(",
"self",
",",
"expression",
",",
"progress",
"=",
"False",
",",
"delay",
"=",
"False",
")",
":",
"expression",
"=",
"_ensure_string_from_expression",
"(",
"expression",
")",
"def",
"map",
"(",
"ar",
")",
":",
"pass",
"def",
"reduce",
"(... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.mutual_information | Estimate the mutual information between and x and y on a grid with shape mi_shape and mi_limits, possibly on a grid defined by binby.
If sort is True, the mutual information is returned in sorted (descending) order and the list of expressions is returned in the same order.
Example:
>>> df.mut... | packages/vaex-core/vaex/dataframe.py | def mutual_information(self, x, y=None, mi_limits=None, mi_shape=256, binby=[], limits=None, shape=default_shape, sort=False, selection=False, delay=False):
"""Estimate the mutual information between and x and y on a grid with shape mi_shape and mi_limits, possibly on a grid defined by binby.
If sort i... | def mutual_information(self, x, y=None, mi_limits=None, mi_shape=256, binby=[], limits=None, shape=default_shape, sort=False, selection=False, delay=False):
"""Estimate the mutual information between and x and y on a grid with shape mi_shape and mi_limits, possibly on a grid defined by binby.
If sort i... | [
"Estimate",
"the",
"mutual",
"information",
"between",
"and",
"x",
"and",
"y",
"on",
"a",
"grid",
"with",
"shape",
"mi_shape",
"and",
"mi_limits",
"possibly",
"on",
"a",
"grid",
"defined",
"by",
"binby",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L381-L477 | [
"def",
"mutual_information",
"(",
"self",
",",
"x",
",",
"y",
"=",
"None",
",",
"mi_limits",
"=",
"None",
",",
"mi_shape",
"=",
"256",
",",
"binby",
"=",
"[",
"]",
",",
"limits",
"=",
"None",
",",
"shape",
"=",
"default_shape",
",",
"sort",
"=",
"F... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.count | Count the number of non-NaN values (or all, if expression is None or "*").
Example:
>>> df.count()
330000
>>> df.count("*")
330000.0
>>> df.count("*", binby=["x"], shape=4)
array([ 10925., 155427., 152007., 10748.])
:param expression: Expression or... | packages/vaex-core/vaex/dataframe.py | def count(self, expression=None, binby=[], limits=None, shape=default_shape, selection=False, delay=False, edges=False, progress=None):
"""Count the number of non-NaN values (or all, if expression is None or "*").
Example:
>>> df.count()
330000
>>> df.count("*")
330000.... | def count(self, expression=None, binby=[], limits=None, shape=default_shape, selection=False, delay=False, edges=False, progress=None):
"""Count the number of non-NaN values (or all, if expression is None or "*").
Example:
>>> df.count()
330000
>>> df.count("*")
330000.... | [
"Count",
"the",
"number",
"of",
"non",
"-",
"NaN",
"values",
"(",
"or",
"all",
"if",
"expression",
"is",
"None",
"or",
"*",
")",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L585-L607 | [
"def",
"count",
"(",
"self",
",",
"expression",
"=",
"None",
",",
"binby",
"=",
"[",
"]",
",",
"limits",
"=",
"None",
",",
"shape",
"=",
"default_shape",
",",
"selection",
"=",
"False",
",",
"delay",
"=",
"False",
",",
"edges",
"=",
"False",
",",
"... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.first | Return the first element of a binned `expression`, where the values each bin are sorted by `order_expression`.
Example:
>>> import vaex
>>> df = vaex.example()
>>> df.first(df.x, df.y, shape=8)
>>> df.first(df.x, df.y, shape=8, binby=[df.y])
>>> df.first(df.x, df.y, sha... | packages/vaex-core/vaex/dataframe.py | def first(self, expression, order_expression, binby=[], limits=None, shape=default_shape, selection=False, delay=False, edges=False, progress=None):
"""Return the first element of a binned `expression`, where the values each bin are sorted by `order_expression`.
Example:
>>> import vaex
... | def first(self, expression, order_expression, binby=[], limits=None, shape=default_shape, selection=False, delay=False, edges=False, progress=None):
"""Return the first element of a binned `expression`, where the values each bin are sorted by `order_expression`.
Example:
>>> import vaex
... | [
"Return",
"the",
"first",
"element",
"of",
"a",
"binned",
"expression",
"where",
"the",
"values",
"each",
"bin",
"are",
"sorted",
"by",
"order_expression",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L625-L665 | [
"def",
"first",
"(",
"self",
",",
"expression",
",",
"order_expression",
",",
"binby",
"=",
"[",
"]",
",",
"limits",
"=",
"None",
",",
"shape",
"=",
"default_shape",
",",
"selection",
"=",
"False",
",",
"delay",
"=",
"False",
",",
"edges",
"=",
"False"... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.mean | Calculate the mean for expression, possibly on a grid defined by binby.
Example:
>>> df.mean("x")
-0.067131491264005971
>>> df.mean("(x**2+y**2)**0.5", binby="E", shape=4)
array([ 2.43483742, 4.41840721, 8.26742458, 15.53846476])
:param expression: {expression}
... | packages/vaex-core/vaex/dataframe.py | def mean(self, expression, binby=[], limits=None, shape=default_shape, selection=False, delay=False, progress=None, edges=False):
"""Calculate the mean for expression, possibly on a grid defined by binby.
Example:
>>> df.mean("x")
-0.067131491264005971
>>> df.mean("(x**2+y**2)*... | def mean(self, expression, binby=[], limits=None, shape=default_shape, selection=False, delay=False, progress=None, edges=False):
"""Calculate the mean for expression, possibly on a grid defined by binby.
Example:
>>> df.mean("x")
-0.067131491264005971
>>> df.mean("(x**2+y**2)*... | [
"Calculate",
"the",
"mean",
"for",
"expression",
"possibly",
"on",
"a",
"grid",
"defined",
"by",
"binby",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L669-L713 | [
"def",
"mean",
"(",
"self",
",",
"expression",
",",
"binby",
"=",
"[",
"]",
",",
"limits",
"=",
"None",
",",
"shape",
"=",
"default_shape",
",",
"selection",
"=",
"False",
",",
"delay",
"=",
"False",
",",
"progress",
"=",
"None",
",",
"edges",
"=",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.sum | Calculate the sum for the given expression, possible on a grid defined by binby
Example:
>>> df.sum("L")
304054882.49378014
>>> df.sum("L", binby="E", shape=4)
array([ 8.83517994e+06, 5.92217598e+07, 9.55218726e+07,
1.40008776e+08])
:param... | packages/vaex-core/vaex/dataframe.py | def sum(self, expression, binby=[], limits=None, shape=default_shape, selection=False, delay=False, progress=None, edges=False):
"""Calculate the sum for the given expression, possible on a grid defined by binby
Example:
>>> df.sum("L")
304054882.49378014
>>> df.sum("L", binby=... | def sum(self, expression, binby=[], limits=None, shape=default_shape, selection=False, delay=False, progress=None, edges=False):
"""Calculate the sum for the given expression, possible on a grid defined by binby
Example:
>>> df.sum("L")
304054882.49378014
>>> df.sum("L", binby=... | [
"Calculate",
"the",
"sum",
"for",
"the",
"given",
"expression",
"possible",
"on",
"a",
"grid",
"defined",
"by",
"binby"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L728-L760 | [
"def",
"sum",
"(",
"self",
",",
"expression",
",",
"binby",
"=",
"[",
"]",
",",
"limits",
"=",
"None",
",",
"shape",
"=",
"default_shape",
",",
"selection",
"=",
"False",
",",
"delay",
"=",
"False",
",",
"progress",
"=",
"None",
",",
"edges",
"=",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.std | Calculate the standard deviation for the given expression, possible on a grid defined by binby
>>> df.std("vz")
110.31773397535071
>>> df.std("vz", binby=["(x**2+y**2)**0.5"], shape=4)
array([ 123.57954851, 85.35190177, 61.14345748, 38.0740619 ])
:param expression: {expr... | packages/vaex-core/vaex/dataframe.py | def std(self, expression, binby=[], limits=None, shape=default_shape, selection=False, delay=False, progress=None):
"""Calculate the standard deviation for the given expression, possible on a grid defined by binby
>>> df.std("vz")
110.31773397535071
>>> df.std("vz", binby=["(x**2+y**2)... | def std(self, expression, binby=[], limits=None, shape=default_shape, selection=False, delay=False, progress=None):
"""Calculate the standard deviation for the given expression, possible on a grid defined by binby
>>> df.std("vz")
110.31773397535071
>>> df.std("vz", binby=["(x**2+y**2)... | [
"Calculate",
"the",
"standard",
"deviation",
"for",
"the",
"given",
"expression",
"possible",
"on",
"a",
"grid",
"defined",
"by",
"binby"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L764-L785 | [
"def",
"std",
"(",
"self",
",",
"expression",
",",
"binby",
"=",
"[",
"]",
",",
"limits",
"=",
"None",
",",
"shape",
"=",
"default_shape",
",",
"selection",
"=",
"False",
",",
"delay",
"=",
"False",
",",
"progress",
"=",
"None",
")",
":",
"@",
"del... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.covar | Calculate the covariance cov[x,y] between and x and y, possibly on a grid defined by binby.
Example:
>>> df.covar("x**2+y**2+z**2", "-log(-E+1)")
array(52.69461456005138)
>>> df.covar("x**2+y**2+z**2", "-log(-E+1)")/(df.std("x**2+y**2+z**2") * df.std("-log(-E+1)"))
0.6366637382... | packages/vaex-core/vaex/dataframe.py | def covar(self, x, y, binby=[], limits=None, shape=default_shape, selection=False, delay=False, progress=None):
"""Calculate the covariance cov[x,y] between and x and y, possibly on a grid defined by binby.
Example:
>>> df.covar("x**2+y**2+z**2", "-log(-E+1)")
array(52.69461456005138)
... | def covar(self, x, y, binby=[], limits=None, shape=default_shape, selection=False, delay=False, progress=None):
"""Calculate the covariance cov[x,y] between and x and y, possibly on a grid defined by binby.
Example:
>>> df.covar("x**2+y**2+z**2", "-log(-E+1)")
array(52.69461456005138)
... | [
"Calculate",
"the",
"covariance",
"cov",
"[",
"x",
"y",
"]",
"between",
"and",
"x",
"and",
"y",
"possibly",
"on",
"a",
"grid",
"defined",
"by",
"binby",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L840-L891 | [
"def",
"covar",
"(",
"self",
",",
"x",
",",
"y",
",",
"binby",
"=",
"[",
"]",
",",
"limits",
"=",
"None",
",",
"shape",
"=",
"default_shape",
",",
"selection",
"=",
"False",
",",
"delay",
"=",
"False",
",",
"progress",
"=",
"None",
")",
":",
"@",... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.correlation | Calculate the correlation coefficient cov[x,y]/(std[x]*std[y]) between and x and y, possibly on a grid defined by binby.
Example:
>>> df.correlation("x**2+y**2+z**2", "-log(-E+1)")
array(0.6366637382215669)
>>> df.correlation("x**2+y**2+z**2", "-log(-E+1)", binby="Lz", shape=4)
... | packages/vaex-core/vaex/dataframe.py | def correlation(self, x, y=None, binby=[], limits=None, shape=default_shape, sort=False, sort_key=np.abs, selection=False, delay=False, progress=None):
"""Calculate the correlation coefficient cov[x,y]/(std[x]*std[y]) between and x and y, possibly on a grid defined by binby.
Example:
>>> df.co... | def correlation(self, x, y=None, binby=[], limits=None, shape=default_shape, sort=False, sort_key=np.abs, selection=False, delay=False, progress=None):
"""Calculate the correlation coefficient cov[x,y]/(std[x]*std[y]) between and x and y, possibly on a grid defined by binby.
Example:
>>> df.co... | [
"Calculate",
"the",
"correlation",
"coefficient",
"cov",
"[",
"x",
"y",
"]",
"/",
"(",
"std",
"[",
"x",
"]",
"*",
"std",
"[",
"y",
"]",
")",
"between",
"and",
"x",
"and",
"y",
"possibly",
"on",
"a",
"grid",
"defined",
"by",
"binby",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L894-L960 | [
"def",
"correlation",
"(",
"self",
",",
"x",
",",
"y",
"=",
"None",
",",
"binby",
"=",
"[",
"]",
",",
"limits",
"=",
"None",
",",
"shape",
"=",
"default_shape",
",",
"sort",
"=",
"False",
",",
"sort_key",
"=",
"np",
".",
"abs",
",",
"selection",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.cov | Calculate the covariance matrix for x and y or more expressions, possibly on a grid defined by binby.
Either x and y are expressions, e.g:
>>> df.cov("x", "y")
Or only the x argument is given with a list of expressions, e,g.:
>>> df.cov(["x, "y, "z"])
Example:
>>> d... | packages/vaex-core/vaex/dataframe.py | def cov(self, x, y=None, binby=[], limits=None, shape=default_shape, selection=False, delay=False, progress=None):
"""Calculate the covariance matrix for x and y or more expressions, possibly on a grid defined by binby.
Either x and y are expressions, e.g:
>>> df.cov("x", "y")
Or only... | def cov(self, x, y=None, binby=[], limits=None, shape=default_shape, selection=False, delay=False, progress=None):
"""Calculate the covariance matrix for x and y or more expressions, possibly on a grid defined by binby.
Either x and y are expressions, e.g:
>>> df.cov("x", "y")
Or only... | [
"Calculate",
"the",
"covariance",
"matrix",
"for",
"x",
"and",
"y",
"or",
"more",
"expressions",
"possibly",
"on",
"a",
"grid",
"defined",
"by",
"binby",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L963-L1043 | [
"def",
"cov",
"(",
"self",
",",
"x",
",",
"y",
"=",
"None",
",",
"binby",
"=",
"[",
"]",
",",
"limits",
"=",
"None",
",",
"shape",
"=",
"default_shape",
",",
"selection",
"=",
"False",
",",
"delay",
"=",
"False",
",",
"progress",
"=",
"None",
")"... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.minmax | Calculate the minimum and maximum for expressions, possibly on a grid defined by binby.
Example:
>>> df.minmax("x")
array([-128.293991, 271.365997])
>>> df.minmax(["x", "y"])
array([[-128.293991 , 271.365997 ],
[ -71.5523682, 146.465836 ]])
>>> df... | packages/vaex-core/vaex/dataframe.py | def minmax(self, expression, binby=[], limits=None, shape=default_shape, selection=False, delay=False, progress=None):
"""Calculate the minimum and maximum for expressions, possibly on a grid defined by binby.
Example:
>>> df.minmax("x")
array([-128.293991, 271.365997])
>>> d... | def minmax(self, expression, binby=[], limits=None, shape=default_shape, selection=False, delay=False, progress=None):
"""Calculate the minimum and maximum for expressions, possibly on a grid defined by binby.
Example:
>>> df.minmax("x")
array([-128.293991, 271.365997])
>>> d... | [
"Calculate",
"the",
"minimum",
"and",
"maximum",
"for",
"expressions",
"possibly",
"on",
"a",
"grid",
"defined",
"by",
"binby",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L1047-L1104 | [
"def",
"minmax",
"(",
"self",
",",
"expression",
",",
"binby",
"=",
"[",
"]",
",",
"limits",
"=",
"None",
",",
"shape",
"=",
"default_shape",
",",
"selection",
"=",
"False",
",",
"delay",
"=",
"False",
",",
"progress",
"=",
"None",
")",
":",
"# vmin ... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.min | Calculate the minimum for given expressions, possibly on a grid defined by binby.
Example:
>>> df.min("x")
array(-128.293991)
>>> df.min(["x", "y"])
array([-128.293991 , -71.5523682])
>>> df.min("x", binby="x", shape=5, limits=[-10, 10])
array([-9.99919128, -5... | packages/vaex-core/vaex/dataframe.py | def min(self, expression, binby=[], limits=None, shape=default_shape, selection=False, delay=False, progress=None, edges=False):
"""Calculate the minimum for given expressions, possibly on a grid defined by binby.
Example:
>>> df.min("x")
array(-128.293991)
>>> df.min(["x", "y... | def min(self, expression, binby=[], limits=None, shape=default_shape, selection=False, delay=False, progress=None, edges=False):
"""Calculate the minimum for given expressions, possibly on a grid defined by binby.
Example:
>>> df.min("x")
array(-128.293991)
>>> df.min(["x", "y... | [
"Calculate",
"the",
"minimum",
"for",
"given",
"expressions",
"possibly",
"on",
"a",
"grid",
"defined",
"by",
"binby",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L1108-L1134 | [
"def",
"min",
"(",
"self",
",",
"expression",
",",
"binby",
"=",
"[",
"]",
",",
"limits",
"=",
"None",
",",
"shape",
"=",
"default_shape",
",",
"selection",
"=",
"False",
",",
"delay",
"=",
"False",
",",
"progress",
"=",
"None",
",",
"edges",
"=",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.median_approx | Calculate the median , possibly on a grid defined by binby.
NOTE: this value is approximated by calculating the cumulative distribution on a grid defined by
percentile_shape and percentile_limits
:param expression: {expression}
:param binby: {binby}
:param limits: {limits}
... | packages/vaex-core/vaex/dataframe.py | def median_approx(self, expression, percentage=50., binby=[], limits=None, shape=default_shape, percentile_shape=256, percentile_limits="minmax", selection=False, delay=False):
"""Calculate the median , possibly on a grid defined by binby.
NOTE: this value is approximated by calculating the cumulative ... | def median_approx(self, expression, percentage=50., binby=[], limits=None, shape=default_shape, percentile_shape=256, percentile_limits="minmax", selection=False, delay=False):
"""Calculate the median , possibly on a grid defined by binby.
NOTE: this value is approximated by calculating the cumulative ... | [
"Calculate",
"the",
"median",
"possibly",
"on",
"a",
"grid",
"defined",
"by",
"binby",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L1168-L1185 | [
"def",
"median_approx",
"(",
"self",
",",
"expression",
",",
"percentage",
"=",
"50.",
",",
"binby",
"=",
"[",
"]",
",",
"limits",
"=",
"None",
",",
"shape",
"=",
"default_shape",
",",
"percentile_shape",
"=",
"256",
",",
"percentile_limits",
"=",
"\"minma... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.percentile_approx | Calculate the percentile given by percentage, possibly on a grid defined by binby.
NOTE: this value is approximated by calculating the cumulative distribution on a grid defined by
percentile_shape and percentile_limits.
Example:
>>> df.percentile_approx("x", 10), df.percentile_approx... | packages/vaex-core/vaex/dataframe.py | def percentile_approx(self, expression, percentage=50., binby=[], limits=None, shape=default_shape, percentile_shape=1024, percentile_limits="minmax", selection=False, delay=False):
"""Calculate the percentile given by percentage, possibly on a grid defined by binby.
NOTE: this value is approximated by... | def percentile_approx(self, expression, percentage=50., binby=[], limits=None, shape=default_shape, percentile_shape=1024, percentile_limits="minmax", selection=False, delay=False):
"""Calculate the percentile given by percentage, possibly on a grid defined by binby.
NOTE: this value is approximated by... | [
"Calculate",
"the",
"percentile",
"given",
"by",
"percentage",
"possibly",
"on",
"a",
"grid",
"defined",
"by",
"binby",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L1188-L1312 | [
"def",
"percentile_approx",
"(",
"self",
",",
"expression",
",",
"percentage",
"=",
"50.",
",",
"binby",
"=",
"[",
"]",
",",
"limits",
"=",
"None",
",",
"shape",
"=",
"default_shape",
",",
"percentile_shape",
"=",
"1024",
",",
"percentile_limits",
"=",
"\"... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.limits_percentage | Calculate the [min, max] range for expression, containing approximately a percentage of the data as defined
by percentage.
The range is symmetric around the median, i.e., for a percentage of 90, this gives the same results as:
Example:
>>> df.limits_percentage("x", 90)
array([... | packages/vaex-core/vaex/dataframe.py | def limits_percentage(self, expression, percentage=99.73, square=False, delay=False):
"""Calculate the [min, max] range for expression, containing approximately a percentage of the data as defined
by percentage.
The range is symmetric around the median, i.e., for a percentage of 90, this gives ... | def limits_percentage(self, expression, percentage=99.73, square=False, delay=False):
"""Calculate the [min, max] range for expression, containing approximately a percentage of the data as defined
by percentage.
The range is symmetric around the median, i.e., for a percentage of 90, this gives ... | [
"Calculate",
"the",
"[",
"min",
"max",
"]",
"range",
"for",
"expression",
"containing",
"approximately",
"a",
"percentage",
"of",
"the",
"data",
"as",
"defined",
"by",
"percentage",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L1325-L1367 | [
"def",
"limits_percentage",
"(",
"self",
",",
"expression",
",",
"percentage",
"=",
"99.73",
",",
"square",
"=",
"False",
",",
"delay",
"=",
"False",
")",
":",
"# percentiles = self.percentile(expression, [100-percentage/2, 100-(100-percentage/2.)], delay=True)",
"# return ... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.limits | Calculate the [min, max] range for expression, as described by value, which is '99.7%' by default.
If value is a list of the form [minvalue, maxvalue], it is simply returned, this is for convenience when using mixed
forms.
Example:
>>> df.limits("x")
array([-28.86381927, 28.9... | packages/vaex-core/vaex/dataframe.py | def limits(self, expression, value=None, square=False, selection=None, delay=False, shape=None):
"""Calculate the [min, max] range for expression, as described by value, which is '99.7%' by default.
If value is a list of the form [minvalue, maxvalue], it is simply returned, this is for convenience when... | def limits(self, expression, value=None, square=False, selection=None, delay=False, shape=None):
"""Calculate the [min, max] range for expression, as described by value, which is '99.7%' by default.
If value is a list of the form [minvalue, maxvalue], it is simply returned, this is for convenience when... | [
"Calculate",
"the",
"[",
"min",
"max",
"]",
"range",
"for",
"expression",
"as",
"described",
"by",
"value",
"which",
"is",
"99",
".",
"7%",
"by",
"default",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L1391-L1562 | [
"def",
"limits",
"(",
"self",
",",
"expression",
",",
"value",
"=",
"None",
",",
"square",
"=",
"False",
",",
"selection",
"=",
"None",
",",
"delay",
"=",
"False",
",",
"shape",
"=",
"None",
")",
":",
"if",
"expression",
"==",
"[",
"]",
":",
"retur... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.mode | Calculate/estimate the mode. | packages/vaex-core/vaex/dataframe.py | def mode(self, expression, binby=[], limits=None, shape=256, mode_shape=64, mode_limits=None, progressbar=False, selection=None):
"""Calculate/estimate the mode."""
if len(binby) == 0:
raise ValueError("only supported with binby argument given")
else:
# todo, fix progress... | def mode(self, expression, binby=[], limits=None, shape=256, mode_shape=64, mode_limits=None, progressbar=False, selection=None):
"""Calculate/estimate the mode."""
if len(binby) == 0:
raise ValueError("only supported with binby argument given")
else:
# todo, fix progress... | [
"Calculate",
"/",
"estimate",
"the",
"mode",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L1564-L1593 | [
"def",
"mode",
"(",
"self",
",",
"expression",
",",
"binby",
"=",
"[",
"]",
",",
"limits",
"=",
"None",
",",
"shape",
"=",
"256",
",",
"mode_shape",
"=",
"64",
",",
"mode_limits",
"=",
"None",
",",
"progressbar",
"=",
"False",
",",
"selection",
"=",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.plot_widget | Viz 1d, 2d or 3d in a Jupyter notebook
.. note::
This API is not fully settled and may change in the future
Example:
>>> df.plot_widget(df.x, df.y, backend='bqplot')
>>> df.plot_widget(df.pickup_longitude, df.pickup_latitude, backend='ipyleaflet')
:param backend: ... | packages/vaex-core/vaex/dataframe.py | def plot_widget(self, x, y, z=None, grid=None, shape=256, limits=None, what="count(*)", figsize=None,
f="identity", figure_key=None, fig=None, axes=None, xlabel=None, ylabel=None, title=None,
show=True, selection=[None, True], colormap="afmhot", grid_limits=None, normalize="norma... | def plot_widget(self, x, y, z=None, grid=None, shape=256, limits=None, what="count(*)", figsize=None,
f="identity", figure_key=None, fig=None, axes=None, xlabel=None, ylabel=None, title=None,
show=True, selection=[None, True], colormap="afmhot", grid_limits=None, normalize="norma... | [
"Viz",
"1d",
"2d",
"or",
"3d",
"in",
"a",
"Jupyter",
"notebook"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L1595-L1631 | [
"def",
"plot_widget",
"(",
"self",
",",
"x",
",",
"y",
",",
"z",
"=",
"None",
",",
"grid",
"=",
"None",
",",
"shape",
"=",
"256",
",",
"limits",
"=",
"None",
",",
"what",
"=",
"\"count(*)\"",
",",
"figsize",
"=",
"None",
",",
"f",
"=",
"\"identit... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.healpix_count | Count non missing value for expression on an array which represents healpix data.
:param expression: Expression or column for which to count non-missing values, or None or '*' for counting the rows
:param healpix_expression: {healpix_max_level}
:param healpix_max_level: {healpix_max_level}
... | packages/vaex-core/vaex/dataframe.py | def healpix_count(self, expression=None, healpix_expression=None, healpix_max_level=12, healpix_level=8, binby=None, limits=None, shape=default_shape, delay=False, progress=None, selection=None):
"""Count non missing value for expression on an array which represents healpix data.
:param expression: Exp... | def healpix_count(self, expression=None, healpix_expression=None, healpix_max_level=12, healpix_level=8, binby=None, limits=None, shape=default_shape, delay=False, progress=None, selection=None):
"""Count non missing value for expression on an array which represents healpix data.
:param expression: Exp... | [
"Count",
"non",
"missing",
"value",
"for",
"expression",
"on",
"an",
"array",
"which",
"represents",
"healpix",
"data",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L1657-L1690 | [
"def",
"healpix_count",
"(",
"self",
",",
"expression",
"=",
"None",
",",
"healpix_expression",
"=",
"None",
",",
"healpix_max_level",
"=",
"12",
",",
"healpix_level",
"=",
"8",
",",
"binby",
"=",
"None",
",",
"limits",
"=",
"None",
",",
"shape",
"=",
"d... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.healpix_plot | Viz data in 2d using a healpix column.
:param healpix_expression: {healpix_max_level}
:param healpix_max_level: {healpix_max_level}
:param healpix_level: {healpix_level}
:param what: {what}
:param selection: {selection}
:param grid: {grid}
:param healpix_input: S... | packages/vaex-core/vaex/dataframe.py | def healpix_plot(self, healpix_expression="source_id/34359738368", healpix_max_level=12, healpix_level=8, what="count(*)", selection=None,
grid=None,
healpix_input="equatorial", healpix_output="galactic", f=None,
colormap="afmhot", grid_limits=None, image_s... | def healpix_plot(self, healpix_expression="source_id/34359738368", healpix_max_level=12, healpix_level=8, what="count(*)", selection=None,
grid=None,
healpix_input="equatorial", healpix_output="galactic", f=None,
colormap="afmhot", grid_limits=None, image_s... | [
"Viz",
"data",
"in",
"2d",
"using",
"a",
"healpix",
"column",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L1693-L1763 | [
"def",
"healpix_plot",
"(",
"self",
",",
"healpix_expression",
"=",
"\"source_id/34359738368\"",
",",
"healpix_max_level",
"=",
"12",
",",
"healpix_level",
"=",
"8",
",",
"what",
"=",
"\"count(*)\"",
",",
"selection",
"=",
"None",
",",
"grid",
"=",
"None",
","... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.plot3d | Use at own risk, requires ipyvolume | packages/vaex-core/vaex/dataframe.py | def plot3d(self, x, y, z, vx=None, vy=None, vz=None, vwhat=None, limits=None, grid=None, what="count(*)", shape=128, selection=[None, True], f=None,
vcount_limits=None,
smooth_pre=None, smooth_post=None, grid_limits=None, normalize="normalize", colormap="afmhot",
figure_key=... | def plot3d(self, x, y, z, vx=None, vy=None, vz=None, vwhat=None, limits=None, grid=None, what="count(*)", shape=128, selection=[None, True], f=None,
vcount_limits=None,
smooth_pre=None, smooth_post=None, grid_limits=None, normalize="normalize", colormap="afmhot",
figure_key=... | [
"Use",
"at",
"own",
"risk",
"requires",
"ipyvolume"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L1835-L1852 | [
"def",
"plot3d",
"(",
"self",
",",
"x",
",",
"y",
",",
"z",
",",
"vx",
"=",
"None",
",",
"vy",
"=",
"None",
",",
"vz",
"=",
"None",
",",
"vwhat",
"=",
"None",
",",
"limits",
"=",
"None",
",",
"grid",
"=",
"None",
",",
"what",
"=",
"\"count(*)... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.col | Gives direct access to the columns only (useful for tab completion).
Convenient when working with ipython in combination with small DataFrames, since this gives tab-completion.
Columns can be accesed by there names, which are attributes. The attribues are currently expressions, so you can
do c... | packages/vaex-core/vaex/dataframe.py | def col(self):
"""Gives direct access to the columns only (useful for tab completion).
Convenient when working with ipython in combination with small DataFrames, since this gives tab-completion.
Columns can be accesed by there names, which are attributes. The attribues are currently expression... | def col(self):
"""Gives direct access to the columns only (useful for tab completion).
Convenient when working with ipython in combination with small DataFrames, since this gives tab-completion.
Columns can be accesed by there names, which are attributes. The attribues are currently expression... | [
"Gives",
"direct",
"access",
"to",
"the",
"columns",
"only",
"(",
"useful",
"for",
"tab",
"completion",
")",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L1855-L1877 | [
"def",
"col",
"(",
"self",
")",
":",
"class",
"ColumnList",
"(",
"object",
")",
":",
"pass",
"data",
"=",
"ColumnList",
"(",
")",
"for",
"name",
"in",
"self",
".",
"get_column_names",
"(",
")",
":",
"expression",
"=",
"getattr",
"(",
"self",
",",
"na... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.byte_size | Return the size in bytes the whole DataFrame requires (or the selection), respecting the active_fraction. | packages/vaex-core/vaex/dataframe.py | def byte_size(self, selection=False, virtual=False):
"""Return the size in bytes the whole DataFrame requires (or the selection), respecting the active_fraction."""
bytes_per_row = 0
N = self.count(selection=selection)
extra = 0
for column in list(self.get_column_names(virtual=vi... | def byte_size(self, selection=False, virtual=False):
"""Return the size in bytes the whole DataFrame requires (or the selection), respecting the active_fraction."""
bytes_per_row = 0
N = self.count(selection=selection)
extra = 0
for column in list(self.get_column_names(virtual=vi... | [
"Return",
"the",
"size",
"in",
"bytes",
"the",
"whole",
"DataFrame",
"requires",
"(",
"or",
"the",
"selection",
")",
"respecting",
"the",
"active_fraction",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L1883-L1900 | [
"def",
"byte_size",
"(",
"self",
",",
"selection",
"=",
"False",
",",
"virtual",
"=",
"False",
")",
":",
"bytes_per_row",
"=",
"0",
"N",
"=",
"self",
".",
"count",
"(",
"selection",
"=",
"selection",
")",
"extra",
"=",
"0",
"for",
"column",
"in",
"li... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.dtype | Return the numpy dtype for the given expression, if not a column, the first row will be evaluated to get the dtype. | packages/vaex-core/vaex/dataframe.py | def dtype(self, expression, internal=False):
"""Return the numpy dtype for the given expression, if not a column, the first row will be evaluated to get the dtype."""
expression = _ensure_string_from_expression(expression)
if expression in self.variables:
return np.float64(1).dtype
... | def dtype(self, expression, internal=False):
"""Return the numpy dtype for the given expression, if not a column, the first row will be evaluated to get the dtype."""
expression = _ensure_string_from_expression(expression)
if expression in self.variables:
return np.float64(1).dtype
... | [
"Return",
"the",
"numpy",
"dtype",
"for",
"the",
"given",
"expression",
"if",
"not",
"a",
"column",
"the",
"first",
"row",
"will",
"be",
"evaluated",
"to",
"get",
"the",
"dtype",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L1907-L1927 | [
"def",
"dtype",
"(",
"self",
",",
"expression",
",",
"internal",
"=",
"False",
")",
":",
"expression",
"=",
"_ensure_string_from_expression",
"(",
"expression",
")",
"if",
"expression",
"in",
"self",
".",
"variables",
":",
"return",
"np",
".",
"float64",
"("... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.dtypes | Gives a Pandas series object containing all numpy dtypes of all columns (except hidden). | packages/vaex-core/vaex/dataframe.py | def dtypes(self):
"""Gives a Pandas series object containing all numpy dtypes of all columns (except hidden)."""
from pandas import Series
return Series({column_name:self.dtype(column_name) for column_name in self.get_column_names()}) | def dtypes(self):
"""Gives a Pandas series object containing all numpy dtypes of all columns (except hidden)."""
from pandas import Series
return Series({column_name:self.dtype(column_name) for column_name in self.get_column_names()}) | [
"Gives",
"a",
"Pandas",
"series",
"object",
"containing",
"all",
"numpy",
"dtypes",
"of",
"all",
"columns",
"(",
"except",
"hidden",
")",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L1930-L1933 | [
"def",
"dtypes",
"(",
"self",
")",
":",
"from",
"pandas",
"import",
"Series",
"return",
"Series",
"(",
"{",
"column_name",
":",
"self",
".",
"dtype",
"(",
"column_name",
")",
"for",
"column_name",
"in",
"self",
".",
"get_column_names",
"(",
")",
"}",
")"... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.is_masked | Return if a column is a masked (numpy.ma) column. | packages/vaex-core/vaex/dataframe.py | def is_masked(self, column):
'''Return if a column is a masked (numpy.ma) column.'''
column = _ensure_string_from_expression(column)
if column in self.columns:
return np.ma.isMaskedArray(self.columns[column])
return False | def is_masked(self, column):
'''Return if a column is a masked (numpy.ma) column.'''
column = _ensure_string_from_expression(column)
if column in self.columns:
return np.ma.isMaskedArray(self.columns[column])
return False | [
"Return",
"if",
"a",
"column",
"is",
"a",
"masked",
"(",
"numpy",
".",
"ma",
")",
"column",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L1935-L1940 | [
"def",
"is_masked",
"(",
"self",
",",
"column",
")",
":",
"column",
"=",
"_ensure_string_from_expression",
"(",
"column",
")",
"if",
"column",
"in",
"self",
".",
"columns",
":",
"return",
"np",
".",
"ma",
".",
"isMaskedArray",
"(",
"self",
".",
"columns",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.unit | Returns the unit (an astropy.unit.Units object) for the expression.
Example
>>> import vaex
>>> ds = vaex.example()
>>> df.unit("x")
Unit("kpc")
>>> df.unit("x*L")
Unit("km kpc2 / s")
:param expression: Expression, which can be a column name
:p... | packages/vaex-core/vaex/dataframe.py | def unit(self, expression, default=None):
"""Returns the unit (an astropy.unit.Units object) for the expression.
Example
>>> import vaex
>>> ds = vaex.example()
>>> df.unit("x")
Unit("kpc")
>>> df.unit("x*L")
Unit("km kpc2 / s")
:param expressi... | def unit(self, expression, default=None):
"""Returns the unit (an astropy.unit.Units object) for the expression.
Example
>>> import vaex
>>> ds = vaex.example()
>>> df.unit("x")
Unit("kpc")
>>> df.unit("x*L")
Unit("km kpc2 / s")
:param expressi... | [
"Returns",
"the",
"unit",
"(",
"an",
"astropy",
".",
"unit",
".",
"Units",
"object",
")",
"for",
"the",
"expression",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L1955-L1986 | [
"def",
"unit",
"(",
"self",
",",
"expression",
",",
"default",
"=",
"None",
")",
":",
"expression",
"=",
"_ensure_string_from_expression",
"(",
"expression",
")",
"try",
":",
"# if an expression like pi * <some_expr> it will evaluate to a quantity instead of a unit",
"unit_... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.ucd_find | Find a set of columns (names) which have the ucd, or part of the ucd.
Prefixed with a ^, it will only match the first part of the ucd.
Example
>>> df.ucd_find('pos.eq.ra', 'pos.eq.dec')
['RA', 'DEC']
>>> df.ucd_find('pos.eq.ra', 'doesnotexist')
>>> df.ucds[df.ucd_find(... | packages/vaex-core/vaex/dataframe.py | def ucd_find(self, ucds, exclude=[]):
"""Find a set of columns (names) which have the ucd, or part of the ucd.
Prefixed with a ^, it will only match the first part of the ucd.
Example
>>> df.ucd_find('pos.eq.ra', 'pos.eq.dec')
['RA', 'DEC']
>>> df.ucd_find('pos.eq.ra',... | def ucd_find(self, ucds, exclude=[]):
"""Find a set of columns (names) which have the ucd, or part of the ucd.
Prefixed with a ^, it will only match the first part of the ucd.
Example
>>> df.ucd_find('pos.eq.ra', 'pos.eq.dec')
['RA', 'DEC']
>>> df.ucd_find('pos.eq.ra',... | [
"Find",
"a",
"set",
"of",
"columns",
"(",
"names",
")",
"which",
"have",
"the",
"ucd",
"or",
"part",
"of",
"the",
"ucd",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L1988-L2016 | [
"def",
"ucd_find",
"(",
"self",
",",
"ucds",
",",
"exclude",
"=",
"[",
"]",
")",
":",
"if",
"isinstance",
"(",
"ucds",
",",
"six",
".",
"string_types",
")",
":",
"ucds",
"=",
"[",
"ucds",
"]",
"if",
"len",
"(",
"ucds",
")",
"==",
"1",
":",
"ucd... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.get_private_dir | Each DataFrame has a directory where files are stored for metadata etc.
Example
>>> import vaex
>>> ds = vaex.example()
>>> vaex.get_private_dir()
'/Users/users/breddels/.vaex/dfs/_Users_users_breddels_vaex-testing_data_helmi-dezeeuw-2000-10p.hdf5'
:param bool create: ... | packages/vaex-core/vaex/dataframe.py | def get_private_dir(self, create=False):
"""Each DataFrame has a directory where files are stored for metadata etc.
Example
>>> import vaex
>>> ds = vaex.example()
>>> vaex.get_private_dir()
'/Users/users/breddels/.vaex/dfs/_Users_users_breddels_vaex-testing_data_helmi-... | def get_private_dir(self, create=False):
"""Each DataFrame has a directory where files are stored for metadata etc.
Example
>>> import vaex
>>> ds = vaex.example()
>>> vaex.get_private_dir()
'/Users/users/breddels/.vaex/dfs/_Users_users_breddels_vaex-testing_data_helmi-... | [
"Each",
"DataFrame",
"has",
"a",
"directory",
"where",
"files",
"are",
"stored",
"for",
"metadata",
"etc",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2058-L2079 | [
"def",
"get_private_dir",
"(",
"self",
",",
"create",
"=",
"False",
")",
":",
"if",
"self",
".",
"is_local",
"(",
")",
":",
"name",
"=",
"os",
".",
"path",
".",
"abspath",
"(",
"self",
".",
"path",
")",
".",
"replace",
"(",
"os",
".",
"path",
"."... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.state_get | Return the internal state of the DataFrame in a dictionary
Example:
>>> import vaex
>>> df = vaex.from_scalars(x=1, y=2)
>>> df['r'] = (df.x**2 + df.y**2)**0.5
>>> df.state_get()
{'active_range': [0, 1],
'column_names': ['x', 'y', 'r'],
'description': No... | packages/vaex-core/vaex/dataframe.py | def state_get(self):
"""Return the internal state of the DataFrame in a dictionary
Example:
>>> import vaex
>>> df = vaex.from_scalars(x=1, y=2)
>>> df['r'] = (df.x**2 + df.y**2)**0.5
>>> df.state_get()
{'active_range': [0, 1],
'column_names': ['x', 'y',... | def state_get(self):
"""Return the internal state of the DataFrame in a dictionary
Example:
>>> import vaex
>>> df = vaex.from_scalars(x=1, y=2)
>>> df['r'] = (df.x**2 + df.y**2)**0.5
>>> df.state_get()
{'active_range': [0, 1],
'column_names': ['x', 'y',... | [
"Return",
"the",
"internal",
"state",
"of",
"the",
"DataFrame",
"in",
"a",
"dictionary"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2081-L2133 | [
"def",
"state_get",
"(",
"self",
")",
":",
"virtual_names",
"=",
"list",
"(",
"self",
".",
"virtual_columns",
".",
"keys",
"(",
")",
")",
"+",
"list",
"(",
"self",
".",
"variables",
".",
"keys",
"(",
")",
")",
"units",
"=",
"{",
"key",
":",
"str",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.state_set | Sets the internal state of the df
Example:
>>> import vaex
>>> df = vaex.from_scalars(x=1, y=2)
>>> df
# x y r
0 1 2 2.23607
>>> df['r'] = (df.x**2 + df.y**2)**0.5
>>> state = df.state_get()
>>> state
{'active_rang... | packages/vaex-core/vaex/dataframe.py | def state_set(self, state, use_active_range=False):
"""Sets the internal state of the df
Example:
>>> import vaex
>>> df = vaex.from_scalars(x=1, y=2)
>>> df
# x y r
0 1 2 2.23607
>>> df['r'] = (df.x**2 + df.y**2)**0.5
>>>... | def state_set(self, state, use_active_range=False):
"""Sets the internal state of the df
Example:
>>> import vaex
>>> df = vaex.from_scalars(x=1, y=2)
>>> df
# x y r
0 1 2 2.23607
>>> df['r'] = (df.x**2 + df.y**2)**0.5
>>>... | [
"Sets",
"the",
"internal",
"state",
"of",
"the",
"df"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2135-L2201 | [
"def",
"state_set",
"(",
"self",
",",
"state",
",",
"use_active_range",
"=",
"False",
")",
":",
"self",
".",
"description",
"=",
"state",
"[",
"'description'",
"]",
"if",
"use_active_range",
":",
"self",
".",
"_index_start",
",",
"self",
".",
"_index_end",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.state_load | Load a state previously stored by :meth:`DataFrame.state_store`, see also :meth:`DataFrame.state_set`. | packages/vaex-core/vaex/dataframe.py | def state_load(self, f, use_active_range=False):
"""Load a state previously stored by :meth:`DataFrame.state_store`, see also :meth:`DataFrame.state_set`."""
state = vaex.utils.read_json_or_yaml(f)
self.state_set(state, use_active_range=use_active_range) | def state_load(self, f, use_active_range=False):
"""Load a state previously stored by :meth:`DataFrame.state_store`, see also :meth:`DataFrame.state_set`."""
state = vaex.utils.read_json_or_yaml(f)
self.state_set(state, use_active_range=use_active_range) | [
"Load",
"a",
"state",
"previously",
"stored",
"by",
":",
"meth",
":",
"DataFrame",
".",
"state_store",
"see",
"also",
":",
"meth",
":",
"DataFrame",
".",
"state_set",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2271-L2274 | [
"def",
"state_load",
"(",
"self",
",",
"f",
",",
"use_active_range",
"=",
"False",
")",
":",
"state",
"=",
"vaex",
".",
"utils",
".",
"read_json_or_yaml",
"(",
"f",
")",
"self",
".",
"state_set",
"(",
"state",
",",
"use_active_range",
"=",
"use_active_rang... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.remove_virtual_meta | Removes the file with the virtual column etc, it does not change the current virtual columns etc. | packages/vaex-core/vaex/dataframe.py | def remove_virtual_meta(self):
"""Removes the file with the virtual column etc, it does not change the current virtual columns etc."""
dir = self.get_private_dir(create=True)
path = os.path.join(dir, "virtual_meta.yaml")
try:
if os.path.exists(path):
os.remove... | def remove_virtual_meta(self):
"""Removes the file with the virtual column etc, it does not change the current virtual columns etc."""
dir = self.get_private_dir(create=True)
path = os.path.join(dir, "virtual_meta.yaml")
try:
if os.path.exists(path):
os.remove... | [
"Removes",
"the",
"file",
"with",
"the",
"virtual",
"column",
"etc",
"it",
"does",
"not",
"change",
"the",
"current",
"virtual",
"columns",
"etc",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2276-L2286 | [
"def",
"remove_virtual_meta",
"(",
"self",
")",
":",
"dir",
"=",
"self",
".",
"get_private_dir",
"(",
"create",
"=",
"True",
")",
"path",
"=",
"os",
".",
"path",
".",
"join",
"(",
"dir",
",",
"\"virtual_meta.yaml\"",
")",
"try",
":",
"if",
"os",
".",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.write_virtual_meta | Writes virtual columns, variables and their ucd,description and units.
The default implementation is to write this to a file called virtual_meta.yaml in the directory defined by
:func:`DataFrame.get_private_dir`. Other implementation may store this in the DataFrame file itself.
This method is ... | packages/vaex-core/vaex/dataframe.py | def write_virtual_meta(self):
"""Writes virtual columns, variables and their ucd,description and units.
The default implementation is to write this to a file called virtual_meta.yaml in the directory defined by
:func:`DataFrame.get_private_dir`. Other implementation may store this in the DataFr... | def write_virtual_meta(self):
"""Writes virtual columns, variables and their ucd,description and units.
The default implementation is to write this to a file called virtual_meta.yaml in the directory defined by
:func:`DataFrame.get_private_dir`. Other implementation may store this in the DataFr... | [
"Writes",
"virtual",
"columns",
"variables",
"and",
"their",
"ucd",
"description",
"and",
"units",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2292-L2312 | [
"def",
"write_virtual_meta",
"(",
"self",
")",
":",
"path",
"=",
"os",
".",
"path",
".",
"join",
"(",
"self",
".",
"get_private_dir",
"(",
"create",
"=",
"True",
")",
",",
"\"virtual_meta.yaml\"",
")",
"virtual_names",
"=",
"list",
"(",
"self",
".",
"vir... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.update_virtual_meta | Will read back the virtual column etc, written by :func:`DataFrame.write_virtual_meta`. This will be done when opening a DataFrame. | packages/vaex-core/vaex/dataframe.py | def update_virtual_meta(self):
"""Will read back the virtual column etc, written by :func:`DataFrame.write_virtual_meta`. This will be done when opening a DataFrame."""
import astropy.units
try:
path = os.path.join(self.get_private_dir(create=False), "virtual_meta.yaml")
... | def update_virtual_meta(self):
"""Will read back the virtual column etc, written by :func:`DataFrame.write_virtual_meta`. This will be done when opening a DataFrame."""
import astropy.units
try:
path = os.path.join(self.get_private_dir(create=False), "virtual_meta.yaml")
... | [
"Will",
"read",
"back",
"the",
"virtual",
"column",
"etc",
"written",
"by",
":",
"func",
":",
"DataFrame",
".",
"write_virtual_meta",
".",
"This",
"will",
"be",
"done",
"when",
"opening",
"a",
"DataFrame",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2315-L2331 | [
"def",
"update_virtual_meta",
"(",
"self",
")",
":",
"import",
"astropy",
".",
"units",
"try",
":",
"path",
"=",
"os",
".",
"path",
".",
"join",
"(",
"self",
".",
"get_private_dir",
"(",
"create",
"=",
"False",
")",
",",
"\"virtual_meta.yaml\"",
")",
"if... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.write_meta | Writes all meta data, ucd,description and units
The default implementation is to write this to a file called meta.yaml in the directory defined by
:func:`DataFrame.get_private_dir`. Other implementation may store this in the DataFrame file itself.
(For instance the vaex hdf5 implementation does... | packages/vaex-core/vaex/dataframe.py | def write_meta(self):
"""Writes all meta data, ucd,description and units
The default implementation is to write this to a file called meta.yaml in the directory defined by
:func:`DataFrame.get_private_dir`. Other implementation may store this in the DataFrame file itself.
(For instance ... | def write_meta(self):
"""Writes all meta data, ucd,description and units
The default implementation is to write this to a file called meta.yaml in the directory defined by
:func:`DataFrame.get_private_dir`. Other implementation may store this in the DataFrame file itself.
(For instance ... | [
"Writes",
"all",
"meta",
"data",
"ucd",
"description",
"and",
"units"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2334-L2353 | [
"def",
"write_meta",
"(",
"self",
")",
":",
"# raise NotImplementedError",
"path",
"=",
"os",
".",
"path",
".",
"join",
"(",
"self",
".",
"get_private_dir",
"(",
"create",
"=",
"True",
")",
",",
"\"meta.yaml\"",
")",
"units",
"=",
"{",
"key",
":",
"str",... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.subspaces | Generate a Subspaces object, based on a custom list of expressions or all possible combinations based on
dimension
:param expressions_list: list of list of expressions, where the inner list defines the subspace
:param dimensions: if given, generates a subspace with all possible combinations for... | packages/vaex-core/vaex/dataframe.py | def subspaces(self, expressions_list=None, dimensions=None, exclude=None, **kwargs):
"""Generate a Subspaces object, based on a custom list of expressions or all possible combinations based on
dimension
:param expressions_list: list of list of expressions, where the inner list defines the subsp... | def subspaces(self, expressions_list=None, dimensions=None, exclude=None, **kwargs):
"""Generate a Subspaces object, based on a custom list of expressions or all possible combinations based on
dimension
:param expressions_list: list of list of expressions, where the inner list defines the subsp... | [
"Generate",
"a",
"Subspaces",
"object",
"based",
"on",
"a",
"custom",
"list",
"of",
"expressions",
"or",
"all",
"possible",
"combinations",
"based",
"on",
"dimension"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2412-L2448 | [
"def",
"subspaces",
"(",
"self",
",",
"expressions_list",
"=",
"None",
",",
"dimensions",
"=",
"None",
",",
"exclude",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"dimensions",
"is",
"not",
"None",
":",
"expressions_list",
"=",
"list",
"(",
"... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.set_variable | Set the variable to an expression or value defined by expression_or_value.
Example
>>> df.set_variable("a", 2.)
>>> df.set_variable("b", "a**2")
>>> df.get_variable("b")
'a**2'
>>> df.evaluate_variable("b")
4.0
:param name: Name of the variable
... | packages/vaex-core/vaex/dataframe.py | def set_variable(self, name, expression_or_value, write=True):
"""Set the variable to an expression or value defined by expression_or_value.
Example
>>> df.set_variable("a", 2.)
>>> df.set_variable("b", "a**2")
>>> df.get_variable("b")
'a**2'
>>> df.evaluate_var... | def set_variable(self, name, expression_or_value, write=True):
"""Set the variable to an expression or value defined by expression_or_value.
Example
>>> df.set_variable("a", 2.)
>>> df.set_variable("b", "a**2")
>>> df.get_variable("b")
'a**2'
>>> df.evaluate_var... | [
"Set",
"the",
"variable",
"to",
"an",
"expression",
"or",
"value",
"defined",
"by",
"expression_or_value",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2492-L2508 | [
"def",
"set_variable",
"(",
"self",
",",
"name",
",",
"expression_or_value",
",",
"write",
"=",
"True",
")",
":",
"self",
".",
"variables",
"[",
"name",
"]",
"=",
"expression_or_value"
] | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.evaluate_variable | Evaluates the variable given by name. | packages/vaex-core/vaex/dataframe.py | def evaluate_variable(self, name):
"""Evaluates the variable given by name."""
if isinstance(self.variables[name], six.string_types):
# TODO: this does not allow more than one level deep variable, like a depends on b, b on c, c is a const
value = eval(self.variables[name], expres... | def evaluate_variable(self, name):
"""Evaluates the variable given by name."""
if isinstance(self.variables[name], six.string_types):
# TODO: this does not allow more than one level deep variable, like a depends on b, b on c, c is a const
value = eval(self.variables[name], expres... | [
"Evaluates",
"the",
"variable",
"given",
"by",
"name",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2520-L2527 | [
"def",
"evaluate_variable",
"(",
"self",
",",
"name",
")",
":",
"if",
"isinstance",
"(",
"self",
".",
"variables",
"[",
"name",
"]",
",",
"six",
".",
"string_types",
")",
":",
"# TODO: this does not allow more than one level deep variable, like a depends on b, b on c, c... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame._evaluate_selection_mask | Internal use, ignores the filter | packages/vaex-core/vaex/dataframe.py | def _evaluate_selection_mask(self, name="default", i1=None, i2=None, selection=None, cache=False):
"""Internal use, ignores the filter"""
i1 = i1 or 0
i2 = i2 or len(self)
scope = scopes._BlockScopeSelection(self, i1, i2, selection, cache=cache)
return scope.evaluate(name) | def _evaluate_selection_mask(self, name="default", i1=None, i2=None, selection=None, cache=False):
"""Internal use, ignores the filter"""
i1 = i1 or 0
i2 = i2 or len(self)
scope = scopes._BlockScopeSelection(self, i1, i2, selection, cache=cache)
return scope.evaluate(name) | [
"Internal",
"use",
"ignores",
"the",
"filter"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2529-L2534 | [
"def",
"_evaluate_selection_mask",
"(",
"self",
",",
"name",
"=",
"\"default\"",
",",
"i1",
"=",
"None",
",",
"i2",
"=",
"None",
",",
"selection",
"=",
"None",
",",
"cache",
"=",
"False",
")",
":",
"i1",
"=",
"i1",
"or",
"0",
"i2",
"=",
"i2",
"or",... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.to_items | Return a list of [(column_name, ndarray), ...)] pairs where the ndarray corresponds to the evaluated data
:param column_names: list of column names, to export, when None DataFrame.get_column_names(strings=strings, virtual=virtual) is used
:param selection: {selection}
:param strings: argument p... | packages/vaex-core/vaex/dataframe.py | def to_items(self, column_names=None, selection=None, strings=True, virtual=False):
"""Return a list of [(column_name, ndarray), ...)] pairs where the ndarray corresponds to the evaluated data
:param column_names: list of column names, to export, when None DataFrame.get_column_names(strings=strings, vi... | def to_items(self, column_names=None, selection=None, strings=True, virtual=False):
"""Return a list of [(column_name, ndarray), ...)] pairs where the ndarray corresponds to the evaluated data
:param column_names: list of column names, to export, when None DataFrame.get_column_names(strings=strings, vi... | [
"Return",
"a",
"list",
"of",
"[",
"(",
"column_name",
"ndarray",
")",
"...",
")",
"]",
"pairs",
"where",
"the",
"ndarray",
"corresponds",
"to",
"the",
"evaluated",
"data"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2573-L2585 | [
"def",
"to_items",
"(",
"self",
",",
"column_names",
"=",
"None",
",",
"selection",
"=",
"None",
",",
"strings",
"=",
"True",
",",
"virtual",
"=",
"False",
")",
":",
"items",
"=",
"[",
"]",
"for",
"name",
"in",
"column_names",
"or",
"self",
".",
"get... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.to_dict | Return a dict containing the ndarray corresponding to the evaluated data
:param column_names: list of column names, to export, when None DataFrame.get_column_names(strings=strings, virtual=virtual) is used
:param selection: {selection}
:param strings: argument passed to DataFrame.get_column_nam... | packages/vaex-core/vaex/dataframe.py | def to_dict(self, column_names=None, selection=None, strings=True, virtual=False):
"""Return a dict containing the ndarray corresponding to the evaluated data
:param column_names: list of column names, to export, when None DataFrame.get_column_names(strings=strings, virtual=virtual) is used
:pa... | def to_dict(self, column_names=None, selection=None, strings=True, virtual=False):
"""Return a dict containing the ndarray corresponding to the evaluated data
:param column_names: list of column names, to export, when None DataFrame.get_column_names(strings=strings, virtual=virtual) is used
:pa... | [
"Return",
"a",
"dict",
"containing",
"the",
"ndarray",
"corresponding",
"to",
"the",
"evaluated",
"data"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2588-L2597 | [
"def",
"to_dict",
"(",
"self",
",",
"column_names",
"=",
"None",
",",
"selection",
"=",
"None",
",",
"strings",
"=",
"True",
",",
"virtual",
"=",
"False",
")",
":",
"return",
"dict",
"(",
"self",
".",
"to_items",
"(",
"column_names",
"=",
"column_names",... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.to_copy | Return a copy of the DataFrame, if selection is None, it does not copy the data, it just has a reference
:param column_names: list of column names, to copy, when None DataFrame.get_column_names(strings=strings, virtual=virtual) is used
:param selection: {selection}
:param strings: argument pass... | packages/vaex-core/vaex/dataframe.py | def to_copy(self, column_names=None, selection=None, strings=True, virtual=False, selections=True):
"""Return a copy of the DataFrame, if selection is None, it does not copy the data, it just has a reference
:param column_names: list of column names, to copy, when None DataFrame.get_column_names(string... | def to_copy(self, column_names=None, selection=None, strings=True, virtual=False, selections=True):
"""Return a copy of the DataFrame, if selection is None, it does not copy the data, it just has a reference
:param column_names: list of column names, to copy, when None DataFrame.get_column_names(string... | [
"Return",
"a",
"copy",
"of",
"the",
"DataFrame",
"if",
"selection",
"is",
"None",
"it",
"does",
"not",
"copy",
"the",
"data",
"it",
"just",
"has",
"a",
"reference"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2600-L2626 | [
"def",
"to_copy",
"(",
"self",
",",
"column_names",
"=",
"None",
",",
"selection",
"=",
"None",
",",
"strings",
"=",
"True",
",",
"virtual",
"=",
"False",
",",
"selections",
"=",
"True",
")",
":",
"if",
"column_names",
":",
"column_names",
"=",
"_ensure_... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.to_pandas_df | Return a pandas DataFrame containing the ndarray corresponding to the evaluated data
If index is given, that column is used for the index of the dataframe.
Example
>>> df_pandas = df.to_pandas_df(["x", "y", "z"])
>>> df_copy = vaex.from_pandas(df_pandas)
:param column_nam... | packages/vaex-core/vaex/dataframe.py | def to_pandas_df(self, column_names=None, selection=None, strings=True, virtual=False, index_name=None):
"""Return a pandas DataFrame containing the ndarray corresponding to the evaluated data
If index is given, that column is used for the index of the dataframe.
Example
>>> df_pan... | def to_pandas_df(self, column_names=None, selection=None, strings=True, virtual=False, index_name=None):
"""Return a pandas DataFrame containing the ndarray corresponding to the evaluated data
If index is given, that column is used for the index of the dataframe.
Example
>>> df_pan... | [
"Return",
"a",
"pandas",
"DataFrame",
"containing",
"the",
"ndarray",
"corresponding",
"to",
"the",
"evaluated",
"data"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2639-L2668 | [
"def",
"to_pandas_df",
"(",
"self",
",",
"column_names",
"=",
"None",
",",
"selection",
"=",
"None",
",",
"strings",
"=",
"True",
",",
"virtual",
"=",
"False",
",",
"index_name",
"=",
"None",
")",
":",
"import",
"pandas",
"as",
"pd",
"data",
"=",
"self... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.to_arrow_table | Returns an arrow Table object containing the arrays corresponding to the evaluated data
:param column_names: list of column names, to export, when None DataFrame.get_column_names(strings=strings, virtual=virtual) is used
:param selection: {selection}
:param strings: argument passed to DataFrame... | packages/vaex-core/vaex/dataframe.py | def to_arrow_table(self, column_names=None, selection=None, strings=True, virtual=False):
"""Returns an arrow Table object containing the arrays corresponding to the evaluated data
:param column_names: list of column names, to export, when None DataFrame.get_column_names(strings=strings, virtual=virtua... | def to_arrow_table(self, column_names=None, selection=None, strings=True, virtual=False):
"""Returns an arrow Table object containing the arrays corresponding to the evaluated data
:param column_names: list of column names, to export, when None DataFrame.get_column_names(strings=strings, virtual=virtua... | [
"Returns",
"an",
"arrow",
"Table",
"object",
"containing",
"the",
"arrays",
"corresponding",
"to",
"the",
"evaluated",
"data"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2671-L2681 | [
"def",
"to_arrow_table",
"(",
"self",
",",
"column_names",
"=",
"None",
",",
"selection",
"=",
"None",
",",
"strings",
"=",
"True",
",",
"virtual",
"=",
"False",
")",
":",
"from",
"vaex_arrow",
".",
"convert",
"import",
"arrow_table_from_vaex_df",
"return",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.to_astropy_table | Returns a astropy table object containing the ndarrays corresponding to the evaluated data
:param column_names: list of column names, to export, when None DataFrame.get_column_names(strings=strings, virtual=virtual) is used
:param selection: {selection}
:param strings: argument passed to DataFr... | packages/vaex-core/vaex/dataframe.py | def to_astropy_table(self, column_names=None, selection=None, strings=True, virtual=False, index=None):
"""Returns a astropy table object containing the ndarrays corresponding to the evaluated data
:param column_names: list of column names, to export, when None DataFrame.get_column_names(strings=string... | def to_astropy_table(self, column_names=None, selection=None, strings=True, virtual=False, index=None):
"""Returns a astropy table object containing the ndarrays corresponding to the evaluated data
:param column_names: list of column names, to export, when None DataFrame.get_column_names(strings=string... | [
"Returns",
"a",
"astropy",
"table",
"object",
"containing",
"the",
"ndarrays",
"corresponding",
"to",
"the",
"evaluated",
"data"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2684-L2711 | [
"def",
"to_astropy_table",
"(",
"self",
",",
"column_names",
"=",
"None",
",",
"selection",
"=",
"None",
",",
"strings",
"=",
"True",
",",
"virtual",
"=",
"False",
",",
"index",
"=",
"None",
")",
":",
"from",
"astropy",
".",
"table",
"import",
"Table",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.validate_expression | Validate an expression (may throw Exceptions) | packages/vaex-core/vaex/dataframe.py | def validate_expression(self, expression):
"""Validate an expression (may throw Exceptions)"""
# return self.evaluate(expression, 0, 2)
vars = set(self.get_column_names()) | set(self.variables.keys())
funcs = set(expression_namespace.keys())
return vaex.expresso.validate_expressi... | def validate_expression(self, expression):
"""Validate an expression (may throw Exceptions)"""
# return self.evaluate(expression, 0, 2)
vars = set(self.get_column_names()) | set(self.variables.keys())
funcs = set(expression_namespace.keys())
return vaex.expresso.validate_expressi... | [
"Validate",
"an",
"expression",
"(",
"may",
"throw",
"Exceptions",
")"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2713-L2718 | [
"def",
"validate_expression",
"(",
"self",
",",
"expression",
")",
":",
"# return self.evaluate(expression, 0, 2)",
"vars",
"=",
"set",
"(",
"self",
".",
"get_column_names",
"(",
")",
")",
"|",
"set",
"(",
"self",
".",
"variables",
".",
"keys",
"(",
")",
")"... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.add_column | Add an in memory array as a column. | packages/vaex-core/vaex/dataframe.py | def add_column(self, name, f_or_array):
"""Add an in memory array as a column."""
if isinstance(f_or_array, (np.ndarray, Column)):
data = ar = f_or_array
# it can be None when we have an 'empty' DataFrameArrays
if self._length_original is None:
self._l... | def add_column(self, name, f_or_array):
"""Add an in memory array as a column."""
if isinstance(f_or_array, (np.ndarray, Column)):
data = ar = f_or_array
# it can be None when we have an 'empty' DataFrameArrays
if self._length_original is None:
self._l... | [
"Add",
"an",
"in",
"memory",
"array",
"as",
"a",
"column",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2737-L2758 | [
"def",
"add_column",
"(",
"self",
",",
"name",
",",
"f_or_array",
")",
":",
"if",
"isinstance",
"(",
"f_or_array",
",",
"(",
"np",
".",
"ndarray",
",",
"Column",
")",
")",
":",
"data",
"=",
"ar",
"=",
"f_or_array",
"# it can be None when we have an 'empty' D... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.rename_column | Renames a column, not this is only the in memory name, this will not be reflected on disk | packages/vaex-core/vaex/dataframe.py | def rename_column(self, name, new_name, unique=False, store_in_state=True):
"""Renames a column, not this is only the in memory name, this will not be reflected on disk"""
new_name = vaex.utils.find_valid_name(new_name, used=[] if not unique else list(self))
data = self.columns.get(name)
... | def rename_column(self, name, new_name, unique=False, store_in_state=True):
"""Renames a column, not this is only the in memory name, this will not be reflected on disk"""
new_name = vaex.utils.find_valid_name(new_name, used=[] if not unique else list(self))
data = self.columns.get(name)
... | [
"Renames",
"a",
"column",
"not",
"this",
"is",
"only",
"the",
"in",
"memory",
"name",
"this",
"will",
"not",
"be",
"reflected",
"on",
"disk"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2787-L2805 | [
"def",
"rename_column",
"(",
"self",
",",
"name",
",",
"new_name",
",",
"unique",
"=",
"False",
",",
"store_in_state",
"=",
"True",
")",
":",
"new_name",
"=",
"vaex",
".",
"utils",
".",
"find_valid_name",
"(",
"new_name",
",",
"used",
"=",
"[",
"]",
"i... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.add_column_healpix | Add a healpix (in memory) column based on a longitude and latitude
:param name: Name of column
:param longitude: longitude expression
:param latitude: latitude expression (astronomical convenction latitude=90 is north pole)
:param degrees: If lon/lat are in degrees (default) or radians... | packages/vaex-core/vaex/dataframe.py | def add_column_healpix(self, name="healpix", longitude="ra", latitude="dec", degrees=True, healpix_order=12, nest=True):
"""Add a healpix (in memory) column based on a longitude and latitude
:param name: Name of column
:param longitude: longitude expression
:param latitude: latitude exp... | def add_column_healpix(self, name="healpix", longitude="ra", latitude="dec", degrees=True, healpix_order=12, nest=True):
"""Add a healpix (in memory) column based on a longitude and latitude
:param name: Name of column
:param longitude: longitude expression
:param latitude: latitude exp... | [
"Add",
"a",
"healpix",
"(",
"in",
"memory",
")",
"column",
"based",
"on",
"a",
"longitude",
"and",
"latitude"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2808-L2827 | [
"def",
"add_column_healpix",
"(",
"self",
",",
"name",
"=",
"\"healpix\"",
",",
"longitude",
"=",
"\"ra\"",
",",
"latitude",
"=",
"\"dec\"",
",",
"degrees",
"=",
"True",
",",
"healpix_order",
"=",
"12",
",",
"nest",
"=",
"True",
")",
":",
"import",
"heal... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.propagate_uncertainties | Propagates uncertainties (full covariance matrix) for a set of virtual columns.
Covariance matrix of the depending variables is guessed by finding columns prefixed by "e"
or `"e_"` or postfixed by "_error", "_uncertainty", "e" and `"_e"`.
Off diagonals (covariance or correlation) by postfixes w... | packages/vaex-core/vaex/dataframe.py | def propagate_uncertainties(self, columns, depending_variables=None, cov_matrix='auto',
covariance_format="{}_{}_covariance",
uncertainty_format="{}_uncertainty"):
"""Propagates uncertainties (full covariance matrix) for a set of virtual columns.
... | def propagate_uncertainties(self, columns, depending_variables=None, cov_matrix='auto',
covariance_format="{}_{}_covariance",
uncertainty_format="{}_uncertainty"):
"""Propagates uncertainties (full covariance matrix) for a set of virtual columns.
... | [
"Propagates",
"uncertainties",
"(",
"full",
"covariance",
"matrix",
")",
"for",
"a",
"set",
"of",
"virtual",
"columns",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2929-L2989 | [
"def",
"propagate_uncertainties",
"(",
"self",
",",
"columns",
",",
"depending_variables",
"=",
"None",
",",
"cov_matrix",
"=",
"'auto'",
",",
"covariance_format",
"=",
"\"{}_{}_covariance\"",
",",
"uncertainty_format",
"=",
"\"{}_uncertainty\"",
")",
":",
"names",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.add_virtual_columns_cartesian_to_polar | Convert cartesian to polar coordinates
:param x: expression for x
:param y: expression for y
:param radius_out: name for the virtual column for the radius
:param azimuth_out: name for the virtual column for the azimuth angle
:param propagate_uncertainties: {propagate_uncertainti... | packages/vaex-core/vaex/dataframe.py | def add_virtual_columns_cartesian_to_polar(self, x="x", y="y", radius_out="r_polar", azimuth_out="phi_polar",
propagate_uncertainties=False,
radians=False):
"""Convert cartesian to polar coordinates
:param x: ... | def add_virtual_columns_cartesian_to_polar(self, x="x", y="y", radius_out="r_polar", azimuth_out="phi_polar",
propagate_uncertainties=False,
radians=False):
"""Convert cartesian to polar coordinates
:param x: ... | [
"Convert",
"cartesian",
"to",
"polar",
"coordinates"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L2992-L3018 | [
"def",
"add_virtual_columns_cartesian_to_polar",
"(",
"self",
",",
"x",
"=",
"\"x\"",
",",
"y",
"=",
"\"y\"",
",",
"radius_out",
"=",
"\"r_polar\"",
",",
"azimuth_out",
"=",
"\"phi_polar\"",
",",
"propagate_uncertainties",
"=",
"False",
",",
"radians",
"=",
"Fal... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.add_virtual_columns_cartesian_velocities_to_spherical | Concert velocities from a cartesian to a spherical coordinate system
TODO: errors
:param x: name of x column (input)
:param y: y
:param z: z
:param vx: vx
:param vy: vy
:param vz: vz
:param vr: name of the column for the... | packages/vaex-core/vaex/dataframe.py | def add_virtual_columns_cartesian_velocities_to_spherical(self, x="x", y="y", z="z", vx="vx", vy="vy", vz="vz", vr="vr", vlong="vlong", vlat="vlat", distance=None):
"""Concert velocities from a cartesian to a spherical coordinate system
TODO: errors
:param x: name of x column (input)
:... | def add_virtual_columns_cartesian_velocities_to_spherical(self, x="x", y="y", z="z", vx="vx", vy="vy", vz="vz", vr="vr", vlong="vlong", vlat="vlat", distance=None):
"""Concert velocities from a cartesian to a spherical coordinate system
TODO: errors
:param x: name of x column (input)
:... | [
"Concert",
"velocities",
"from",
"a",
"cartesian",
"to",
"a",
"spherical",
"coordinate",
"system"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3021-L3043 | [
"def",
"add_virtual_columns_cartesian_velocities_to_spherical",
"(",
"self",
",",
"x",
"=",
"\"x\"",
",",
"y",
"=",
"\"y\"",
",",
"z",
"=",
"\"z\"",
",",
"vx",
"=",
"\"vx\"",
",",
"vy",
"=",
"\"vy\"",
",",
"vz",
"=",
"\"vz\"",
",",
"vr",
"=",
"\"vr\"",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.add_virtual_columns_cartesian_velocities_to_polar | Convert cartesian to polar velocities.
:param x:
:param y:
:param vx:
:param radius_polar: Optional expression for the radius, may lead to a better performance when given.
:param vy:
:param vr_out:
:param vazimuth_out:
:param propagate_uncertainties: {pro... | packages/vaex-core/vaex/dataframe.py | def add_virtual_columns_cartesian_velocities_to_polar(self, x="x", y="y", vx="vx", radius_polar=None, vy="vy", vr_out="vr_polar", vazimuth_out="vphi_polar",
propagate_uncertainties=False,):
"""Convert cartesian to polar velocities.
:param x:
... | def add_virtual_columns_cartesian_velocities_to_polar(self, x="x", y="y", vx="vx", radius_polar=None, vy="vy", vr_out="vr_polar", vazimuth_out="vphi_polar",
propagate_uncertainties=False,):
"""Convert cartesian to polar velocities.
:param x:
... | [
"Convert",
"cartesian",
"to",
"polar",
"velocities",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3050-L3074 | [
"def",
"add_virtual_columns_cartesian_velocities_to_polar",
"(",
"self",
",",
"x",
"=",
"\"x\"",
",",
"y",
"=",
"\"y\"",
",",
"vx",
"=",
"\"vx\"",
",",
"radius_polar",
"=",
"None",
",",
"vy",
"=",
"\"vy\"",
",",
"vr_out",
"=",
"\"vr_polar\"",
",",
"vazimuth_... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.add_virtual_columns_polar_velocities_to_cartesian | Convert cylindrical polar velocities to Cartesian.
:param x:
:param y:
:param azimuth: Optional expression for the azimuth in degrees , may lead to a better performance when given.
:param vr:
:param vazimuth:
:param vx_out:
:param vy_out:
:param propagate... | packages/vaex-core/vaex/dataframe.py | def add_virtual_columns_polar_velocities_to_cartesian(self, x='x', y='y', azimuth=None, vr='vr_polar', vazimuth='vphi_polar', vx_out='vx', vy_out='vy', propagate_uncertainties=False):
""" Convert cylindrical polar velocities to Cartesian.
:param x:
:param y:
:param azimuth: Optional exp... | def add_virtual_columns_polar_velocities_to_cartesian(self, x='x', y='y', azimuth=None, vr='vr_polar', vazimuth='vphi_polar', vx_out='vx', vy_out='vy', propagate_uncertainties=False):
""" Convert cylindrical polar velocities to Cartesian.
:param x:
:param y:
:param azimuth: Optional exp... | [
"Convert",
"cylindrical",
"polar",
"velocities",
"to",
"Cartesian",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3077-L3102 | [
"def",
"add_virtual_columns_polar_velocities_to_cartesian",
"(",
"self",
",",
"x",
"=",
"'x'",
",",
"y",
"=",
"'y'",
",",
"azimuth",
"=",
"None",
",",
"vr",
"=",
"'vr_polar'",
",",
"vazimuth",
"=",
"'vphi_polar'",
",",
"vx_out",
"=",
"'vx'",
",",
"vy_out",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.add_virtual_columns_rotation | Rotation in 2d.
:param str x: Name/expression of x column
:param str y: idem for y
:param str xnew: name of transformed x column
:param str ynew:
:param float angle_degrees: rotation in degrees, anti clockwise
:return: | packages/vaex-core/vaex/dataframe.py | def add_virtual_columns_rotation(self, x, y, xnew, ynew, angle_degrees, propagate_uncertainties=False):
"""Rotation in 2d.
:param str x: Name/expression of x column
:param str y: idem for y
:param str xnew: name of transformed x column
:param str ynew:
:param float angle... | def add_virtual_columns_rotation(self, x, y, xnew, ynew, angle_degrees, propagate_uncertainties=False):
"""Rotation in 2d.
:param str x: Name/expression of x column
:param str y: idem for y
:param str xnew: name of transformed x column
:param str ynew:
:param float angle... | [
"Rotation",
"in",
"2d",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3105-L3126 | [
"def",
"add_virtual_columns_rotation",
"(",
"self",
",",
"x",
",",
"y",
",",
"xnew",
",",
"ynew",
",",
"angle_degrees",
",",
"propagate_uncertainties",
"=",
"False",
")",
":",
"x",
"=",
"_ensure_string_from_expression",
"(",
"x",
")",
"y",
"=",
"_ensure_string... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.add_virtual_columns_spherical_to_cartesian | Convert spherical to cartesian coordinates.
:param alpha:
:param delta: polar angle, ranging from the -90 (south pole) to 90 (north pole)
:param distance: radial distance, determines the units of x, y and z
:param xname:
:param yname:
:param zname:
:param propa... | packages/vaex-core/vaex/dataframe.py | def add_virtual_columns_spherical_to_cartesian(self, alpha, delta, distance, xname="x", yname="y", zname="z",
propagate_uncertainties=False,
center=[0, 0, 0], center_name="solar_position", radians=False):
"""Co... | def add_virtual_columns_spherical_to_cartesian(self, alpha, delta, distance, xname="x", yname="y", zname="z",
propagate_uncertainties=False,
center=[0, 0, 0], center_name="solar_position", radians=False):
"""Co... | [
"Convert",
"spherical",
"to",
"cartesian",
"coordinates",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3130-L3170 | [
"def",
"add_virtual_columns_spherical_to_cartesian",
"(",
"self",
",",
"alpha",
",",
"delta",
",",
"distance",
",",
"xname",
"=",
"\"x\"",
",",
"yname",
"=",
"\"y\"",
",",
"zname",
"=",
"\"z\"",
",",
"propagate_uncertainties",
"=",
"False",
",",
"center",
"=",... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.add_virtual_columns_cartesian_to_spherical | Convert cartesian to spherical coordinates.
:param x:
:param y:
:param z:
:param alpha:
:param delta: name for polar angle, ranges from -90 to 90 (or -pi to pi when radians is True).
:param distance:
:param radians:
:param center:
:param center_... | packages/vaex-core/vaex/dataframe.py | def add_virtual_columns_cartesian_to_spherical(self, x="x", y="y", z="z", alpha="l", delta="b", distance="distance", radians=False, center=None, center_name="solar_position"):
"""Convert cartesian to spherical coordinates.
:param x:
:param y:
:param z:
:param alpha:
:p... | def add_virtual_columns_cartesian_to_spherical(self, x="x", y="y", z="z", alpha="l", delta="b", distance="distance", radians=False, center=None, center_name="solar_position"):
"""Convert cartesian to spherical coordinates.
:param x:
:param y:
:param z:
:param alpha:
:p... | [
"Convert",
"cartesian",
"to",
"spherical",
"coordinates",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3173-L3202 | [
"def",
"add_virtual_columns_cartesian_to_spherical",
"(",
"self",
",",
"x",
"=",
"\"x\"",
",",
"y",
"=",
"\"y\"",
",",
"z",
"=",
"\"z\"",
",",
"alpha",
"=",
"\"l\"",
",",
"delta",
"=",
"\"b\"",
",",
"distance",
"=",
"\"distance\"",
",",
"radians",
"=",
"... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.add_virtual_columns_aitoff | Add aitoff (https://en.wikipedia.org/wiki/Aitoff_projection) projection
:param alpha: azimuth angle
:param delta: polar angle
:param x: output name for x coordinate
:param y: output name for y coordinate
:param radians: input and output in radians (True), or degrees (False)
... | packages/vaex-core/vaex/dataframe.py | def add_virtual_columns_aitoff(self, alpha, delta, x, y, radians=True):
"""Add aitoff (https://en.wikipedia.org/wiki/Aitoff_projection) projection
:param alpha: azimuth angle
:param delta: polar angle
:param x: output name for x coordinate
:param y: output name for y coordinate
... | def add_virtual_columns_aitoff(self, alpha, delta, x, y, radians=True):
"""Add aitoff (https://en.wikipedia.org/wiki/Aitoff_projection) projection
:param alpha: azimuth angle
:param delta: polar angle
:param x: output name for x coordinate
:param y: output name for y coordinate
... | [
"Add",
"aitoff",
"(",
"https",
":",
"//",
"en",
".",
"wikipedia",
".",
"org",
"/",
"wiki",
"/",
"Aitoff_projection",
")",
"projection"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3207-L3224 | [
"def",
"add_virtual_columns_aitoff",
"(",
"self",
",",
"alpha",
",",
"delta",
",",
"x",
",",
"y",
",",
"radians",
"=",
"True",
")",
":",
"transform",
"=",
"\"\"",
"if",
"radians",
"else",
"\"*pi/180.\"",
"aitoff_alpha",
"=",
"\"__aitoff_alpha_%s_%s\"",
"%",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.add_virtual_column | Add a virtual column to the DataFrame.
Example:
>>> df.add_virtual_column("r", "sqrt(x**2 + y**2 + z**2)")
>>> df.select("r < 10")
:param: str name: name of virtual column
:param: expression: expression for the column
:param str unique: if name is already used, make it... | packages/vaex-core/vaex/dataframe.py | def add_virtual_column(self, name, expression, unique=False):
"""Add a virtual column to the DataFrame.
Example:
>>> df.add_virtual_column("r", "sqrt(x**2 + y**2 + z**2)")
>>> df.select("r < 10")
:param: str name: name of virtual column
:param: expression: expression f... | def add_virtual_column(self, name, expression, unique=False):
"""Add a virtual column to the DataFrame.
Example:
>>> df.add_virtual_column("r", "sqrt(x**2 + y**2 + z**2)")
>>> df.select("r < 10")
:param: str name: name of virtual column
:param: expression: expression f... | [
"Add",
"a",
"virtual",
"column",
"to",
"the",
"DataFrame",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3254-L3276 | [
"def",
"add_virtual_column",
"(",
"self",
",",
"name",
",",
"expression",
",",
"unique",
"=",
"False",
")",
":",
"type",
"=",
"\"change\"",
"if",
"name",
"in",
"self",
".",
"virtual_columns",
"else",
"\"add\"",
"expression",
"=",
"_ensure_string_from_expression"... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.delete_virtual_column | Deletes a virtual column from a DataFrame. | packages/vaex-core/vaex/dataframe.py | def delete_virtual_column(self, name):
"""Deletes a virtual column from a DataFrame."""
del self.virtual_columns[name]
self.signal_column_changed.emit(self, name, "delete") | def delete_virtual_column(self, name):
"""Deletes a virtual column from a DataFrame."""
del self.virtual_columns[name]
self.signal_column_changed.emit(self, name, "delete") | [
"Deletes",
"a",
"virtual",
"column",
"from",
"a",
"DataFrame",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3294-L3297 | [
"def",
"delete_virtual_column",
"(",
"self",
",",
"name",
")",
":",
"del",
"self",
".",
"virtual_columns",
"[",
"name",
"]",
"self",
".",
"signal_column_changed",
".",
"emit",
"(",
"self",
",",
"name",
",",
"\"delete\"",
")"
] | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.add_variable | Add a variable to to a DataFrame.
A variable may refer to other variables, and virtual columns and expression may refer to variables.
Example
>>> df.add_variable('center', 0)
>>> df.add_virtual_column('x_prime', 'x-center')
>>> df.select('x_prime < 0')
:param: str nam... | packages/vaex-core/vaex/dataframe.py | def add_variable(self, name, expression, overwrite=True, unique=True):
"""Add a variable to to a DataFrame.
A variable may refer to other variables, and virtual columns and expression may refer to variables.
Example
>>> df.add_variable('center', 0)
>>> df.add_virtual_column('x... | def add_variable(self, name, expression, overwrite=True, unique=True):
"""Add a variable to to a DataFrame.
A variable may refer to other variables, and virtual columns and expression may refer to variables.
Example
>>> df.add_variable('center', 0)
>>> df.add_virtual_column('x... | [
"Add",
"a",
"variable",
"to",
"to",
"a",
"DataFrame",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3300-L3320 | [
"def",
"add_variable",
"(",
"self",
",",
"name",
",",
"expression",
",",
"overwrite",
"=",
"True",
",",
"unique",
"=",
"True",
")",
":",
"if",
"unique",
"or",
"overwrite",
"or",
"name",
"not",
"in",
"self",
".",
"variables",
":",
"existing_names",
"=",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.delete_variable | Deletes a variable from a DataFrame. | packages/vaex-core/vaex/dataframe.py | def delete_variable(self, name):
"""Deletes a variable from a DataFrame."""
del self.variables[name]
self.signal_variable_changed.emit(self, name, "delete") | def delete_variable(self, name):
"""Deletes a variable from a DataFrame."""
del self.variables[name]
self.signal_variable_changed.emit(self, name, "delete") | [
"Deletes",
"a",
"variable",
"from",
"a",
"DataFrame",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3322-L3325 | [
"def",
"delete_variable",
"(",
"self",
",",
"name",
")",
":",
"del",
"self",
".",
"variables",
"[",
"name",
"]",
"self",
".",
"signal_variable_changed",
".",
"emit",
"(",
"self",
",",
"name",
",",
"\"delete\"",
")"
] | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.tail | Return a shallow copy a DataFrame with the last n rows. | packages/vaex-core/vaex/dataframe.py | def tail(self, n=10):
"""Return a shallow copy a DataFrame with the last n rows."""
N = len(self)
# self.cat(i1=max(0, N-n), i2=min(len(self), N))
return self[max(0, N - n):min(len(self), N)] | def tail(self, n=10):
"""Return a shallow copy a DataFrame with the last n rows."""
N = len(self)
# self.cat(i1=max(0, N-n), i2=min(len(self), N))
return self[max(0, N - n):min(len(self), N)] | [
"Return",
"a",
"shallow",
"copy",
"a",
"DataFrame",
"with",
"the",
"last",
"n",
"rows",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3397-L3401 | [
"def",
"tail",
"(",
"self",
",",
"n",
"=",
"10",
")",
":",
"N",
"=",
"len",
"(",
"self",
")",
"# self.cat(i1=max(0, N-n), i2=min(len(self), N))",
"return",
"self",
"[",
"max",
"(",
"0",
",",
"N",
"-",
"n",
")",
":",
"min",
"(",
"len",
"(",
"self",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.head_and_tail_print | Display the first and last n elements of a DataFrame. | packages/vaex-core/vaex/dataframe.py | def head_and_tail_print(self, n=5):
"""Display the first and last n elements of a DataFrame."""
from IPython import display
display.display(display.HTML(self._head_and_tail_table(n))) | def head_and_tail_print(self, n=5):
"""Display the first and last n elements of a DataFrame."""
from IPython import display
display.display(display.HTML(self._head_and_tail_table(n))) | [
"Display",
"the",
"first",
"and",
"last",
"n",
"elements",
"of",
"a",
"DataFrame",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3410-L3413 | [
"def",
"head_and_tail_print",
"(",
"self",
",",
"n",
"=",
"5",
")",
":",
"from",
"IPython",
"import",
"display",
"display",
".",
"display",
"(",
"display",
".",
"HTML",
"(",
"self",
".",
"_head_and_tail_table",
"(",
"n",
")",
")",
")"
] | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.describe | Give a description of the DataFrame.
>>> import vaex
>>> df = vaex.example()[['x', 'y', 'z']]
>>> df.describe()
x y z
dtype float64 float64 float64
count 330000 330000 330000
missing 0 ... | packages/vaex-core/vaex/dataframe.py | def describe(self, strings=True, virtual=True, selection=None):
"""Give a description of the DataFrame.
>>> import vaex
>>> df = vaex.example()[['x', 'y', 'z']]
>>> df.describe()
x y z
dtype float64 float64 float64
co... | def describe(self, strings=True, virtual=True, selection=None):
"""Give a description of the DataFrame.
>>> import vaex
>>> df = vaex.example()[['x', 'y', 'z']]
>>> df.describe()
x y z
dtype float64 float64 float64
co... | [
"Give",
"a",
"description",
"of",
"the",
"DataFrame",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3415-L3464 | [
"def",
"describe",
"(",
"self",
",",
"strings",
"=",
"True",
",",
"virtual",
"=",
"True",
",",
"selection",
"=",
"None",
")",
":",
"import",
"pandas",
"as",
"pd",
"N",
"=",
"len",
"(",
"self",
")",
"columns",
"=",
"{",
"}",
"for",
"feature",
"in",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.cat | Display the DataFrame from row i1 till i2
For format, see https://pypi.org/project/tabulate/
:param int i1: Start row
:param int i2: End row.
:param str format: Format to use, e.g. 'html', 'plain', 'latex' | packages/vaex-core/vaex/dataframe.py | def cat(self, i1, i2, format='html'):
"""Display the DataFrame from row i1 till i2
For format, see https://pypi.org/project/tabulate/
:param int i1: Start row
:param int i2: End row.
:param str format: Format to use, e.g. 'html', 'plain', 'latex'
"""
from IPytho... | def cat(self, i1, i2, format='html'):
"""Display the DataFrame from row i1 till i2
For format, see https://pypi.org/project/tabulate/
:param int i1: Start row
:param int i2: End row.
:param str format: Format to use, e.g. 'html', 'plain', 'latex'
"""
from IPytho... | [
"Display",
"the",
"DataFrame",
"from",
"row",
"i1",
"till",
"i2"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3466-L3481 | [
"def",
"cat",
"(",
"self",
",",
"i1",
",",
"i2",
",",
"format",
"=",
"'html'",
")",
":",
"from",
"IPython",
"import",
"display",
"if",
"format",
"==",
"'html'",
":",
"output",
"=",
"self",
".",
"_as_html_table",
"(",
"i1",
",",
"i2",
")",
"display",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.set_current_row | Set the current row, and emit the signal signal_pick. | packages/vaex-core/vaex/dataframe.py | def set_current_row(self, value):
"""Set the current row, and emit the signal signal_pick."""
if (value is not None) and ((value < 0) or (value >= len(self))):
raise IndexError("index %d out of range [0,%d]" % (value, len(self)))
self._current_row = value
self.signal_pick.emi... | def set_current_row(self, value):
"""Set the current row, and emit the signal signal_pick."""
if (value is not None) and ((value < 0) or (value >= len(self))):
raise IndexError("index %d out of range [0,%d]" % (value, len(self)))
self._current_row = value
self.signal_pick.emi... | [
"Set",
"the",
"current",
"row",
"and",
"emit",
"the",
"signal",
"signal_pick",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3621-L3626 | [
"def",
"set_current_row",
"(",
"self",
",",
"value",
")",
":",
"if",
"(",
"value",
"is",
"not",
"None",
")",
"and",
"(",
"(",
"value",
"<",
"0",
")",
"or",
"(",
"value",
">=",
"len",
"(",
"self",
")",
")",
")",
":",
"raise",
"IndexError",
"(",
... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.get_column_names | Return a list of column names
Example:
>>> import vaex
>>> df = vaex.from_scalars(x=1, x2=2, y=3, s='string')
>>> df['r'] = (df.x**2 + df.y**2)**2
>>> df.get_column_names()
['x', 'x2', 'y', 's', 'r']
>>> df.get_column_names(virtual=False)
['x', 'x2', 'y'... | packages/vaex-core/vaex/dataframe.py | def get_column_names(self, virtual=True, strings=True, hidden=False, regex=None):
"""Return a list of column names
Example:
>>> import vaex
>>> df = vaex.from_scalars(x=1, x2=2, y=3, s='string')
>>> df['r'] = (df.x**2 + df.y**2)**2
>>> df.get_column_names()
['x'... | def get_column_names(self, virtual=True, strings=True, hidden=False, regex=None):
"""Return a list of column names
Example:
>>> import vaex
>>> df = vaex.from_scalars(x=1, x2=2, y=3, s='string')
>>> df['r'] = (df.x**2 + df.y**2)**2
>>> df.get_column_names()
['x'... | [
"Return",
"a",
"list",
"of",
"column",
"names"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3636-L3679 | [
"def",
"get_column_names",
"(",
"self",
",",
"virtual",
"=",
"True",
",",
"strings",
"=",
"True",
",",
"hidden",
"=",
"False",
",",
"regex",
"=",
"None",
")",
":",
"def",
"column_filter",
"(",
"name",
")",
":",
"'''Return True if column with specified name sho... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.set_active_fraction | Sets the active_fraction, set picked row to None, and remove selection.
TODO: we may be able to keep the selection, if we keep the expression, and also the picked row | packages/vaex-core/vaex/dataframe.py | def set_active_fraction(self, value):
"""Sets the active_fraction, set picked row to None, and remove selection.
TODO: we may be able to keep the selection, if we keep the expression, and also the picked row
"""
if value != self._active_fraction:
self._active_fraction = valu... | def set_active_fraction(self, value):
"""Sets the active_fraction, set picked row to None, and remove selection.
TODO: we may be able to keep the selection, if we keep the expression, and also the picked row
"""
if value != self._active_fraction:
self._active_fraction = valu... | [
"Sets",
"the",
"active_fraction",
"set",
"picked",
"row",
"to",
"None",
"and",
"remove",
"selection",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3708-L3721 | [
"def",
"set_active_fraction",
"(",
"self",
",",
"value",
")",
":",
"if",
"value",
"!=",
"self",
".",
"_active_fraction",
":",
"self",
".",
"_active_fraction",
"=",
"value",
"# self._fraction_length = int(self._length * self._active_fraction)",
"self",
".",
"select",
"... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.set_active_range | Sets the active_fraction, set picked row to None, and remove selection.
TODO: we may be able to keep the selection, if we keep the expression, and also the picked row | packages/vaex-core/vaex/dataframe.py | def set_active_range(self, i1, i2):
"""Sets the active_fraction, set picked row to None, and remove selection.
TODO: we may be able to keep the selection, if we keep the expression, and also the picked row
"""
logger.debug("set active range to: %r", (i1, i2))
self._active_fracti... | def set_active_range(self, i1, i2):
"""Sets the active_fraction, set picked row to None, and remove selection.
TODO: we may be able to keep the selection, if we keep the expression, and also the picked row
"""
logger.debug("set active range to: %r", (i1, i2))
self._active_fracti... | [
"Sets",
"the",
"active_fraction",
"set",
"picked",
"row",
"to",
"None",
"and",
"remove",
"selection",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3726-L3739 | [
"def",
"set_active_range",
"(",
"self",
",",
"i1",
",",
"i2",
")",
":",
"logger",
".",
"debug",
"(",
"\"set active range to: %r\"",
",",
"(",
"i1",
",",
"i2",
")",
")",
"self",
".",
"_active_fraction",
"=",
"(",
"i2",
"-",
"i1",
")",
"/",
"float",
"(... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.trim | Return a DataFrame, where all columns are 'trimmed' by the active range.
For the returned DataFrame, df.get_active_range() returns (0, df.length_original()).
{note_copy}
:param inplace: {inplace}
:rtype: DataFrame | packages/vaex-core/vaex/dataframe.py | def trim(self, inplace=False):
'''Return a DataFrame, where all columns are 'trimmed' by the active range.
For the returned DataFrame, df.get_active_range() returns (0, df.length_original()).
{note_copy}
:param inplace: {inplace}
:rtype: DataFrame
'''
df = self... | def trim(self, inplace=False):
'''Return a DataFrame, where all columns are 'trimmed' by the active range.
For the returned DataFrame, df.get_active_range() returns (0, df.length_original()).
{note_copy}
:param inplace: {inplace}
:rtype: DataFrame
'''
df = self... | [
"Return",
"a",
"DataFrame",
"where",
"all",
"columns",
"are",
"trimmed",
"by",
"the",
"active",
"range",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3742-L3768 | [
"def",
"trim",
"(",
"self",
",",
"inplace",
"=",
"False",
")",
":",
"df",
"=",
"self",
"if",
"inplace",
"else",
"self",
".",
"copy",
"(",
")",
"for",
"name",
"in",
"df",
":",
"column",
"=",
"df",
".",
"columns",
".",
"get",
"(",
"name",
")",
"i... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.take | Returns a DataFrame containing only rows indexed by indices
{note_copy}
Example:
>>> import vaex, numpy as np
>>> df = vaex.from_arrays(s=np.array(['a', 'b', 'c', 'd']), x=np.arange(1,5))
>>> df.take([0,2])
# s x
0 a 1
1 c 3
... | packages/vaex-core/vaex/dataframe.py | def take(self, indices):
'''Returns a DataFrame containing only rows indexed by indices
{note_copy}
Example:
>>> import vaex, numpy as np
>>> df = vaex.from_arrays(s=np.array(['a', 'b', 'c', 'd']), x=np.arange(1,5))
>>> df.take([0,2])
# s x
0 a... | def take(self, indices):
'''Returns a DataFrame containing only rows indexed by indices
{note_copy}
Example:
>>> import vaex, numpy as np
>>> df = vaex.from_arrays(s=np.array(['a', 'b', 'c', 'd']), x=np.arange(1,5))
>>> df.take([0,2])
# s x
0 a... | [
"Returns",
"a",
"DataFrame",
"containing",
"only",
"rows",
"indexed",
"by",
"indices"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3771-L3814 | [
"def",
"take",
"(",
"self",
",",
"indices",
")",
":",
"df",
"=",
"self",
".",
"copy",
"(",
")",
"# if the columns in ds already have a ColumnIndex",
"# we could do, direct_indices = df.column['bla'].indices[indices]",
"# which should be shared among multiple ColumnIndex'es, so we s... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.extract | Return a DataFrame containing only the filtered rows.
{note_copy}
The resulting DataFrame may be more efficient to work with when the original DataFrame is
heavily filtered (contains just a small number of rows).
If no filtering is applied, it returns a trimmed view.
For the r... | packages/vaex-core/vaex/dataframe.py | def extract(self):
'''Return a DataFrame containing only the filtered rows.
{note_copy}
The resulting DataFrame may be more efficient to work with when the original DataFrame is
heavily filtered (contains just a small number of rows).
If no filtering is applied, it returns a t... | def extract(self):
'''Return a DataFrame containing only the filtered rows.
{note_copy}
The resulting DataFrame may be more efficient to work with when the original DataFrame is
heavily filtered (contains just a small number of rows).
If no filtering is applied, it returns a t... | [
"Return",
"a",
"DataFrame",
"containing",
"only",
"the",
"filtered",
"rows",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3817-L3835 | [
"def",
"extract",
"(",
"self",
")",
":",
"trimmed",
"=",
"self",
".",
"trim",
"(",
")",
"if",
"trimmed",
".",
"filtered",
":",
"indices",
"=",
"trimmed",
".",
"_filtered_range_to_unfiltered_indices",
"(",
"0",
",",
"len",
"(",
"trimmed",
")",
")",
"retur... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.sample | Returns a DataFrame with a random set of rows
{note_copy}
Provide either n or frac.
Example:
>>> import vaex, numpy as np
>>> df = vaex.from_arrays(s=np.array(['a', 'b', 'c', 'd']), x=np.arange(1,5))
>>> df
# s x
0 a 1
1 b ... | packages/vaex-core/vaex/dataframe.py | def sample(self, n=None, frac=None, replace=False, weights=None, random_state=None):
'''Returns a DataFrame with a random set of rows
{note_copy}
Provide either n or frac.
Example:
>>> import vaex, numpy as np
>>> df = vaex.from_arrays(s=np.array(['a', 'b', 'c', 'd'])... | def sample(self, n=None, frac=None, replace=False, weights=None, random_state=None):
'''Returns a DataFrame with a random set of rows
{note_copy}
Provide either n or frac.
Example:
>>> import vaex, numpy as np
>>> df = vaex.from_arrays(s=np.array(['a', 'b', 'c', 'd'])... | [
"Returns",
"a",
"DataFrame",
"with",
"a",
"random",
"set",
"of",
"rows"
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3838-L3892 | [
"def",
"sample",
"(",
"self",
",",
"n",
"=",
"None",
",",
"frac",
"=",
"None",
",",
"replace",
"=",
"False",
",",
"weights",
"=",
"None",
",",
"random_state",
"=",
"None",
")",
":",
"self",
"=",
"self",
".",
"extract",
"(",
")",
"if",
"type",
"("... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.split_random | Returns a list containing random portions of the DataFrame.
{note_copy}
Example:
>>> import vaex, import numpy as np
>>> np.random.seed(111)
>>> df = vaex.from_arrays(x = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> for dfs in df.split_random(frac=0.3, random_state=42):
... | packages/vaex-core/vaex/dataframe.py | def split_random(self, frac, random_state=None):
'''Returns a list containing random portions of the DataFrame.
{note_copy}
Example:
>>> import vaex, import numpy as np
>>> np.random.seed(111)
>>> df = vaex.from_arrays(x = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> fo... | def split_random(self, frac, random_state=None):
'''Returns a list containing random portions of the DataFrame.
{note_copy}
Example:
>>> import vaex, import numpy as np
>>> np.random.seed(111)
>>> df = vaex.from_arrays(x = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> fo... | [
"Returns",
"a",
"list",
"containing",
"random",
"portions",
"of",
"the",
"DataFrame",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3896-L3926 | [
"def",
"split_random",
"(",
"self",
",",
"frac",
",",
"random_state",
"=",
"None",
")",
":",
"self",
"=",
"self",
".",
"extract",
"(",
")",
"if",
"type",
"(",
"random_state",
")",
"==",
"int",
"or",
"random_state",
"is",
"None",
":",
"random_state",
"=... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
test | DataFrame.split | Returns a list containing ordered subsets of the DataFrame.
{note_copy}
Example:
>>> import vaex
>>> df = vaex.from_arrays(x = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> for dfs in df.split(frac=0.3):
... print(dfs.x.values)
...
[0 1 3]
[3 4 5 6 7 ... | packages/vaex-core/vaex/dataframe.py | def split(self, frac):
'''Returns a list containing ordered subsets of the DataFrame.
{note_copy}
Example:
>>> import vaex
>>> df = vaex.from_arrays(x = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> for dfs in df.split(frac=0.3):
... print(dfs.x.values)
...
... | def split(self, frac):
'''Returns a list containing ordered subsets of the DataFrame.
{note_copy}
Example:
>>> import vaex
>>> df = vaex.from_arrays(x = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> for dfs in df.split(frac=0.3):
... print(dfs.x.values)
...
... | [
"Returns",
"a",
"list",
"containing",
"ordered",
"subsets",
"of",
"the",
"DataFrame",
"."
] | vaexio/vaex | python | https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3930-L3966 | [
"def",
"split",
"(",
"self",
",",
"frac",
")",
":",
"self",
"=",
"self",
".",
"extract",
"(",
")",
"if",
"_issequence",
"(",
"frac",
")",
":",
"# make sure it is normalized",
"total",
"=",
"sum",
"(",
"frac",
")",
"frac",
"=",
"[",
"k",
"/",
"total",... | a45b672f8287afca2ada8e36b74b604b9b28dd85 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.