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
DataFrame.sort
Return a sorted DataFrame, sorted by the expression 'by' {note_copy} {note_filter} Example: >>> import vaex, numpy as np >>> df = vaex.from_arrays(s=np.array(['a', 'b', 'c', 'd']), x=np.arange(1,5)) >>> df['y'] = (df.x-1.8)**2 >>> df # s x ...
packages/vaex-core/vaex/dataframe.py
def sort(self, by, ascending=True, kind='quicksort'): '''Return a sorted DataFrame, sorted by the expression 'by' {note_copy} {note_filter} Example: >>> import vaex, numpy as np >>> df = vaex.from_arrays(s=np.array(['a', 'b', 'c', 'd']), x=np.arange(1,5)) >>> ...
def sort(self, by, ascending=True, kind='quicksort'): '''Return a sorted DataFrame, sorted by the expression 'by' {note_copy} {note_filter} Example: >>> import vaex, numpy as np >>> df = vaex.from_arrays(s=np.array(['a', 'b', 'c', 'd']), x=np.arange(1,5)) >>> ...
[ "Return", "a", "sorted", "DataFrame", "sorted", "by", "the", "expression", "by" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L3969-L4003
[ "def", "sort", "(", "self", ",", "by", ",", "ascending", "=", "True", ",", "kind", "=", "'quicksort'", ")", ":", "self", "=", "self", ".", "trim", "(", ")", "values", "=", "self", ".", "evaluate", "(", "by", ",", "filtered", "=", "False", ")", "i...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame.fillna
Return a DataFrame, where missing values/NaN are filled with 'value'. The original columns will be renamed, and by default they will be hidden columns. No data is lost. {note_copy} {note_filter} Example: >>> import vaex >>> import numpy as np >>> x = np.array...
packages/vaex-core/vaex/dataframe.py
def fillna(self, value, fill_nan=True, fill_masked=True, column_names=None, prefix='__original_', inplace=False): '''Return a DataFrame, where missing values/NaN are filled with 'value'. The original columns will be renamed, and by default they will be hidden columns. No data is lost. {note_co...
def fillna(self, value, fill_nan=True, fill_masked=True, column_names=None, prefix='__original_', inplace=False): '''Return a DataFrame, where missing values/NaN are filled with 'value'. The original columns will be renamed, and by default they will be hidden columns. No data is lost. {note_co...
[ "Return", "a", "DataFrame", "where", "missing", "values", "/", "NaN", "are", "filled", "with", "value", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4006-L4047
[ "def", "fillna", "(", "self", ",", "value", ",", "fill_nan", "=", "True", ",", "fill_masked", "=", "True", ",", "column_names", "=", "None", ",", "prefix", "=", "'__original_'", ",", "inplace", "=", "False", ")", ":", "df", "=", "self", ".", "trim", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame.materialize
Returns a new DataFrame where the virtual column is turned into an in memory numpy array. Example: >>> x = np.arange(1,4) >>> y = np.arange(2,5) >>> df = vaex.from_arrays(x=x, y=y) >>> df['r'] = (df.x**2 + df.y**2)**0.5 # 'r' is a virtual column (computed on the fly) >>...
packages/vaex-core/vaex/dataframe.py
def materialize(self, virtual_column, inplace=False): '''Returns a new DataFrame where the virtual column is turned into an in memory numpy array. Example: >>> x = np.arange(1,4) >>> y = np.arange(2,5) >>> df = vaex.from_arrays(x=x, y=y) >>> df['r'] = (df.x**2 + df.y**2...
def materialize(self, virtual_column, inplace=False): '''Returns a new DataFrame where the virtual column is turned into an in memory numpy array. Example: >>> x = np.arange(1,4) >>> y = np.arange(2,5) >>> df = vaex.from_arrays(x=x, y=y) >>> df['r'] = (df.x**2 + df.y**2...
[ "Returns", "a", "new", "DataFrame", "where", "the", "virtual", "column", "is", "turned", "into", "an", "in", "memory", "numpy", "array", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4049-L4069
[ "def", "materialize", "(", "self", ",", "virtual_column", ",", "inplace", "=", "False", ")", ":", "df", "=", "self", ".", "trim", "(", "inplace", "=", "inplace", ")", "virtual_column", "=", "_ensure_string_from_expression", "(", "virtual_column", ")", "if", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame.get_selection
Get the current selection object (mostly for internal use atm).
packages/vaex-core/vaex/dataframe.py
def get_selection(self, name="default"): """Get the current selection object (mostly for internal use atm).""" name = _normalize_selection_name(name) selection_history = self.selection_histories[name] index = self.selection_history_indices[name] if index == -1: return...
def get_selection(self, name="default"): """Get the current selection object (mostly for internal use atm).""" name = _normalize_selection_name(name) selection_history = self.selection_histories[name] index = self.selection_history_indices[name] if index == -1: return...
[ "Get", "the", "current", "selection", "object", "(", "mostly", "for", "internal", "use", "atm", ")", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4071-L4079
[ "def", "get_selection", "(", "self", ",", "name", "=", "\"default\"", ")", ":", "name", "=", "_normalize_selection_name", "(", "name", ")", "selection_history", "=", "self", ".", "selection_histories", "[", "name", "]", "index", "=", "self", ".", "selection_hi...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame.selection_undo
Undo selection, for the name.
packages/vaex-core/vaex/dataframe.py
def selection_undo(self, name="default", executor=None): """Undo selection, for the name.""" logger.debug("undo") executor = executor or self.executor assert self.selection_can_undo(name=name) selection_history = self.selection_histories[name] index = self.selection_histo...
def selection_undo(self, name="default", executor=None): """Undo selection, for the name.""" logger.debug("undo") executor = executor or self.executor assert self.selection_can_undo(name=name) selection_history = self.selection_histories[name] index = self.selection_histo...
[ "Undo", "selection", "for", "the", "name", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4081-L4090
[ "def", "selection_undo", "(", "self", ",", "name", "=", "\"default\"", ",", "executor", "=", "None", ")", ":", "logger", ".", "debug", "(", "\"undo\"", ")", "executor", "=", "executor", "or", "self", ".", "executor", "assert", "self", ".", "selection_can_u...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame.selection_redo
Redo selection, for the name.
packages/vaex-core/vaex/dataframe.py
def selection_redo(self, name="default", executor=None): """Redo selection, for the name.""" logger.debug("redo") executor = executor or self.executor assert self.selection_can_redo(name=name) selection_history = self.selection_histories[name] index = self.selection_histo...
def selection_redo(self, name="default", executor=None): """Redo selection, for the name.""" logger.debug("redo") executor = executor or self.executor assert self.selection_can_redo(name=name) selection_history = self.selection_histories[name] index = self.selection_histo...
[ "Redo", "selection", "for", "the", "name", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4092-L4102
[ "def", "selection_redo", "(", "self", ",", "name", "=", "\"default\"", ",", "executor", "=", "None", ")", ":", "logger", ".", "debug", "(", "\"redo\"", ")", "executor", "=", "executor", "or", "self", ".", "executor", "assert", "self", ".", "selection_can_r...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame.selection_can_redo
Can selection name be redone?
packages/vaex-core/vaex/dataframe.py
def selection_can_redo(self, name="default"): """Can selection name be redone?""" return (self.selection_history_indices[name] + 1) < len(self.selection_histories[name])
def selection_can_redo(self, name="default"): """Can selection name be redone?""" return (self.selection_history_indices[name] + 1) < len(self.selection_histories[name])
[ "Can", "selection", "name", "be", "redone?" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4108-L4110
[ "def", "selection_can_redo", "(", "self", ",", "name", "=", "\"default\"", ")", ":", "return", "(", "self", ".", "selection_history_indices", "[", "name", "]", "+", "1", ")", "<", "len", "(", "self", ".", "selection_histories", "[", "name", "]", ")" ]
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame.select
Perform a selection, defined by the boolean expression, and combined with the previous selection using the given mode. Selections are recorded in a history tree, per name, undo/redo can be done for them separately. :param str boolean_expression: Any valid column expression, with comparison operators ...
packages/vaex-core/vaex/dataframe.py
def select(self, boolean_expression, mode="replace", name="default", executor=None): """Perform a selection, defined by the boolean expression, and combined with the previous selection using the given mode. Selections are recorded in a history tree, per name, undo/redo can be done for them separately. ...
def select(self, boolean_expression, mode="replace", name="default", executor=None): """Perform a selection, defined by the boolean expression, and combined with the previous selection using the given mode. Selections are recorded in a history tree, per name, undo/redo can be done for them separately. ...
[ "Perform", "a", "selection", "defined", "by", "the", "boolean", "expression", "and", "combined", "with", "the", "previous", "selection", "using", "the", "given", "mode", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4112-L4130
[ "def", "select", "(", "self", ",", "boolean_expression", ",", "mode", "=", "\"replace\"", ",", "name", "=", "\"default\"", ",", "executor", "=", "None", ")", ":", "boolean_expression", "=", "_ensure_string_from_expression", "(", "boolean_expression", ")", "if", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame.select_non_missing
Create a selection that selects rows having non missing values for all columns in column_names. The name reflect Panda's, no rows are really dropped, but a mask is kept to keep track of the selection :param drop_nan: drop rows when there is a NaN in any of the columns (will only affect float values) ...
packages/vaex-core/vaex/dataframe.py
def select_non_missing(self, drop_nan=True, drop_masked=True, column_names=None, mode="replace", name="default"): """Create a selection that selects rows having non missing values for all columns in column_names. The name reflect Panda's, no rows are really dropped, but a mask is kept to keep track of ...
def select_non_missing(self, drop_nan=True, drop_masked=True, column_names=None, mode="replace", name="default"): """Create a selection that selects rows having non missing values for all columns in column_names. The name reflect Panda's, no rows are really dropped, but a mask is kept to keep track of ...
[ "Create", "a", "selection", "that", "selects", "rows", "having", "non", "missing", "values", "for", "all", "columns", "in", "column_names", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4132-L4148
[ "def", "select_non_missing", "(", "self", ",", "drop_nan", "=", "True", ",", "drop_masked", "=", "True", ",", "column_names", "=", "None", ",", "mode", "=", "\"replace\"", ",", "name", "=", "\"default\"", ")", ":", "column_names", "=", "column_names", "or", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame.dropna
Create a shallow copy of a DataFrame, with filtering set using select_non_missing. :param drop_nan: drop rows when there is a NaN in any of the columns (will only affect float values) :param drop_masked: drop rows when there is a masked value in any of the columns :param column_names: The colum...
packages/vaex-core/vaex/dataframe.py
def dropna(self, drop_nan=True, drop_masked=True, column_names=None): """Create a shallow copy of a DataFrame, with filtering set using select_non_missing. :param drop_nan: drop rows when there is a NaN in any of the columns (will only affect float values) :param drop_masked: drop rows when the...
def dropna(self, drop_nan=True, drop_masked=True, column_names=None): """Create a shallow copy of a DataFrame, with filtering set using select_non_missing. :param drop_nan: drop rows when there is a NaN in any of the columns (will only affect float values) :param drop_masked: drop rows when the...
[ "Create", "a", "shallow", "copy", "of", "a", "DataFrame", "with", "filtering", "set", "using", "select_non_missing", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4150-L4161
[ "def", "dropna", "(", "self", ",", "drop_nan", "=", "True", ",", "drop_masked", "=", "True", ",", "column_names", "=", "None", ")", ":", "copy", "=", "self", ".", "copy", "(", ")", "copy", ".", "select_non_missing", "(", "drop_nan", "=", "drop_nan", ",...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame.select_rectangle
Select a 2d rectangular box in the space given by x and y, bounds by limits. Example: >>> df.select_box('x', 'y', [(0, 10), (0, 1)]) :param x: expression for the x space :param y: expression fo the y space :param limits: sequence of shape [(x1, x2), (y1, y2)] :param mo...
packages/vaex-core/vaex/dataframe.py
def select_rectangle(self, x, y, limits, mode="replace", name="default"): """Select a 2d rectangular box in the space given by x and y, bounds by limits. Example: >>> df.select_box('x', 'y', [(0, 10), (0, 1)]) :param x: expression for the x space :param y: expression fo the y ...
def select_rectangle(self, x, y, limits, mode="replace", name="default"): """Select a 2d rectangular box in the space given by x and y, bounds by limits. Example: >>> df.select_box('x', 'y', [(0, 10), (0, 1)]) :param x: expression for the x space :param y: expression fo the y ...
[ "Select", "a", "2d", "rectangular", "box", "in", "the", "space", "given", "by", "x", "and", "y", "bounds", "by", "limits", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4169-L4181
[ "def", "select_rectangle", "(", "self", ",", "x", ",", "y", ",", "limits", ",", "mode", "=", "\"replace\"", ",", "name", "=", "\"default\"", ")", ":", "self", ".", "select_box", "(", "[", "x", ",", "y", "]", ",", "limits", ",", "mode", "=", "mode",...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame.select_box
Select a n-dimensional rectangular box bounded by limits. The following examples are equivalent: >>> df.select_box(['x', 'y'], [(0, 10), (0, 1)]) >>> df.select_rectangle('x', 'y', [(0, 10), (0, 1)]) :param spaces: list of expressions :param limits: sequence of shape [(x1, x2),...
packages/vaex-core/vaex/dataframe.py
def select_box(self, spaces, limits, mode="replace", name="default"): """Select a n-dimensional rectangular box bounded by limits. The following examples are equivalent: >>> df.select_box(['x', 'y'], [(0, 10), (0, 1)]) >>> df.select_rectangle('x', 'y', [(0, 10), (0, 1)]) :para...
def select_box(self, spaces, limits, mode="replace", name="default"): """Select a n-dimensional rectangular box bounded by limits. The following examples are equivalent: >>> df.select_box(['x', 'y'], [(0, 10), (0, 1)]) >>> df.select_rectangle('x', 'y', [(0, 10), (0, 1)]) :para...
[ "Select", "a", "n", "-", "dimensional", "rectangular", "box", "bounded", "by", "limits", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4183-L4200
[ "def", "select_box", "(", "self", ",", "spaces", ",", "limits", ",", "mode", "=", "\"replace\"", ",", "name", "=", "\"default\"", ")", ":", "sorted_limits", "=", "[", "(", "min", "(", "l", ")", ",", "max", "(", "l", ")", ")", "for", "l", "in", "l...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame.select_circle
Select a circular region centred on xc, yc, with a radius of r. Example: >>> df.select_circle('x','y',2,3,1) :param x: expression for the x space :param y: expression for the y space :param xc: location of the centre of the circle in x :param yc: location of the centre...
packages/vaex-core/vaex/dataframe.py
def select_circle(self, x, y, xc, yc, r, mode="replace", name="default", inclusive=True): """ Select a circular region centred on xc, yc, with a radius of r. Example: >>> df.select_circle('x','y',2,3,1) :param x: expression for the x space :param y: expression for the ...
def select_circle(self, x, y, xc, yc, r, mode="replace", name="default", inclusive=True): """ Select a circular region centred on xc, yc, with a radius of r. Example: >>> df.select_circle('x','y',2,3,1) :param x: expression for the x space :param y: expression for the ...
[ "Select", "a", "circular", "region", "centred", "on", "xc", "yc", "with", "a", "radius", "of", "r", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4202-L4226
[ "def", "select_circle", "(", "self", ",", "x", ",", "y", ",", "xc", ",", "yc", ",", "r", ",", "mode", "=", "\"replace\"", ",", "name", "=", "\"default\"", ",", "inclusive", "=", "True", ")", ":", "# expr = \"({x}-{xc})**2 + ({y}-{yc})**2 <={r}**2\".format(**lo...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame.select_ellipse
Select an elliptical region centred on xc, yc, with a certain width, height and angle. Example: >>> df.select_ellipse('x','y', 2, -1, 5,1, 30, name='my_ellipse') :param x: expression for the x space :param y: expression for the y space :param xc: location of the centre...
packages/vaex-core/vaex/dataframe.py
def select_ellipse(self, x, y, xc, yc, width, height, angle=0, mode="replace", name="default", radians=False, inclusive=True): """ Select an elliptical region centred on xc, yc, with a certain width, height and angle. Example: >>> df.select_ellipse('x','y', 2, -1, 5,1, 30, name...
def select_ellipse(self, x, y, xc, yc, width, height, angle=0, mode="replace", name="default", radians=False, inclusive=True): """ Select an elliptical region centred on xc, yc, with a certain width, height and angle. Example: >>> df.select_ellipse('x','y', 2, -1, 5,1, 30, name...
[ "Select", "an", "elliptical", "region", "centred", "on", "xc", "yc", "with", "a", "certain", "width", "height", "and", "angle", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4228-L4269
[ "def", "select_ellipse", "(", "self", ",", "x", ",", "y", ",", "xc", ",", "yc", ",", "width", ",", "height", ",", "angle", "=", "0", ",", "mode", "=", "\"replace\"", ",", "name", "=", "\"default\"", ",", "radians", "=", "False", ",", "inclusive", "...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame.select_lasso
For performance reasons, a lasso selection is handled differently. :param str expression_x: Name/expression for the x coordinate :param str expression_y: Name/expression for the y coordinate :param xsequence: list of x numbers defining the lasso, together with y :param ysequence: ...
packages/vaex-core/vaex/dataframe.py
def select_lasso(self, expression_x, expression_y, xsequence, ysequence, mode="replace", name="default", executor=None): """For performance reasons, a lasso selection is handled differently. :param str expression_x: Name/expression for the x coordinate :param str expression_y: Name/expression f...
def select_lasso(self, expression_x, expression_y, xsequence, ysequence, mode="replace", name="default", executor=None): """For performance reasons, a lasso selection is handled differently. :param str expression_x: Name/expression for the x coordinate :param str expression_y: Name/expression f...
[ "For", "performance", "reasons", "a", "lasso", "selection", "is", "handled", "differently", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4271-L4286
[ "def", "select_lasso", "(", "self", ",", "expression_x", ",", "expression_y", ",", "xsequence", ",", "ysequence", ",", "mode", "=", "\"replace\"", ",", "name", "=", "\"default\"", ",", "executor", "=", "None", ")", ":", "def", "create", "(", "current", ")"...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame.select_inverse
Invert the selection, i.e. what is selected will not be, and vice versa :param str name: :param executor: :return:
packages/vaex-core/vaex/dataframe.py
def select_inverse(self, name="default", executor=None): """Invert the selection, i.e. what is selected will not be, and vice versa :param str name: :param executor: :return: """ def create(current): return selections.SelectionInvert(current) self._s...
def select_inverse(self, name="default", executor=None): """Invert the selection, i.e. what is selected will not be, and vice versa :param str name: :param executor: :return: """ def create(current): return selections.SelectionInvert(current) self._s...
[ "Invert", "the", "selection", "i", ".", "e", ".", "what", "is", "selected", "will", "not", "be", "and", "vice", "versa" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4288-L4298
[ "def", "select_inverse", "(", "self", ",", "name", "=", "\"default\"", ",", "executor", "=", "None", ")", ":", "def", "create", "(", "current", ")", ":", "return", "selections", ".", "SelectionInvert", "(", "current", ")", "self", ".", "_selection", "(", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame.set_selection
Sets the selection object :param selection: Selection object :param name: selection 'slot' :param executor: :return:
packages/vaex-core/vaex/dataframe.py
def set_selection(self, selection, name="default", executor=None): """Sets the selection object :param selection: Selection object :param name: selection 'slot' :param executor: :return: """ def create(current): return selection self._selectio...
def set_selection(self, selection, name="default", executor=None): """Sets the selection object :param selection: Selection object :param name: selection 'slot' :param executor: :return: """ def create(current): return selection self._selectio...
[ "Sets", "the", "selection", "object" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4300-L4310
[ "def", "set_selection", "(", "self", ",", "selection", ",", "name", "=", "\"default\"", ",", "executor", "=", "None", ")", ":", "def", "create", "(", "current", ")", ":", "return", "selection", "self", ".", "_selection", "(", "create", ",", "name", ",", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame._selection
select_lasso and select almost share the same code
packages/vaex-core/vaex/dataframe.py
def _selection(self, create_selection, name, executor=None, execute_fully=False): """select_lasso and select almost share the same code""" selection_history = self.selection_histories[name] previous_index = self.selection_history_indices[name] current = selection_history[previous_index] ...
def _selection(self, create_selection, name, executor=None, execute_fully=False): """select_lasso and select almost share the same code""" selection_history = self.selection_histories[name] previous_index = self.selection_history_indices[name] current = selection_history[previous_index] ...
[ "select_lasso", "and", "select", "almost", "share", "the", "same", "code" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4312-L4338
[ "def", "_selection", "(", "self", ",", "create_selection", ",", "name", ",", "executor", "=", "None", ",", "execute_fully", "=", "False", ")", ":", "selection_history", "=", "self", ".", "selection_histories", "[", "name", "]", "previous_index", "=", "self", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame.drop
Drop columns (or a single column). :param columns: List of columns or a single column name :param inplace: {inplace} :param check: When true, it will check if the column is used in virtual columns or the filter, and hide it instead.
packages/vaex-core/vaex/dataframe.py
def drop(self, columns, inplace=False, check=True): """Drop columns (or a single column). :param columns: List of columns or a single column name :param inplace: {inplace} :param check: When true, it will check if the column is used in virtual columns or the filter, and hide it instead....
def drop(self, columns, inplace=False, check=True): """Drop columns (or a single column). :param columns: List of columns or a single column name :param inplace: {inplace} :param check: When true, it will check if the column is used in virtual columns or the filter, and hide it instead....
[ "Drop", "columns", "(", "or", "a", "single", "column", ")", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4429-L4445
[ "def", "drop", "(", "self", ",", "columns", ",", "inplace", "=", "False", ",", "check", "=", "True", ")", ":", "columns", "=", "_ensure_list", "(", "columns", ")", "columns", "=", "_ensure_strings_from_expressions", "(", "columns", ")", "df", "=", "self", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame._hide_column
Hides a column by prefixing the name with \'__\
packages/vaex-core/vaex/dataframe.py
def _hide_column(self, column): '''Hides a column by prefixing the name with \'__\'''' column = _ensure_string_from_expression(column) new_name = self._find_valid_name('__' + column) self._rename(column, new_name)
def _hide_column(self, column): '''Hides a column by prefixing the name with \'__\'''' column = _ensure_string_from_expression(column) new_name = self._find_valid_name('__' + column) self._rename(column, new_name)
[ "Hides", "a", "column", "by", "prefixing", "the", "name", "with", "\\", "__", "\\" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4447-L4451
[ "def", "_hide_column", "(", "self", ",", "column", ")", ":", "column", "=", "_ensure_string_from_expression", "(", "column", ")", "new_name", "=", "self", ".", "_find_valid_name", "(", "'__'", "+", "column", ")", "self", ".", "_rename", "(", "column", ",", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame._find_valid_name
Finds a non-colliding name by optional postfixing
packages/vaex-core/vaex/dataframe.py
def _find_valid_name(self, initial_name): '''Finds a non-colliding name by optional postfixing''' return vaex.utils.find_valid_name(initial_name, used=self.get_column_names(hidden=True))
def _find_valid_name(self, initial_name): '''Finds a non-colliding name by optional postfixing''' return vaex.utils.find_valid_name(initial_name, used=self.get_column_names(hidden=True))
[ "Finds", "a", "non", "-", "colliding", "name", "by", "optional", "postfixing" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4453-L4455
[ "def", "_find_valid_name", "(", "self", ",", "initial_name", ")", ":", "return", "vaex", ".", "utils", ".", "find_valid_name", "(", "initial_name", ",", "used", "=", "self", ".", "get_column_names", "(", "hidden", "=", "True", ")", ")" ]
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame._depending_columns
Find all depending column for a set of column (default all), minus the excluded ones
packages/vaex-core/vaex/dataframe.py
def _depending_columns(self, columns=None, columns_exclude=None, check_filter=True): '''Find all depending column for a set of column (default all), minus the excluded ones''' columns = set(columns or self.get_column_names(hidden=True)) if columns_exclude: columns -= set(columns_excl...
def _depending_columns(self, columns=None, columns_exclude=None, check_filter=True): '''Find all depending column for a set of column (default all), minus the excluded ones''' columns = set(columns or self.get_column_names(hidden=True)) if columns_exclude: columns -= set(columns_excl...
[ "Find", "all", "depending", "column", "for", "a", "set", "of", "column", "(", "default", "all", ")", "minus", "the", "excluded", "ones" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4457-L4471
[ "def", "_depending_columns", "(", "self", ",", "columns", "=", "None", ",", "columns_exclude", "=", "None", ",", "check_filter", "=", "True", ")", ":", "columns", "=", "set", "(", "columns", "or", "self", ".", "get_column_names", "(", "hidden", "=", "True"...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame._root_nodes
Returns a list of string which are the virtual columns that are not used in any other virtual column.
packages/vaex-core/vaex/dataframe.py
def _root_nodes(self): """Returns a list of string which are the virtual columns that are not used in any other virtual column.""" # these lists (~used as ordered set) keep track of leafes and root nodes # root nodes root_nodes = [] leafes = [] def walk(node): ...
def _root_nodes(self): """Returns a list of string which are the virtual columns that are not used in any other virtual column.""" # these lists (~used as ordered set) keep track of leafes and root nodes # root nodes root_nodes = [] leafes = [] def walk(node): ...
[ "Returns", "a", "list", "of", "string", "which", "are", "the", "virtual", "columns", "that", "are", "not", "used", "in", "any", "other", "virtual", "column", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4483-L4514
[ "def", "_root_nodes", "(", "self", ")", ":", "# these lists (~used as ordered set) keep track of leafes and root nodes", "# root nodes", "root_nodes", "=", "[", "]", "leafes", "=", "[", "]", "def", "walk", "(", "node", ")", ":", "# this function recursively walks the expr...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrame._graphviz
Return a graphviz.Digraph object with a graph of all virtual columns
packages/vaex-core/vaex/dataframe.py
def _graphviz(self, dot=None): """Return a graphviz.Digraph object with a graph of all virtual columns""" from graphviz import Digraph dot = dot or Digraph(comment='whole dataframe') root_nodes = self._root_nodes() for column in root_nodes: self[column]._graphviz(dot=...
def _graphviz(self, dot=None): """Return a graphviz.Digraph object with a graph of all virtual columns""" from graphviz import Digraph dot = dot or Digraph(comment='whole dataframe') root_nodes = self._root_nodes() for column in root_nodes: self[column]._graphviz(dot=...
[ "Return", "a", "graphviz", ".", "Digraph", "object", "with", "a", "graph", "of", "all", "virtual", "columns" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4516-L4523
[ "def", "_graphviz", "(", "self", ",", "dot", "=", "None", ")", ":", "from", "graphviz", "import", "Digraph", "dot", "=", "dot", "or", "Digraph", "(", "comment", "=", "'whole dataframe'", ")", "root_nodes", "=", "self", ".", "_root_nodes", "(", ")", "for"...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrameLocal.categorize
Mark column as categorical, with given labels, assuming zero indexing
packages/vaex-core/vaex/dataframe.py
def categorize(self, column, labels=None, check=True): """Mark column as categorical, with given labels, assuming zero indexing""" column = _ensure_string_from_expression(column) if check: vmin, vmax = self.minmax(column) if labels is None: N = int(vmax + ...
def categorize(self, column, labels=None, check=True): """Mark column as categorical, with given labels, assuming zero indexing""" column = _ensure_string_from_expression(column) if check: vmin, vmax = self.minmax(column) if labels is None: N = int(vmax + ...
[ "Mark", "column", "as", "categorical", "with", "given", "labels", "assuming", "zero", "indexing" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4557-L4567
[ "def", "categorize", "(", "self", ",", "column", ",", "labels", "=", "None", ",", "check", "=", "True", ")", ":", "column", "=", "_ensure_string_from_expression", "(", "column", ")", "if", "check", ":", "vmin", ",", "vmax", "=", "self", ".", "minmax", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrameLocal.ordinal_encode
Encode column as ordinal values and mark it as categorical. The existing column is renamed to a hidden column and replaced by a numerical columns with values between [0, len(values)-1].
packages/vaex-core/vaex/dataframe.py
def ordinal_encode(self, column, values=None, inplace=False): """Encode column as ordinal values and mark it as categorical. The existing column is renamed to a hidden column and replaced by a numerical columns with values between [0, len(values)-1]. """ column = _ensure_string_...
def ordinal_encode(self, column, values=None, inplace=False): """Encode column as ordinal values and mark it as categorical. The existing column is renamed to a hidden column and replaced by a numerical columns with values between [0, len(values)-1]. """ column = _ensure_string_...
[ "Encode", "column", "as", "ordinal", "values", "and", "mark", "it", "as", "categorical", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4569-L4613
[ "def", "ordinal_encode", "(", "self", ",", "column", ",", "values", "=", "None", ",", "inplace", "=", "False", ")", ":", "column", "=", "_ensure_string_from_expression", "(", "column", ")", "df", "=", "self", "if", "inplace", "else", "self", ".", "copy", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrameLocal.data
Gives direct access to the data as numpy arrays. Convenient when working with IPython in combination with small DataFrames, since this gives tab-completion. Only real columns (i.e. no virtual) columns can be accessed, for getting the data from virtual columns, use DataFrame.evalulate(...). ...
packages/vaex-core/vaex/dataframe.py
def data(self): """Gives direct access to the data as numpy arrays. Convenient when working with IPython in combination with small DataFrames, since this gives tab-completion. Only real columns (i.e. no virtual) columns can be accessed, for getting the data from virtual columns, use Dat...
def data(self): """Gives direct access to the data as numpy arrays. Convenient when working with IPython in combination with small DataFrames, since this gives tab-completion. Only real columns (i.e. no virtual) columns can be accessed, for getting the data from virtual columns, use Dat...
[ "Gives", "direct", "access", "to", "the", "data", "as", "numpy", "arrays", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4619-L4640
[ "def", "data", "(", "self", ")", ":", "class", "Datas", "(", "object", ")", ":", "pass", "datas", "=", "Datas", "(", ")", "for", "name", ",", "array", "in", "self", ".", "columns", ".", "items", "(", ")", ":", "setattr", "(", "datas", ",", "name"...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrameLocal.shallow_copy
Creates a (shallow) copy of the DataFrame. It will link to the same data, but will have its own state, e.g. virtual columns, variables, selection etc.
packages/vaex-core/vaex/dataframe.py
def shallow_copy(self, virtual=True, variables=True): """Creates a (shallow) copy of the DataFrame. It will link to the same data, but will have its own state, e.g. virtual columns, variables, selection etc. """ df = DataFrameLocal(self.name, self.path, self.column_names) df.co...
def shallow_copy(self, virtual=True, variables=True): """Creates a (shallow) copy of the DataFrame. It will link to the same data, but will have its own state, e.g. virtual columns, variables, selection etc. """ df = DataFrameLocal(self.name, self.path, self.column_names) df.co...
[ "Creates", "a", "(", "shallow", ")", "copy", "of", "the", "DataFrame", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4694-L4716
[ "def", "shallow_copy", "(", "self", ",", "virtual", "=", "True", ",", "variables", "=", "True", ")", ":", "df", "=", "DataFrameLocal", "(", "self", ".", "name", ",", "self", ".", "path", ",", "self", ".", "column_names", ")", "df", ".", "columns", "....
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrameLocal.length
Get the length of the DataFrames, for the selection of the whole DataFrame. If selection is False, it returns len(df). TODO: Implement this in DataFrameRemote, and move the method up in :func:`DataFrame.length` :param selection: When True, will return the number of selected rows :retu...
packages/vaex-core/vaex/dataframe.py
def length(self, selection=False): """Get the length of the DataFrames, for the selection of the whole DataFrame. If selection is False, it returns len(df). TODO: Implement this in DataFrameRemote, and move the method up in :func:`DataFrame.length` :param selection: When True, will re...
def length(self, selection=False): """Get the length of the DataFrames, for the selection of the whole DataFrame. If selection is False, it returns len(df). TODO: Implement this in DataFrameRemote, and move the method up in :func:`DataFrame.length` :param selection: When True, will re...
[ "Get", "the", "length", "of", "the", "DataFrames", "for", "the", "selection", "of", "the", "whole", "DataFrame", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4722-L4735
[ "def", "length", "(", "self", ",", "selection", "=", "False", ")", ":", "if", "selection", ":", "return", "0", "if", "self", ".", "mask", "is", "None", "else", "np", ".", "sum", "(", "self", ".", "mask", ")", "else", ":", "return", "len", "(", "s...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrameLocal._hstack
Join the columns of the other DataFrame to this one, assuming the ordering is the same
packages/vaex-core/vaex/dataframe.py
def _hstack(self, other, prefix=None): """Join the columns of the other DataFrame to this one, assuming the ordering is the same""" assert len(self) == len(other), "does not make sense to horizontally stack DataFrames with different lengths" for name in other.get_column_names(): if p...
def _hstack(self, other, prefix=None): """Join the columns of the other DataFrame to this one, assuming the ordering is the same""" assert len(self) == len(other), "does not make sense to horizontally stack DataFrames with different lengths" for name in other.get_column_names(): if p...
[ "Join", "the", "columns", "of", "the", "other", "DataFrame", "to", "this", "one", "assuming", "the", "ordering", "is", "the", "same" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4767-L4775
[ "def", "_hstack", "(", "self", ",", "other", ",", "prefix", "=", "None", ")", ":", "assert", "len", "(", "self", ")", "==", "len", "(", "other", ")", ",", "\"does not make sense to horizontally stack DataFrames with different lengths\"", "for", "name", "in", "ot...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrameLocal.concat
Concatenates two DataFrames, adding the rows of one the other DataFrame to the current, returned in a new DataFrame. No copy of the data is made. :param other: The other DataFrame that is concatenated with this DataFrame :return: New DataFrame with the rows concatenated :rtype: DataFra...
packages/vaex-core/vaex/dataframe.py
def concat(self, other): """Concatenates two DataFrames, adding the rows of one the other DataFrame to the current, returned in a new DataFrame. No copy of the data is made. :param other: The other DataFrame that is concatenated with this DataFrame :return: New DataFrame with the rows ...
def concat(self, other): """Concatenates two DataFrames, adding the rows of one the other DataFrame to the current, returned in a new DataFrame. No copy of the data is made. :param other: The other DataFrame that is concatenated with this DataFrame :return: New DataFrame with the rows ...
[ "Concatenates", "two", "DataFrames", "adding", "the", "rows", "of", "one", "the", "other", "DataFrame", "to", "the", "current", "returned", "in", "a", "new", "DataFrame", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4777-L4795
[ "def", "concat", "(", "self", ",", "other", ")", ":", "dfs", "=", "[", "]", "if", "isinstance", "(", "self", ",", "DataFrameConcatenated", ")", ":", "dfs", ".", "extend", "(", "self", ".", "dfs", ")", "else", ":", "dfs", ".", "extend", "(", "[", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrameLocal.evaluate
The local implementation of :func:`DataFrame.evaluate`
packages/vaex-core/vaex/dataframe.py
def evaluate(self, expression, i1=None, i2=None, out=None, selection=None, filtered=True, internal=False): """The local implementation of :func:`DataFrame.evaluate`""" expression = _ensure_string_from_expression(expression) selection = _ensure_strings_from_expressions(selection) i1 = i1 ...
def evaluate(self, expression, i1=None, i2=None, out=None, selection=None, filtered=True, internal=False): """The local implementation of :func:`DataFrame.evaluate`""" expression = _ensure_string_from_expression(expression) selection = _ensure_strings_from_expressions(selection) i1 = i1 ...
[ "The", "local", "implementation", "of", ":", "func", ":", "DataFrame", ".", "evaluate" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4839-L4861
[ "def", "evaluate", "(", "self", ",", "expression", ",", "i1", "=", "None", ",", "i2", "=", "None", ",", "out", "=", "None", ",", "selection", "=", "None", ",", "filtered", "=", "True", ",", "internal", "=", "False", ")", ":", "expression", "=", "_e...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrameLocal.compare
Compare two DataFrames and report their difference, use with care for large DataFrames
packages/vaex-core/vaex/dataframe.py
def compare(self, other, report_missing=True, report_difference=False, show=10, orderby=None, column_names=None): """Compare two DataFrames and report their difference, use with care for large DataFrames""" if column_names is None: column_names = self.get_column_names(virtual=False) ...
def compare(self, other, report_missing=True, report_difference=False, show=10, orderby=None, column_names=None): """Compare two DataFrames and report their difference, use with care for large DataFrames""" if column_names is None: column_names = self.get_column_names(virtual=False) ...
[ "Compare", "two", "DataFrames", "and", "report", "their", "difference", "use", "with", "care", "for", "large", "DataFrames" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4867-L4967
[ "def", "compare", "(", "self", ",", "other", ",", "report_missing", "=", "True", ",", "report_difference", "=", "False", ",", "show", "=", "10", ",", "orderby", "=", "None", ",", "column_names", "=", "None", ")", ":", "if", "column_names", "is", "None", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrameLocal.join
Return a DataFrame joined with other DataFrames, matched by columns/expression on/left_on/right_on If neither on/left_on/right_on is given, the join is done by simply adding the columns (i.e. on the implicit row index). Note: The filters will be ignored when joining, the full DataFrame will be...
packages/vaex-core/vaex/dataframe.py
def join(self, other, on=None, left_on=None, right_on=None, lsuffix='', rsuffix='', how='left', inplace=False): """Return a DataFrame joined with other DataFrames, matched by columns/expression on/left_on/right_on If neither on/left_on/right_on is given, the join is done by simply adding the columns (i...
def join(self, other, on=None, left_on=None, right_on=None, lsuffix='', rsuffix='', how='left', inplace=False): """Return a DataFrame joined with other DataFrames, matched by columns/expression on/left_on/right_on If neither on/left_on/right_on is given, the join is done by simply adding the columns (i...
[ "Return", "a", "DataFrame", "joined", "with", "other", "DataFrames", "matched", "by", "columns", "/", "expression", "on", "/", "left_on", "/", "right_on" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L4970-L5078
[ "def", "join", "(", "self", ",", "other", ",", "on", "=", "None", ",", "left_on", "=", "None", ",", "right_on", "=", "None", ",", "lsuffix", "=", "''", ",", "rsuffix", "=", "''", ",", "how", "=", "'left'", ",", "inplace", "=", "False", ")", ":", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrameLocal.export
Exports the DataFrame to a file written with arrow :param DataFrameLocal df: DataFrame 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 endi...
packages/vaex-core/vaex/dataframe.py
def export(self, path, column_names=None, byteorder="=", shuffle=False, selection=False, progress=None, virtual=False, sort=None, ascending=True): """Exports the DataFrame to a file written with arrow :param DataFrameLocal df: DataFrame to export :param str path: path for file :param li...
def export(self, path, column_names=None, byteorder="=", shuffle=False, selection=False, progress=None, virtual=False, sort=None, ascending=True): """Exports the DataFrame to a file written with arrow :param DataFrameLocal df: DataFrame to export :param str path: path for file :param li...
[ "Exports", "the", "DataFrame", "to", "a", "file", "written", "with", "arrow" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L5080-L5103
[ "def", "export", "(", "self", ",", "path", ",", "column_names", "=", "None", ",", "byteorder", "=", "\"=\"", ",", "shuffle", "=", "False", ",", "selection", "=", "False", ",", "progress", "=", "None", ",", "virtual", "=", "False", ",", "sort", "=", "...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrameLocal.export_arrow
Exports the DataFrame to a file written with arrow :param DataFrameLocal df: DataFrame 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 endi...
packages/vaex-core/vaex/dataframe.py
def export_arrow(self, path, column_names=None, byteorder="=", shuffle=False, selection=False, progress=None, virtual=False, sort=None, ascending=True): """Exports the DataFrame to a file written with arrow :param DataFrameLocal df: DataFrame to export :param str path: path for file :pa...
def export_arrow(self, path, column_names=None, byteorder="=", shuffle=False, selection=False, progress=None, virtual=False, sort=None, ascending=True): """Exports the DataFrame to a file written with arrow :param DataFrameLocal df: DataFrame to export :param str path: path for file :pa...
[ "Exports", "the", "DataFrame", "to", "a", "file", "written", "with", "arrow" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L5105-L5122
[ "def", "export_arrow", "(", "self", ",", "path", ",", "column_names", "=", "None", ",", "byteorder", "=", "\"=\"", ",", "shuffle", "=", "False", ",", "selection", "=", "False", ",", "progress", "=", "None", ",", "virtual", "=", "False", ",", "sort", "=...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrameLocal.export_hdf5
Exports the DataFrame to a vaex hdf5 file :param DataFrameLocal df: DataFrame 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 ...
packages/vaex-core/vaex/dataframe.py
def export_hdf5(self, path, column_names=None, byteorder="=", shuffle=False, selection=False, progress=None, virtual=False, sort=None, ascending=True): """Exports the DataFrame to a vaex hdf5 file :param DataFrameLocal df: DataFrame to export :param str path: path for file :param lis[st...
def export_hdf5(self, path, column_names=None, byteorder="=", shuffle=False, selection=False, progress=None, virtual=False, sort=None, ascending=True): """Exports the DataFrame to a vaex hdf5 file :param DataFrameLocal df: DataFrame to export :param str path: path for file :param lis[st...
[ "Exports", "the", "DataFrame", "to", "a", "vaex", "hdf5", "file" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L5143-L5160
[ "def", "export_hdf5", "(", "self", ",", "path", ",", "column_names", "=", "None", ",", "byteorder", "=", "\"=\"", ",", "shuffle", "=", "False", ",", "selection", "=", "False", ",", "progress", "=", "None", ",", "virtual", "=", "False", ",", "sort", "="...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrameLocal.groupby
Return a :class:`GroupBy` or :class:`DataFrame` object when agg is not None Examples: >>> import vaex >>> import numpy as np >>> np.random.seed(42) >>> x = np.random.randint(1, 5, 10) >>> y = x**2 >>> df = vaex.from_arrays(x=x, y=y) >>> df.groupby(df.x, ...
packages/vaex-core/vaex/dataframe.py
def groupby(self, by=None, agg=None): """Return a :class:`GroupBy` or :class:`DataFrame` object when agg is not None Examples: >>> import vaex >>> import numpy as np >>> np.random.seed(42) >>> x = np.random.randint(1, 5, 10) >>> y = x**2 >>> df = vaex.fr...
def groupby(self, by=None, agg=None): """Return a :class:`GroupBy` or :class:`DataFrame` object when agg is not None Examples: >>> import vaex >>> import numpy as np >>> np.random.seed(42) >>> x = np.random.randint(1, 5, 10) >>> y = x**2 >>> df = vaex.fr...
[ "Return", "a", ":", "class", ":", "GroupBy", "or", ":", "class", ":", "DataFrame", "object", "when", "agg", "is", "not", "None" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L5202-L5258
[ "def", "groupby", "(", "self", ",", "by", "=", "None", ",", "agg", "=", "None", ")", ":", "from", ".", "groupby", "import", "GroupBy", "groupby", "=", "GroupBy", "(", "self", ",", "by", "=", "by", ")", "if", "agg", "is", "None", ":", "return", "g...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrameLocal.binby
Return a :class:`BinBy` or :class:`DataArray` object when agg is not None The binby operations does not return a 'flat' DataFrame, instead it returns an N-d grid in the form of an xarray. :param dict, list or agg agg: Aggregate operation in the form of a string, vaex.agg object, a dictionary ...
packages/vaex-core/vaex/dataframe.py
def binby(self, by=None, agg=None): """Return a :class:`BinBy` or :class:`DataArray` object when agg is not None The binby operations does not return a 'flat' DataFrame, instead it returns an N-d grid in the form of an xarray. :param dict, list or agg agg: Aggregate operation in the f...
def binby(self, by=None, agg=None): """Return a :class:`BinBy` or :class:`DataArray` object when agg is not None The binby operations does not return a 'flat' DataFrame, instead it returns an N-d grid in the form of an xarray. :param dict, list or agg agg: Aggregate operation in the f...
[ "Return", "a", ":", "class", ":", "BinBy", "or", ":", "class", ":", "DataArray", "object", "when", "agg", "is", "not", "None" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L5260-L5277
[ "def", "binby", "(", "self", ",", "by", "=", "None", ",", "agg", "=", "None", ")", ":", "from", ".", "groupby", "import", "BinBy", "binby", "=", "BinBy", "(", "self", ",", "by", "=", "by", ")", "if", "agg", "is", "None", ":", "return", "binby", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
DataFrameArrays.add_column
Add a column to the DataFrame :param str name: name of column :param data: numpy array with the data
packages/vaex-core/vaex/dataframe.py
def add_column(self, name, data): """Add a column to the DataFrame :param str name: name of column :param data: numpy array with the data """ # assert _is_array_type_ok(data), "dtype not supported: %r, %r" % (data.dtype, data.dtype.type) # self._length = len(data) ...
def add_column(self, name, data): """Add a column to the DataFrame :param str name: name of column :param data: numpy array with the data """ # assert _is_array_type_ok(data), "dtype not supported: %r, %r" % (data.dtype, data.dtype.type) # self._length = len(data) ...
[ "Add", "a", "column", "to", "the", "DataFrame" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/dataframe.py#L5420-L5433
[ "def", "add_column", "(", "self", ",", "name", ",", "data", ")", ":", "# assert _is_array_type_ok(data), \"dtype not supported: %r, %r\" % (data.dtype, data.dtype.type)", "# self._length = len(data)", "# if self._length_unfiltered is None:", "# self._length_unfiltered = len(data)", "...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
Promise.then
This method takes two optional arguments. The first argument is used if the "self promise" is fulfilled and the other is used if the "self promise" is rejected. In either case, this method returns another promise that effectively represents the result of either the first of the second ...
packages/vaex-core/vaex/promise.py
def then(self, success=None, failure=None): """ This method takes two optional arguments. The first argument is used if the "self promise" is fulfilled and the other is used if the "self promise" is rejected. In either case, this method returns another promise that effectively ...
def then(self, success=None, failure=None): """ This method takes two optional arguments. The first argument is used if the "self promise" is fulfilled and the other is used if the "self promise" is rejected. In either case, this method returns another promise that effectively ...
[ "This", "method", "takes", "two", "optional", "arguments", ".", "The", "first", "argument", "is", "used", "if", "the", "self", "promise", "is", "fulfilled", "and", "the", "other", "is", "used", "if", "the", "self", "promise", "is", "rejected", ".", "In", ...
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/promise.py#L57-L120
[ "def", "then", "(", "self", ",", "success", "=", "None", ",", "failure", "=", "None", ")", ":", "ret", "=", "self", ".", "create_next", "(", ")", "def", "callAndFulfill", "(", "v", ")", ":", "\"\"\"\n A callback to be invoked if the \"self promise\"\n...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
patch
Adds method f to the DataFrame class
packages/vaex-viz/vaex/viz/mpl.py
def patch(f): '''Adds method f to the DataFrame class''' name = f.__name__ setattr(DataFrame, name, f) return f
def patch(f): '''Adds method f to the DataFrame class''' name = f.__name__ setattr(DataFrame, name, f) return f
[ "Adds", "method", "f", "to", "the", "DataFrame", "class" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-viz/vaex/viz/mpl.py#L21-L25
[ "def", "patch", "(", "f", ")", ":", "name", "=", "f", ".", "__name__", "setattr", "(", "DataFrame", ",", "name", ",", "f", ")", "return", "f" ]
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
plot1d
Viz data in 1d (histograms, running means etc) Example >>> df.plot1d(df.x) >>> df.plot1d(df.x, limits=[0, 100], shape=100) >>> df.plot1d(df.x, what='mean(y)', limits=[0, 100], shape=100) If you want to do a computation yourself, pass the grid argument, but you are responsible for passing the ...
packages/vaex-viz/vaex/viz/mpl.py
def plot1d(self, x=None, what="count(*)", grid=None, shape=64, facet=None, limits=None, figsize=None, f="identity", n=None, normalize_axis=None, xlabel=None, ylabel=None, label=None, selection=None, show=False, tight_layout=True, hardcopy=None, **kwargs): """Viz data in 1d (histogra...
def plot1d(self, x=None, what="count(*)", grid=None, shape=64, facet=None, limits=None, figsize=None, f="identity", n=None, normalize_axis=None, xlabel=None, ylabel=None, label=None, selection=None, show=False, tight_layout=True, hardcopy=None, **kwargs): """Viz data in 1d (histogra...
[ "Viz", "data", "in", "1d", "(", "histograms", "running", "means", "etc", ")" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-viz/vaex/viz/mpl.py#L36-L180
[ "def", "plot1d", "(", "self", ",", "x", "=", "None", ",", "what", "=", "\"count(*)\"", ",", "grid", "=", "None", ",", "shape", "=", "64", ",", "facet", "=", "None", ",", "limits", "=", "None", ",", "figsize", "=", "None", ",", "f", "=", "\"identi...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
scatter
Viz (small amounts) of data in 2d using a scatter plot Convenience wrapper around pylab.scatter when for working with small DataFrames or selections :param x: Expression for x axis :param y: Idem for y :param s_expr: When given, use if for the s (size) argument of pylab.scatter :param c_expr: When...
packages/vaex-viz/vaex/viz/mpl.py
def scatter(self, x, y, xerr=None, yerr=None, cov=None, corr=None, s_expr=None, c_expr=None, labels=None, selection=None, length_limit=50000, length_check=True, label=None, xlabel=None, ylabel=None, errorbar_kwargs={}, ellipse_kwargs={}, **kwargs): """Viz (small amounts) of data in 2d using a scatter plot ...
def scatter(self, x, y, xerr=None, yerr=None, cov=None, corr=None, s_expr=None, c_expr=None, labels=None, selection=None, length_limit=50000, length_check=True, label=None, xlabel=None, ylabel=None, errorbar_kwargs={}, ellipse_kwargs={}, **kwargs): """Viz (small amounts) of data in 2d using a scatter plot ...
[ "Viz", "(", "small", "amounts", ")", "of", "data", "in", "2d", "using", "a", "scatter", "plot" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-viz/vaex/viz/mpl.py#L188-L284
[ "def", "scatter", "(", "self", ",", "x", ",", "y", ",", "xerr", "=", "None", ",", "yerr", "=", "None", ",", "cov", "=", "None", ",", "corr", "=", "None", ",", "s_expr", "=", "None", ",", "c_expr", "=", "None", ",", "labels", "=", "None", ",", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
plot
Viz data in a 2d histogram/heatmap. Declarative plotting of statistical plots using matplotlib, supports subplots, selections, layers. Instead of passing x and y, pass a list as x argument for multiple panels. Give what a list of options to have multiple panels. When both are present then will be origaniz...
packages/vaex-viz/vaex/viz/mpl.py
def plot(self, x=None, y=None, z=None, what="count(*)", vwhat=None, reduce=["colormap"], f=None, normalize="normalize", normalize_axis="what", vmin=None, vmax=None, shape=256, vshape=32, limits=None, grid=None, colormap="afmhot", # colors=["red", "green", "blue"], figsize=None, xlab...
def plot(self, x=None, y=None, z=None, what="count(*)", vwhat=None, reduce=["colormap"], f=None, normalize="normalize", normalize_axis="what", vmin=None, vmax=None, shape=256, vshape=32, limits=None, grid=None, colormap="afmhot", # colors=["red", "green", "blue"], figsize=None, xlab...
[ "Viz", "data", "in", "a", "2d", "histogram", "/", "heatmap", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-viz/vaex/viz/mpl.py#L290-L848
[ "def", "plot", "(", "self", ",", "x", "=", "None", ",", "y", "=", "None", ",", "z", "=", "None", ",", "what", "=", "\"count(*)\"", ",", "vwhat", "=", "None", ",", "reduce", "=", "[", "\"colormap\"", "]", ",", "f", "=", "None", ",", "normalize", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
register_function
Decorator to register a new function with vaex. Example: >>> import vaex >>> df = vaex.example() >>> @vaex.register_function() >>> def invert(x): >>> return 1/x >>> df.x.invert() >>> import numpy as np >>> df = vaex.from_arrays(departure=np.arange('2015-01-01', '2015-12-05', ...
packages/vaex-core/vaex/functions.py
def register_function(scope=None, as_property=False, name=None): """Decorator to register a new function with vaex. Example: >>> import vaex >>> df = vaex.example() >>> @vaex.register_function() >>> def invert(x): >>> return 1/x >>> df.x.invert() >>> import numpy as np >>...
def register_function(scope=None, as_property=False, name=None): """Decorator to register a new function with vaex. Example: >>> import vaex >>> df = vaex.example() >>> @vaex.register_function() >>> def invert(x): >>> return 1/x >>> df.x.invert() >>> import numpy as np >>...
[ "Decorator", "to", "register", "a", "new", "function", "with", "vaex", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L19-L71
[ "def", "register_function", "(", "scope", "=", "None", ",", "as_property", "=", "False", ",", "name", "=", "None", ")", ":", "prefix", "=", "''", "if", "scope", ":", "prefix", "=", "scope", "+", "\"_\"", "if", "scope", "not", "in", "scopes", ":", "ra...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
fillna
Returns an array where missing values are replaced by value. If the dtype is object, nan values and 'nan' string values are replaced by value when fill_nan==True.
packages/vaex-core/vaex/functions.py
def fillna(ar, value, fill_nan=True, fill_masked=True): '''Returns an array where missing values are replaced by value. If the dtype is object, nan values and 'nan' string values are replaced by value when fill_nan==True. ''' ar = ar if not isinstance(ar, column.Column) else ar.to_numpy() if ar...
def fillna(ar, value, fill_nan=True, fill_masked=True): '''Returns an array where missing values are replaced by value. If the dtype is object, nan values and 'nan' string values are replaced by value when fill_nan==True. ''' ar = ar if not isinstance(ar, column.Column) else ar.to_numpy() if ar...
[ "Returns", "an", "array", "where", "missing", "values", "are", "replaced", "by", "value", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L122-L144
[ "def", "fillna", "(", "ar", ",", "value", ",", "fill_nan", "=", "True", ",", "fill_masked", "=", "True", ")", ":", "ar", "=", "ar", "if", "not", "isinstance", "(", "ar", ",", "column", ".", "Column", ")", "else", "ar", ".", "to_numpy", "(", ")", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
dt_dayofweek
Obtain the day of the week with Monday=0 and Sunday=6 :returns: an expression containing the day of week. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.datetime64) >>> df = vaex.from_arrays(d...
packages/vaex-core/vaex/functions.py
def dt_dayofweek(x): """Obtain the day of the week with Monday=0 and Sunday=6 :returns: an expression containing the day of week. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.datetime64) ...
def dt_dayofweek(x): """Obtain the day of the week with Monday=0 and Sunday=6 :returns: an expression containing the day of week. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.datetime64) ...
[ "Obtain", "the", "day", "of", "the", "week", "with", "Monday", "=", "0", "and", "Sunday", "=", "6" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L160-L186
[ "def", "dt_dayofweek", "(", "x", ")", ":", "import", "pandas", "as", "pd", "return", "pd", ".", "Series", "(", "x", ")", ".", "dt", ".", "dayofweek", ".", "values" ]
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
dt_dayofyear
The ordinal day of the year. :returns: an expression containing the ordinal day of the year. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.datetime64) >>> df = vaex.from_arrays(date=date) ...
packages/vaex-core/vaex/functions.py
def dt_dayofyear(x): """The ordinal day of the year. :returns: an expression containing the ordinal day of the year. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.datetime64) >>> df = vae...
def dt_dayofyear(x): """The ordinal day of the year. :returns: an expression containing the ordinal day of the year. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.datetime64) >>> df = vae...
[ "The", "ordinal", "day", "of", "the", "year", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L189-L215
[ "def", "dt_dayofyear", "(", "x", ")", ":", "import", "pandas", "as", "pd", "return", "pd", ".", "Series", "(", "x", ")", ".", "dt", ".", "dayofyear", ".", "values" ]
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
dt_is_leap_year
Check whether a year is a leap year. :returns: an expression which evaluates to True if a year is a leap year, and to False otherwise. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.datetime64) ...
packages/vaex-core/vaex/functions.py
def dt_is_leap_year(x): """Check whether a year is a leap year. :returns: an expression which evaluates to True if a year is a leap year, and to False otherwise. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:3...
def dt_is_leap_year(x): """Check whether a year is a leap year. :returns: an expression which evaluates to True if a year is a leap year, and to False otherwise. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:3...
[ "Check", "whether", "a", "year", "is", "a", "leap", "year", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L218-L244
[ "def", "dt_is_leap_year", "(", "x", ")", ":", "import", "pandas", "as", "pd", "return", "pd", ".", "Series", "(", "x", ")", ".", "dt", ".", "is_leap_year", ".", "values" ]
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
dt_year
Extracts the year out of a datetime sample. :returns: an expression containing the year extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.datetime64) >>> df = va...
packages/vaex-core/vaex/functions.py
def dt_year(x): """Extracts the year out of a datetime sample. :returns: an expression containing the year extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.date...
def dt_year(x): """Extracts the year out of a datetime sample. :returns: an expression containing the year extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.date...
[ "Extracts", "the", "year", "out", "of", "a", "datetime", "sample", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L247-L273
[ "def", "dt_year", "(", "x", ")", ":", "import", "pandas", "as", "pd", "return", "pd", ".", "Series", "(", "x", ")", ".", "dt", ".", "year", ".", "values" ]
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
dt_month
Extracts the month out of a datetime sample. :returns: an expression containing the month extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.datetime64) >>> df = ...
packages/vaex-core/vaex/functions.py
def dt_month(x): """Extracts the month out of a datetime sample. :returns: an expression containing the month extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.d...
def dt_month(x): """Extracts the month out of a datetime sample. :returns: an expression containing the month extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.d...
[ "Extracts", "the", "month", "out", "of", "a", "datetime", "sample", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L276-L302
[ "def", "dt_month", "(", "x", ")", ":", "import", "pandas", "as", "pd", "return", "pd", ".", "Series", "(", "x", ")", ".", "dt", ".", "month", ".", "values" ]
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
dt_month_name
Returns the month names of a datetime sample in English. :returns: an expression containing the month names extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.datetim...
packages/vaex-core/vaex/functions.py
def dt_month_name(x): """Returns the month names of a datetime sample in English. :returns: an expression containing the month names extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12...
def dt_month_name(x): """Returns the month names of a datetime sample in English. :returns: an expression containing the month names extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12...
[ "Returns", "the", "month", "names", "of", "a", "datetime", "sample", "in", "English", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L305-L331
[ "def", "dt_month_name", "(", "x", ")", ":", "import", "pandas", "as", "pd", "return", "pd", ".", "Series", "(", "_pandas_dt_fix", "(", "x", ")", ")", ".", "dt", ".", "month_name", "(", ")", ".", "values", ".", "astype", "(", "str", ")" ]
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
dt_day
Extracts the day from a datetime sample. :returns: an expression containing the day extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.datetime64) >>> df = vaex.f...
packages/vaex-core/vaex/functions.py
def dt_day(x): """Extracts the day from a datetime sample. :returns: an expression containing the day extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.datetime6...
def dt_day(x): """Extracts the day from a datetime sample. :returns: an expression containing the day extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.datetime6...
[ "Extracts", "the", "day", "from", "a", "datetime", "sample", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L334-L360
[ "def", "dt_day", "(", "x", ")", ":", "import", "pandas", "as", "pd", "return", "pd", ".", "Series", "(", "x", ")", ".", "dt", ".", "day", ".", "values" ]
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
dt_day_name
Returns the day names of a datetime sample in English. :returns: an expression containing the day names extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.datetime64)...
packages/vaex-core/vaex/functions.py
def dt_day_name(x): """Returns the day names of a datetime sample in English. :returns: an expression containing the day names extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34...
def dt_day_name(x): """Returns the day names of a datetime sample in English. :returns: an expression containing the day names extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34...
[ "Returns", "the", "day", "names", "of", "a", "datetime", "sample", "in", "English", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L363-L389
[ "def", "dt_day_name", "(", "x", ")", ":", "import", "pandas", "as", "pd", "return", "pd", ".", "Series", "(", "_pandas_dt_fix", "(", "x", ")", ")", ".", "dt", ".", "day_name", "(", ")", ".", "values", ".", "astype", "(", "str", ")" ]
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
dt_weekofyear
Returns the week ordinal of the year. :returns: an expression containing the week ordinal of the year, extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.datetime64) ...
packages/vaex-core/vaex/functions.py
def dt_weekofyear(x): """Returns the week ordinal of the year. :returns: an expression containing the week ordinal of the year, extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:3...
def dt_weekofyear(x): """Returns the week ordinal of the year. :returns: an expression containing the week ordinal of the year, extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:3...
[ "Returns", "the", "week", "ordinal", "of", "the", "year", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L392-L418
[ "def", "dt_weekofyear", "(", "x", ")", ":", "import", "pandas", "as", "pd", "return", "pd", ".", "Series", "(", "x", ")", ".", "dt", ".", "weekofyear", ".", "values" ]
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
dt_hour
Extracts the hour out of a datetime samples. :returns: an expression containing the hour extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.datetime64) >>> df = v...
packages/vaex-core/vaex/functions.py
def dt_hour(x): """Extracts the hour out of a datetime samples. :returns: an expression containing the hour extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.dat...
def dt_hour(x): """Extracts the hour out of a datetime samples. :returns: an expression containing the hour extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.dat...
[ "Extracts", "the", "hour", "out", "of", "a", "datetime", "samples", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L421-L447
[ "def", "dt_hour", "(", "x", ")", ":", "import", "pandas", "as", "pd", "return", "pd", ".", "Series", "(", "x", ")", ".", "dt", ".", "hour", ".", "values" ]
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
dt_minute
Extracts the minute out of a datetime samples. :returns: an expression containing the minute extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.datetime64) >>> df...
packages/vaex-core/vaex/functions.py
def dt_minute(x): """Extracts the minute out of a datetime samples. :returns: an expression containing the minute extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=...
def dt_minute(x): """Extracts the minute out of a datetime samples. :returns: an expression containing the minute extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=...
[ "Extracts", "the", "minute", "out", "of", "a", "datetime", "samples", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L450-L476
[ "def", "dt_minute", "(", "x", ")", ":", "import", "pandas", "as", "pd", "return", "pd", ".", "Series", "(", "x", ")", ".", "dt", ".", "minute", ".", "values" ]
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
dt_second
Extracts the second out of a datetime samples. :returns: an expression containing the second extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=np.datetime64) >>> df...
packages/vaex-core/vaex/functions.py
def dt_second(x): """Extracts the second out of a datetime samples. :returns: an expression containing the second extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=...
def dt_second(x): """Extracts the second out of a datetime samples. :returns: an expression containing the second extracted from a datetime column. Example: >>> import vaex >>> import numpy as np >>> date = np.array(['2009-10-12T03:31:00', '2016-02-11T10:17:34', '2015-11-12T11:34:22'], dtype=...
[ "Extracts", "the", "second", "out", "of", "a", "datetime", "samples", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L479-L505
[ "def", "dt_second", "(", "x", ")", ":", "import", "pandas", "as", "pd", "return", "pd", ".", "Series", "(", "x", ")", ".", "dt", ".", "second", ".", "values" ]
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
str_capitalize
Capitalize the first letter of a string sample. :returns: an expression containing the capitalized strings. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] >>> df = vaex.from_arrays(text=text) >>> df # text 0 Something 1 very p...
packages/vaex-core/vaex/functions.py
def str_capitalize(x): """Capitalize the first letter of a string sample. :returns: an expression containing the capitalized strings. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] >>> df = vaex.from_arrays(text=text) >>> df # text ...
def str_capitalize(x): """Capitalize the first letter of a string sample. :returns: an expression containing the capitalized strings. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] >>> df = vaex.from_arrays(text=text) >>> df # text ...
[ "Capitalize", "the", "first", "letter", "of", "a", "string", "sample", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L511-L540
[ "def", "str_capitalize", "(", "x", ")", ":", "sl", "=", "_to_string_sequence", "(", "x", ")", ".", "capitalize", "(", ")", "return", "column", ".", "ColumnStringArrow", "(", "sl", ".", "bytes", ",", "sl", ".", "indices", ",", "sl", ".", "length", ",", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
str_cat
Concatenate two string columns on a row-by-row basis. :param expression other: The expression of the other column to be concatenated. :returns: an expression containing the concatenated columns. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] >>> d...
packages/vaex-core/vaex/functions.py
def str_cat(x, other): """Concatenate two string columns on a row-by-row basis. :param expression other: The expression of the other column to be concatenated. :returns: an expression containing the concatenated columns. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is com...
def str_cat(x, other): """Concatenate two string columns on a row-by-row basis. :param expression other: The expression of the other column to be concatenated. :returns: an expression containing the concatenated columns. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is com...
[ "Concatenate", "two", "string", "columns", "on", "a", "row", "-", "by", "-", "row", "basis", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L543-L575
[ "def", "str_cat", "(", "x", ",", "other", ")", ":", "sl1", "=", "_to_string_sequence", "(", "x", ")", "sl2", "=", "_to_string_sequence", "(", "other", ")", "sl", "=", "sl1", ".", "concat", "(", "sl2", ")", "return", "column", ".", "ColumnStringArrow", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
str_contains
Check if a string pattern or regex is contained within a sample of a string column. :param str pattern: A string or regex pattern :param bool regex: If True, :returns: an expression which is evaluated to True if the pattern is found in a given sample, and it is False otherwise. Example: >>> impor...
packages/vaex-core/vaex/functions.py
def str_contains(x, pattern, regex=True): """Check if a string pattern or regex is contained within a sample of a string column. :param str pattern: A string or regex pattern :param bool regex: If True, :returns: an expression which is evaluated to True if the pattern is found in a given sample, and it...
def str_contains(x, pattern, regex=True): """Check if a string pattern or regex is contained within a sample of a string column. :param str pattern: A string or regex pattern :param bool regex: If True, :returns: an expression which is evaluated to True if the pattern is found in a given sample, and it...
[ "Check", "if", "a", "string", "pattern", "or", "regex", "is", "contained", "within", "a", "sample", "of", "a", "string", "column", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L612-L642
[ "def", "str_contains", "(", "x", ",", "pattern", ",", "regex", "=", "True", ")", ":", "return", "_to_string_sequence", "(", "x", ")", ".", "search", "(", "pattern", ",", "regex", ")" ]
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
str_count
Count the occurences of a pattern in sample of a string column. :param str pat: A string or regex pattern :param bool regex: If True, :returns: an expression containing the number of times a pattern is found in each sample. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is ...
packages/vaex-core/vaex/functions.py
def str_count(x, pat, regex=False): """Count the occurences of a pattern in sample of a string column. :param str pat: A string or regex pattern :param bool regex: If True, :returns: an expression containing the number of times a pattern is found in each sample. Example: >>> import vaex >...
def str_count(x, pat, regex=False): """Count the occurences of a pattern in sample of a string column. :param str pat: A string or regex pattern :param bool regex: If True, :returns: an expression containing the number of times a pattern is found in each sample. Example: >>> import vaex >...
[ "Count", "the", "occurences", "of", "a", "pattern", "in", "sample", "of", "a", "string", "column", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L646-L676
[ "def", "str_count", "(", "x", ",", "pat", ",", "regex", "=", "False", ")", ":", "return", "_to_string_sequence", "(", "x", ")", ".", "count", "(", "pat", ",", "regex", ")" ]
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
str_find
Returns the lowest indices in each string in a column, where the provided substring is fully contained between within a sample. If the substring is not found, -1 is returned. :param str sub: A substring to be found in the samples :param int start: :param int end: :returns: an expression containing ...
packages/vaex-core/vaex/functions.py
def str_find(x, sub, start=0, end=None): """Returns the lowest indices in each string in a column, where the provided substring is fully contained between within a sample. If the substring is not found, -1 is returned. :param str sub: A substring to be found in the samples :param int start: :param ...
def str_find(x, sub, start=0, end=None): """Returns the lowest indices in each string in a column, where the provided substring is fully contained between within a sample. If the substring is not found, -1 is returned. :param str sub: A substring to be found in the samples :param int start: :param ...
[ "Returns", "the", "lowest", "indices", "in", "each", "string", "in", "a", "column", "where", "the", "provided", "substring", "is", "fully", "contained", "between", "within", "a", "sample", ".", "If", "the", "substring", "is", "not", "found", "-", "1", "is"...
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L731-L763
[ "def", "str_find", "(", "x", ",", "sub", ",", "start", "=", "0", ",", "end", "=", "None", ")", ":", "return", "_to_string_sequence", "(", "x", ")", ".", "find", "(", "sub", ",", "start", ",", "0", "if", "end", "is", "None", "else", "end", ",", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
str_get
Extract a character from each sample at the specified position from a string column. Note that if the specified position is out of bound of the string sample, this method returns '', while pandas retunrs nan. :param int i: The index location, at which to extract the character. :returns: an expression conta...
packages/vaex-core/vaex/functions.py
def str_get(x, i): """Extract a character from each sample at the specified position from a string column. Note that if the specified position is out of bound of the string sample, this method returns '', while pandas retunrs nan. :param int i: The index location, at which to extract the character. :re...
def str_get(x, i): """Extract a character from each sample at the specified position from a string column. Note that if the specified position is out of bound of the string sample, this method returns '', while pandas retunrs nan. :param int i: The index location, at which to extract the character. :re...
[ "Extract", "a", "character", "from", "each", "sample", "at", "the", "specified", "position", "from", "a", "string", "column", ".", "Note", "that", "if", "the", "specified", "position", "is", "out", "of", "bound", "of", "the", "string", "sample", "this", "m...
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L770-L805
[ "def", "str_get", "(", "x", ",", "i", ")", ":", "x", "=", "_to_string_sequence", "(", "x", ")", "if", "i", "==", "-", "1", ":", "sl", "=", "x", ".", "slice_string_end", "(", "-", "1", ")", "else", ":", "sl", "=", "x", ".", "slice_string", "(", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
str_index
Returns the lowest indices in each string in a column, where the provided substring is fully contained between within a sample. If the substring is not found, -1 is returned. It is the same as `str.find`. :param str sub: A substring to be found in the samples :param int start: :param int end: :retu...
packages/vaex-core/vaex/functions.py
def str_index(x, sub, start=0, end=None): """Returns the lowest indices in each string in a column, where the provided substring is fully contained between within a sample. If the substring is not found, -1 is returned. It is the same as `str.find`. :param str sub: A substring to be found in the samples ...
def str_index(x, sub, start=0, end=None): """Returns the lowest indices in each string in a column, where the provided substring is fully contained between within a sample. If the substring is not found, -1 is returned. It is the same as `str.find`. :param str sub: A substring to be found in the samples ...
[ "Returns", "the", "lowest", "indices", "in", "each", "string", "in", "a", "column", "where", "the", "provided", "substring", "is", "fully", "contained", "between", "within", "a", "sample", ".", "If", "the", "substring", "is", "not", "found", "-", "1", "is"...
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L808-L840
[ "def", "str_index", "(", "x", ",", "sub", ",", "start", "=", "0", ",", "end", "=", "None", ")", ":", "return", "str_find", "(", "x", ",", "sub", ",", "start", ",", "end", ")" ]
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
str_join
Same as find (difference with pandas is that it does not raise a ValueError)
packages/vaex-core/vaex/functions.py
def str_join(x, sep): """Same as find (difference with pandas is that it does not raise a ValueError)""" sl = _to_string_list_sequence(x).join(sep) return column.ColumnStringArrow(sl.bytes, sl.indices, sl.length, sl.offset, string_sequence=sl)
def str_join(x, sep): """Same as find (difference with pandas is that it does not raise a ValueError)""" sl = _to_string_list_sequence(x).join(sep) return column.ColumnStringArrow(sl.bytes, sl.indices, sl.length, sl.offset, string_sequence=sl)
[ "Same", "as", "find", "(", "difference", "with", "pandas", "is", "that", "it", "does", "not", "raise", "a", "ValueError", ")" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L843-L846
[ "def", "str_join", "(", "x", ",", "sep", ")", ":", "sl", "=", "_to_string_list_sequence", "(", "x", ")", ".", "join", "(", "sep", ")", "return", "column", ".", "ColumnStringArrow", "(", "sl", ".", "bytes", ",", "sl", ".", "indices", ",", "sl", ".", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
str_lower
Converts string samples to lower case. :returns: an expression containing the converted strings. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] >>> df = vaex.from_arrays(text=text) >>> df # text 0 Something 1 very pretty ...
packages/vaex-core/vaex/functions.py
def str_lower(x): """Converts string samples to lower case. :returns: an expression containing the converted strings. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] >>> df = vaex.from_arrays(text=text) >>> df # text 0 Something ...
def str_lower(x): """Converts string samples to lower case. :returns: an expression containing the converted strings. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] >>> df = vaex.from_arrays(text=text) >>> df # text 0 Something ...
[ "Converts", "string", "samples", "to", "lower", "case", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L945-L974
[ "def", "str_lower", "(", "x", ")", ":", "sl", "=", "_to_string_sequence", "(", "x", ")", ".", "lower", "(", ")", "return", "column", ".", "ColumnStringArrow", "(", "sl", ".", "bytes", ",", "sl", ".", "indices", ",", "sl", ".", "length", ",", "sl", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
str_lstrip
Remove leading characters from a string sample. :param str to_strip: The string to be removed :returns: an expression containing the modified string column. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] >>> df = vaex.from_arrays(text=text) >>...
packages/vaex-core/vaex/functions.py
def str_lstrip(x, to_strip=None): """Remove leading characters from a string sample. :param str to_strip: The string to be removed :returns: an expression containing the modified string column. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] >>...
def str_lstrip(x, to_strip=None): """Remove leading characters from a string sample. :param str to_strip: The string to be removed :returns: an expression containing the modified string column. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] >>...
[ "Remove", "leading", "characters", "from", "a", "string", "sample", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L977-L1008
[ "def", "str_lstrip", "(", "x", ",", "to_strip", "=", "None", ")", ":", "# in c++ we give empty string the same meaning as None", "sl", "=", "_to_string_sequence", "(", "x", ")", ".", "lstrip", "(", "''", "if", "to_strip", "is", "None", "else", "to_strip", ")", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
str_pad
Pad strings in a given column. :param int width: The total width of the string :param str side: If 'left' than pad on the left, if 'right' than pad on the right side the string. :param str fillchar: The character used for padding. :returns: an expression containing the padded strings. Example: ...
packages/vaex-core/vaex/functions.py
def str_pad(x, width, side='left', fillchar=' '): """Pad strings in a given column. :param int width: The total width of the string :param str side: If 'left' than pad on the left, if 'right' than pad on the right side the string. :param str fillchar: The character used for padding. :returns: an ex...
def str_pad(x, width, side='left', fillchar=' '): """Pad strings in a given column. :param int width: The total width of the string :param str side: If 'left' than pad on the left, if 'right' than pad on the right side the string. :param str fillchar: The character used for padding. :returns: an ex...
[ "Pad", "strings", "in", "a", "given", "column", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L1045-L1077
[ "def", "str_pad", "(", "x", ",", "width", ",", "side", "=", "'left'", ",", "fillchar", "=", "' '", ")", ":", "sl", "=", "_to_string_sequence", "(", "x", ")", ".", "pad", "(", "width", ",", "fillchar", ",", "side", "in", "[", "'left'", ",", "'both'"...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
str_repeat
Duplicate each string in a column. :param int repeats: number of times each string sample is to be duplicated. :returns: an expression containing the duplicated strings Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] >>> df = vaex.from_arrays(text=...
packages/vaex-core/vaex/functions.py
def str_repeat(x, repeats): """Duplicate each string in a column. :param int repeats: number of times each string sample is to be duplicated. :returns: an expression containing the duplicated strings Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] ...
def str_repeat(x, repeats): """Duplicate each string in a column. :param int repeats: number of times each string sample is to be duplicated. :returns: an expression containing the duplicated strings Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] ...
[ "Duplicate", "each", "string", "in", "a", "column", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L1080-L1110
[ "def", "str_repeat", "(", "x", ",", "repeats", ")", ":", "sl", "=", "_to_string_sequence", "(", "x", ")", ".", "repeat", "(", "repeats", ")", "return", "column", ".", "ColumnStringArrow", "(", "sl", ".", "bytes", ",", "sl", ".", "indices", ",", "sl", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
str_replace
Replace occurences of a pattern/regex in a column with some other string. :param str pattern: string or a regex pattern :param str replace: a replacement string :param int n: number of replacements to be made from the start. If -1 make all replacements. :param int flags: ?? :param bool regex: If Tr...
packages/vaex-core/vaex/functions.py
def str_replace(x, pat, repl, n=-1, flags=0, regex=False): """Replace occurences of a pattern/regex in a column with some other string. :param str pattern: string or a regex pattern :param str replace: a replacement string :param int n: number of replacements to be made from the start. If -1 make all r...
def str_replace(x, pat, repl, n=-1, flags=0, regex=False): """Replace occurences of a pattern/regex in a column with some other string. :param str pattern: string or a regex pattern :param str replace: a replacement string :param int n: number of replacements to be made from the start. If -1 make all r...
[ "Replace", "occurences", "of", "a", "pattern", "/", "regex", "in", "a", "column", "with", "some", "other", "string", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L1113-L1147
[ "def", "str_replace", "(", "x", ",", "pat", ",", "repl", ",", "n", "=", "-", "1", ",", "flags", "=", "0", ",", "regex", "=", "False", ")", ":", "sl", "=", "_to_string_sequence", "(", "x", ")", ".", "replace", "(", "pat", ",", "repl", ",", "n", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
str_rfind
Returns the highest indices in each string in a column, where the provided substring is fully contained between within a sample. If the substring is not found, -1 is returned. :param str sub: A substring to be found in the samples :param int start: :param int end: :returns: an expression containing...
packages/vaex-core/vaex/functions.py
def str_rfind(x, sub, start=0, end=None): """Returns the highest indices in each string in a column, where the provided substring is fully contained between within a sample. If the substring is not found, -1 is returned. :param str sub: A substring to be found in the samples :param int start: :para...
def str_rfind(x, sub, start=0, end=None): """Returns the highest indices in each string in a column, where the provided substring is fully contained between within a sample. If the substring is not found, -1 is returned. :param str sub: A substring to be found in the samples :param int start: :para...
[ "Returns", "the", "highest", "indices", "in", "each", "string", "in", "a", "column", "where", "the", "provided", "substring", "is", "fully", "contained", "between", "within", "a", "sample", ".", "If", "the", "substring", "is", "not", "found", "-", "1", "is...
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L1150-L1182
[ "def", "str_rfind", "(", "x", ",", "sub", ",", "start", "=", "0", ",", "end", "=", "None", ")", ":", "return", "_to_string_sequence", "(", "x", ")", ".", "find", "(", "sub", ",", "start", ",", "0", "if", "end", "is", "None", "else", "end", ",", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
str_rindex
Returns the highest indices in each string in a column, where the provided substring is fully contained between within a sample. If the substring is not found, -1 is returned. Same as `str.rfind`. :param str sub: A substring to be found in the samples :param int start: :param int end: :returns: an ...
packages/vaex-core/vaex/functions.py
def str_rindex(x, sub, start=0, end=None): """Returns the highest indices in each string in a column, where the provided substring is fully contained between within a sample. If the substring is not found, -1 is returned. Same as `str.rfind`. :param str sub: A substring to be found in the samples :para...
def str_rindex(x, sub, start=0, end=None): """Returns the highest indices in each string in a column, where the provided substring is fully contained between within a sample. If the substring is not found, -1 is returned. Same as `str.rfind`. :param str sub: A substring to be found in the samples :para...
[ "Returns", "the", "highest", "indices", "in", "each", "string", "in", "a", "column", "where", "the", "provided", "substring", "is", "fully", "contained", "between", "within", "a", "sample", ".", "If", "the", "substring", "is", "not", "found", "-", "1", "is...
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L1185-L1217
[ "def", "str_rindex", "(", "x", ",", "sub", ",", "start", "=", "0", ",", "end", "=", "None", ")", ":", "return", "str_rfind", "(", "x", ",", "sub", ",", "start", ",", "end", ")" ]
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
str_rjust
Fills the left side of string samples with a specified character such that the strings are left-hand justified. :param int width: The minimal width of the strings. :param str fillchar: The character used for filling. :returns: an expression containing the filled strings. Example: >>> import vaex ...
packages/vaex-core/vaex/functions.py
def str_rjust(x, width, fillchar=' '): """Fills the left side of string samples with a specified character such that the strings are left-hand justified. :param int width: The minimal width of the strings. :param str fillchar: The character used for filling. :returns: an expression containing the fille...
def str_rjust(x, width, fillchar=' '): """Fills the left side of string samples with a specified character such that the strings are left-hand justified. :param int width: The minimal width of the strings. :param str fillchar: The character used for filling. :returns: an expression containing the fille...
[ "Fills", "the", "left", "side", "of", "string", "samples", "with", "a", "specified", "character", "such", "that", "the", "strings", "are", "left", "-", "hand", "justified", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L1220-L1251
[ "def", "str_rjust", "(", "x", ",", "width", ",", "fillchar", "=", "' '", ")", ":", "sl", "=", "_to_string_sequence", "(", "x", ")", ".", "pad", "(", "width", ",", "fillchar", ",", "True", ",", "False", ")", "return", "column", ".", "ColumnStringArrow",...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
str_rstrip
Remove trailing characters from a string sample. :param str to_strip: The string to be removed :returns: an expression containing the modified string column. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] >>> df = vaex.from_arrays(text=text) >...
packages/vaex-core/vaex/functions.py
def str_rstrip(x, to_strip=None): """Remove trailing characters from a string sample. :param str to_strip: The string to be removed :returns: an expression containing the modified string column. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] >...
def str_rstrip(x, to_strip=None): """Remove trailing characters from a string sample. :param str to_strip: The string to be removed :returns: an expression containing the modified string column. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] >...
[ "Remove", "trailing", "characters", "from", "a", "string", "sample", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L1256-L1287
[ "def", "str_rstrip", "(", "x", ",", "to_strip", "=", "None", ")", ":", "# in c++ we give empty string the same meaning as None", "sl", "=", "_to_string_sequence", "(", "x", ")", ".", "rstrip", "(", "''", "if", "to_strip", "is", "None", "else", "to_strip", ")", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
str_slice
Slice substrings from each string element in a column. :param int start: The start position for the slice operation. :param int end: The stop position for the slice operation. :returns: an expression containing the sliced substrings. Example: >>> import vaex >>> text = ['Something', 'very pre...
packages/vaex-core/vaex/functions.py
def str_slice(x, start=0, stop=None): # TODO: support n """Slice substrings from each string element in a column. :param int start: The start position for the slice operation. :param int end: The stop position for the slice operation. :returns: an expression containing the sliced substrings. Exam...
def str_slice(x, start=0, stop=None): # TODO: support n """Slice substrings from each string element in a column. :param int start: The start position for the slice operation. :param int end: The stop position for the slice operation. :returns: an expression containing the sliced substrings. Exam...
[ "Slice", "substrings", "from", "each", "string", "element", "in", "a", "column", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L1290-L1324
[ "def", "str_slice", "(", "x", ",", "start", "=", "0", ",", "stop", "=", "None", ")", ":", "# TODO: support n", "if", "stop", "is", "None", ":", "sll", "=", "_to_string_sequence", "(", "x", ")", ".", "slice_string_end", "(", "start", ")", "else", ":", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
str_strip
Removes leading and trailing characters. Strips whitespaces (including new lines), or a set of specified characters from each string saple in a column, both from the left right sides. :param str to_strip: The characters to be removed. All combinations of the characters will be removed. ...
packages/vaex-core/vaex/functions.py
def str_strip(x, to_strip=None): """Removes leading and trailing characters. Strips whitespaces (including new lines), or a set of specified characters from each string saple in a column, both from the left right sides. :param str to_strip: The characters to be removed. All combinations of the cha...
def str_strip(x, to_strip=None): """Removes leading and trailing characters. Strips whitespaces (including new lines), or a set of specified characters from each string saple in a column, both from the left right sides. :param str to_strip: The characters to be removed. All combinations of the cha...
[ "Removes", "leading", "and", "trailing", "characters", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L1371-L1407
[ "def", "str_strip", "(", "x", ",", "to_strip", "=", "None", ")", ":", "# in c++ we give empty string the same meaning as None", "sl", "=", "_to_string_sequence", "(", "x", ")", ".", "strip", "(", "''", "if", "to_strip", "is", "None", "else", "to_strip", ")", "...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
str_title
Converts all string samples to titlecase. :returns: an expression containing the converted strings. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] >>> df = vaex.from_arrays(text=text) >>> df # text 0 Something 1 very pretty ...
packages/vaex-core/vaex/functions.py
def str_title(x): """Converts all string samples to titlecase. :returns: an expression containing the converted strings. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] >>> df = vaex.from_arrays(text=text) >>> df # text 0 Somethin...
def str_title(x): """Converts all string samples to titlecase. :returns: an expression containing the converted strings. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] >>> df = vaex.from_arrays(text=text) >>> df # text 0 Somethin...
[ "Converts", "all", "string", "samples", "to", "titlecase", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L1412-L1441
[ "def", "str_title", "(", "x", ")", ":", "sl", "=", "_to_string_sequence", "(", "x", ")", ".", "title", "(", ")", "return", "column", ".", "ColumnStringArrow", "(", "sl", ".", "bytes", ",", "sl", ".", "indices", ",", "sl", ".", "length", ",", "sl", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
str_upper
Converts all strings in a column to uppercase. :returns: an expression containing the converted strings. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] >>> df = vaex.from_arrays(text=text) >>> df # text 0 Something 1 very pret...
packages/vaex-core/vaex/functions.py
def str_upper(x): """Converts all strings in a column to uppercase. :returns: an expression containing the converted strings. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] >>> df = vaex.from_arrays(text=text) >>> df # text 0 Som...
def str_upper(x): """Converts all strings in a column to uppercase. :returns: an expression containing the converted strings. Example: >>> import vaex >>> text = ['Something', 'very pretty', 'is coming', 'our', 'way.'] >>> df = vaex.from_arrays(text=text) >>> df # text 0 Som...
[ "Converts", "all", "strings", "in", "a", "column", "to", "uppercase", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L1445-L1476
[ "def", "str_upper", "(", "x", ")", ":", "sl", "=", "_to_string_sequence", "(", "x", ")", ".", "upper", "(", ")", "return", "column", ".", "ColumnStringArrow", "(", "sl", ".", "bytes", ",", "sl", ".", "indices", ",", "sl", ".", "length", ",", "sl", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
format
Uses http://www.cplusplus.com/reference/string/to_string/ for formatting
packages/vaex-core/vaex/functions.py
def format(x, format): """Uses http://www.cplusplus.com/reference/string/to_string/ for formatting""" # don't change the dtype, otherwise for each block the dtype may be different (string length) sl = vaex.strings.format(x, format) return column.ColumnStringArrow(sl.bytes, sl.indices, sl.length, sl.offs...
def format(x, format): """Uses http://www.cplusplus.com/reference/string/to_string/ for formatting""" # don't change the dtype, otherwise for each block the dtype may be different (string length) sl = vaex.strings.format(x, format) return column.ColumnStringArrow(sl.bytes, sl.indices, sl.length, sl.offs...
[ "Uses", "http", ":", "//", "www", ".", "cplusplus", ".", "com", "/", "reference", "/", "string", "/", "to_string", "/", "for", "formatting" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/functions.py#L1720-L1724
[ "def", "format", "(", "x", ",", "format", ")", ":", "# don't change the dtype, otherwise for each block the dtype may be different (string length)", "sl", "=", "vaex", ".", "strings", ".", "format", "(", "x", ",", "format", ")", "return", "column", ".", "ColumnStringA...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
Hdf5MemoryMapped.write_meta
ucds, descriptions and units are written as attributes in the hdf5 file, instead of a seperate file as the default :func:`Dataset.write_meta`.
packages/vaex-hdf5/vaex/hdf5/dataset.py
def write_meta(self): """ucds, descriptions and units are written as attributes in the hdf5 file, instead of a seperate file as the default :func:`Dataset.write_meta`. """ with h5py.File(self.filename, "r+") as h5file_output: h5table_root = h5file_output[self.h5table_root_n...
def write_meta(self): """ucds, descriptions and units are written as attributes in the hdf5 file, instead of a seperate file as the default :func:`Dataset.write_meta`. """ with h5py.File(self.filename, "r+") as h5file_output: h5table_root = h5file_output[self.h5table_root_n...
[ "ucds", "descriptions", "and", "units", "are", "written", "as", "attributes", "in", "the", "hdf5", "file", "instead", "of", "a", "seperate", "file", "as", "the", "default", ":", "func", ":", "Dataset", ".", "write_meta", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-hdf5/vaex/hdf5/dataset.py#L70-L98
[ "def", "write_meta", "(", "self", ")", ":", "with", "h5py", ".", "File", "(", "self", ".", "filename", ",", "\"r+\"", ")", "as", "h5file_output", ":", "h5table_root", "=", "h5file_output", "[", "self", ".", "h5table_root_name", "]", "if", "self", ".", "d...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
Hdf5MemoryMapped.create
Create a new (empty) hdf5 file with columns given by column names, of length N Optionally, numpy dtypes can be passed, default is floats
packages/vaex-hdf5/vaex/hdf5/dataset.py
def create(cls, path, N, column_names, dtypes=None, write=True): """Create a new (empty) hdf5 file with columns given by column names, of length N Optionally, numpy dtypes can be passed, default is floats """ dtypes = dtypes or [np.float] * len(column_names) if N == 0: ...
def create(cls, path, N, column_names, dtypes=None, write=True): """Create a new (empty) hdf5 file with columns given by column names, of length N Optionally, numpy dtypes can be passed, default is floats """ dtypes = dtypes or [np.float] * len(column_names) if N == 0: ...
[ "Create", "a", "new", "(", "empty", ")", "hdf5", "file", "with", "columns", "given", "by", "column", "names", "of", "length", "N" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-hdf5/vaex/hdf5/dataset.py#L101-L122
[ "def", "create", "(", "cls", ",", "path", ",", "N", ",", "column_names", ",", "dtypes", "=", "None", ",", "write", "=", "True", ")", ":", "dtypes", "=", "dtypes", "or", "[", "np", ".", "float", "]", "*", "len", "(", "column_names", ")", "if", "N"...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
readcol
The default return is a two dimensional float array. If you want a list of columns output instead of a 2D array, pass 'twod=False'. In this case, each column's data type will be automatically detected. Example usage: CASE 1) a table has the format: X Y Z 0.0 2.4 8.2 1.0 3.4 ...
packages/vaex-core/vaex/ext/readcol.py
def readcol(filename,skipline=0,skipafter=0,names=False,fsep=None,twod=True, fixedformat=None,asdict=False,comment='#',verbose=True,nullval=None, asStruct=False,namecomment=True,removeblanks=False,header_badchars=None, asRecArray=False): """ The default return is a two dimensional float ...
def readcol(filename,skipline=0,skipafter=0,names=False,fsep=None,twod=True, fixedformat=None,asdict=False,comment='#',verbose=True,nullval=None, asStruct=False,namecomment=True,removeblanks=False,header_badchars=None, asRecArray=False): """ The default return is a two dimensional float ...
[ "The", "default", "return", "is", "a", "two", "dimensional", "float", "array", ".", "If", "you", "want", "a", "list", "of", "columns", "output", "instead", "of", "a", "2D", "array", "pass", "twod", "=", "False", ".", "In", "this", "case", "each", "colu...
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/ext/readcol.py#L45-L221
[ "def", "readcol", "(", "filename", ",", "skipline", "=", "0", ",", "skipafter", "=", "0", ",", "names", "=", "False", ",", "fsep", "=", "None", ",", "twod", "=", "True", ",", "fixedformat", "=", "None", ",", "asdict", "=", "False", ",", "comment", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
get_autotype
Attempts to return a numpy array converted to the most sensible dtype Value errors will be caught and simply return the original array Tries to make dtype int, then float, then no change
packages/vaex-core/vaex/ext/readcol.py
def get_autotype(arr): """ Attempts to return a numpy array converted to the most sensible dtype Value errors will be caught and simply return the original array Tries to make dtype int, then float, then no change """ try: narr = arr.astype('float') if (narr < sys.maxsize).all() ...
def get_autotype(arr): """ Attempts to return a numpy array converted to the most sensible dtype Value errors will be caught and simply return the original array Tries to make dtype int, then float, then no change """ try: narr = arr.astype('float') if (narr < sys.maxsize).all() ...
[ "Attempts", "to", "return", "a", "numpy", "array", "converted", "to", "the", "most", "sensible", "dtype", "Value", "errors", "will", "be", "caught", "and", "simply", "return", "the", "original", "array", "Tries", "to", "make", "dtype", "int", "then", "float"...
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/ext/readcol.py#L223-L236
[ "def", "get_autotype", "(", "arr", ")", ":", "try", ":", "narr", "=", "arr", ".", "astype", "(", "'float'", ")", "if", "(", "narr", "<", "sys", ".", "maxsize", ")", ".", "all", "(", ")", "and", "(", "narr", "%", "1", ")", ".", "sum", "(", ")"...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
readff
Fixed-format reader Pass in a single line string (s) and a format list, which needs to be a python list of string lengths
packages/vaex-core/vaex/ext/readcol.py
def readff(s,format): """ Fixed-format reader Pass in a single line string (s) and a format list, which needs to be a python list of string lengths """ F = numpy.array([0]+format).cumsum() bothF = zip(F[:-1],F[1:]) strarr = [s[l:u] for l,u in bothF] return strarr
def readff(s,format): """ Fixed-format reader Pass in a single line string (s) and a format list, which needs to be a python list of string lengths """ F = numpy.array([0]+format).cumsum() bothF = zip(F[:-1],F[1:]) strarr = [s[l:u] for l,u in bothF] return strarr
[ "Fixed", "-", "format", "reader", "Pass", "in", "a", "single", "line", "string", "(", "s", ")", "and", "a", "format", "list", "which", "needs", "to", "be", "a", "python", "list", "of", "string", "lengths" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/ext/readcol.py#L270-L281
[ "def", "readff", "(", "s", ",", "format", ")", ":", "F", "=", "numpy", ".", "array", "(", "[", "0", "]", "+", "format", ")", ".", "cumsum", "(", ")", "bothF", "=", "zip", "(", "F", "[", ":", "-", "1", "]", ",", "F", "[", "1", ":", "]", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
Struct.as_recarray
Convert into numpy recordarray
packages/vaex-core/vaex/ext/readcol.py
def as_recarray(self): """ Convert into numpy recordarray """ dtype = [(k,v.dtype) for k,v in self.__dict__.iteritems()] R = numpy.recarray(len(self.__dict__[k]),dtype=dtype) for key in self.__dict__: R[key] = self.__dict__[key] return R
def as_recarray(self): """ Convert into numpy recordarray """ dtype = [(k,v.dtype) for k,v in self.__dict__.iteritems()] R = numpy.recarray(len(self.__dict__[k]),dtype=dtype) for key in self.__dict__: R[key] = self.__dict__[key] return R
[ "Convert", "into", "numpy", "recordarray" ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/ext/readcol.py#L259-L265
[ "def", "as_recarray", "(", "self", ")", ":", "dtype", "=", "[", "(", "k", ",", "v", ".", "dtype", ")", "for", "k", ",", "v", "in", "self", ".", "__dict__", ".", "iteritems", "(", ")", "]", "R", "=", "numpy", ".", "recarray", "(", "len", "(", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
store_properties
Writes properties to the file in Java properties format. :param fh: a writable file-like object :param props: a mapping (dict) or iterable of key/value pairs :param comment: comment to write to the beginning of the file :param timestamp: boolean indicating whether to write a timestamp comment
packages/vaex-core/vaex/ext/jprops.py
def store_properties(fh, props, comment=None, timestamp=True): """ Writes properties to the file in Java properties format. :param fh: a writable file-like object :param props: a mapping (dict) or iterable of key/value pairs :param comment: comment to write to the beginning of the file :param tim...
def store_properties(fh, props, comment=None, timestamp=True): """ Writes properties to the file in Java properties format. :param fh: a writable file-like object :param props: a mapping (dict) or iterable of key/value pairs :param comment: comment to write to the beginning of the file :param tim...
[ "Writes", "properties", "to", "the", "file", "in", "Java", "properties", "format", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/ext/jprops.py#L33-L53
[ "def", "store_properties", "(", "fh", ",", "props", ",", "comment", "=", "None", ",", "timestamp", "=", "True", ")", ":", "if", "comment", "is", "not", "None", ":", "write_comment", "(", "fh", ",", "comment", ")", "if", "timestamp", ":", "write_comment",...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
write_comment
Writes a comment to the file in Java properties format. Newlines in the comment text are automatically turned into a continuation of the comment by adding a "#" to the beginning of each line. :param fh: a writable file-like object :param comment: comment string to write
packages/vaex-core/vaex/ext/jprops.py
def write_comment(fh, comment): """ Writes a comment to the file in Java properties format. Newlines in the comment text are automatically turned into a continuation of the comment by adding a "#" to the beginning of each line. :param fh: a writable file-like object :param comment: comment strin...
def write_comment(fh, comment): """ Writes a comment to the file in Java properties format. Newlines in the comment text are automatically turned into a continuation of the comment by adding a "#" to the beginning of each line. :param fh: a writable file-like object :param comment: comment strin...
[ "Writes", "a", "comment", "to", "the", "file", "in", "Java", "properties", "format", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/ext/jprops.py#L56-L68
[ "def", "write_comment", "(", "fh", ",", "comment", ")", ":", "_require_string", "(", "comment", ",", "'comments'", ")", "fh", ".", "write", "(", "_escape_comment", "(", "comment", ")", ")", "fh", ".", "write", "(", "b'\\n'", ")" ]
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
write_property
Write a single property to the file in Java properties format. :param fh: a writable file-like object :param key: the key to write :param value: the value to write
packages/vaex-core/vaex/ext/jprops.py
def write_property(fh, key, value): """ Write a single property to the file in Java properties format. :param fh: a writable file-like object :param key: the key to write :param value: the value to write """ if key is COMMENT: write_comment(fh, value) return _require_string(key, 'keys'...
def write_property(fh, key, value): """ Write a single property to the file in Java properties format. :param fh: a writable file-like object :param key: the key to write :param value: the value to write """ if key is COMMENT: write_comment(fh, value) return _require_string(key, 'keys'...
[ "Write", "a", "single", "property", "to", "the", "file", "in", "Java", "properties", "format", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/ext/jprops.py#L80-L98
[ "def", "write_property", "(", "fh", ",", "key", ",", "value", ")", ":", "if", "key", "is", "COMMENT", ":", "write_comment", "(", "fh", ",", "value", ")", "return", "_require_string", "(", "key", ",", "'keys'", ")", "_require_string", "(", "value", ",", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
iter_properties
Incrementally read properties from a Java .properties file. Yields tuples of key/value pairs. If ``comments`` is `True`, comments will be included with ``jprops.COMMENT`` in place of the key. :param fh: a readable file-like object :param comments: should include comments (default: False)
packages/vaex-core/vaex/ext/jprops.py
def iter_properties(fh, comments=False): """ Incrementally read properties from a Java .properties file. Yields tuples of key/value pairs. If ``comments`` is `True`, comments will be included with ``jprops.COMMENT`` in place of the key. :param fh: a readable file-like object :param comments...
def iter_properties(fh, comments=False): """ Incrementally read properties from a Java .properties file. Yields tuples of key/value pairs. If ``comments`` is `True`, comments will be included with ``jprops.COMMENT`` in place of the key. :param fh: a readable file-like object :param comments...
[ "Incrementally", "read", "properties", "from", "a", "Java", ".", "properties", "file", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/ext/jprops.py#L101-L119
[ "def", "iter_properties", "(", "fh", ",", "comments", "=", "False", ")", ":", "for", "line", "in", "_property_lines", "(", "fh", ")", ":", "key", ",", "value", "=", "_split_key_value", "(", "line", ")", "if", "key", "is", "not", "COMMENT", ":", "key", ...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
_universal_newlines
Wrap a file to convert newlines regardless of whether the file was opened with the "universal newlines" option or not.
packages/vaex-core/vaex/ext/jprops.py
def _universal_newlines(fp): """ Wrap a file to convert newlines regardless of whether the file was opened with the "universal newlines" option or not. """ # if file was opened with universal newline support we don't need to convert if 'U' in getattr(fp, 'mode', ''): for line in fp: yield line...
def _universal_newlines(fp): """ Wrap a file to convert newlines regardless of whether the file was opened with the "universal newlines" option or not. """ # if file was opened with universal newline support we don't need to convert if 'U' in getattr(fp, 'mode', ''): for line in fp: yield line...
[ "Wrap", "a", "file", "to", "convert", "newlines", "regardless", "of", "whether", "the", "file", "was", "opened", "with", "the", "universal", "newlines", "option", "or", "not", "." ]
vaexio/vaex
python
https://github.com/vaexio/vaex/blob/a45b672f8287afca2ada8e36b74b604b9b28dd85/packages/vaex-core/vaex/ext/jprops.py#L260-L273
[ "def", "_universal_newlines", "(", "fp", ")", ":", "# if file was opened with universal newline support we don't need to convert", "if", "'U'", "in", "getattr", "(", "fp", ",", "'mode'", ",", "''", ")", ":", "for", "line", "in", "fp", ":", "yield", "line", "else",...
a45b672f8287afca2ada8e36b74b604b9b28dd85
test
show_versions
Return the version information for all librosa dependencies.
librosa/version.py
def show_versions(): '''Return the version information for all librosa dependencies.''' core_deps = ['audioread', 'numpy', 'scipy', 'sklearn', 'joblib', 'decorator', 'six', 'soundfile', ...
def show_versions(): '''Return the version information for all librosa dependencies.''' core_deps = ['audioread', 'numpy', 'scipy', 'sklearn', 'joblib', 'decorator', 'six', 'soundfile', ...
[ "Return", "the", "version", "information", "for", "all", "librosa", "dependencies", "." ]
librosa/librosa
python
https://github.com/librosa/librosa/blob/180e8e6eb8f958fa6b20b8cba389f7945d508247/librosa/version.py#L28-L61
[ "def", "show_versions", "(", ")", ":", "core_deps", "=", "[", "'audioread'", ",", "'numpy'", ",", "'scipy'", ",", "'sklearn'", ",", "'joblib'", ",", "'decorator'", ",", "'six'", ",", "'soundfile'", ",", "'resampy'", ",", "'numba'", "]", "extra_deps", "=", ...
180e8e6eb8f958fa6b20b8cba389f7945d508247
test
rename_kw
Handle renamed arguments. Parameters ---------- old_name : str old_value The name and value of the old argument new_name : str new_value The name and value of the new argument version_deprecated : str The version at which the old name became deprecated version...
librosa/util/deprecation.py
def rename_kw(old_name, old_value, new_name, new_value, version_deprecated, version_removed): '''Handle renamed arguments. Parameters ---------- old_name : str old_value The name and value of the old argument new_name : str new_value The name and value of the ...
def rename_kw(old_name, old_value, new_name, new_value, version_deprecated, version_removed): '''Handle renamed arguments. Parameters ---------- old_name : str old_value The name and value of the old argument new_name : str new_value The name and value of the ...
[ "Handle", "renamed", "arguments", "." ]
librosa/librosa
python
https://github.com/librosa/librosa/blob/180e8e6eb8f958fa6b20b8cba389f7945d508247/librosa/util/deprecation.py#L15-L64
[ "def", "rename_kw", "(", "old_name", ",", "old_value", ",", "new_name", ",", "new_value", ",", "version_deprecated", ",", "version_removed", ")", ":", "if", "isinstance", "(", "old_value", ",", "Deprecated", ")", ":", "return", "new_value", "else", ":", "stack...
180e8e6eb8f958fa6b20b8cba389f7945d508247
test
set_fftlib
Set the FFT library used by librosa. Parameters ---------- lib : None or module Must implement an interface compatible with `numpy.fft`. If `None`, reverts to `numpy.fft`. Examples -------- Use `pyfftw`: >>> import pyfftw >>> librosa.set_fftlib(pyfftw.interfaces.numpy_...
librosa/core/fft.py
def set_fftlib(lib=None): '''Set the FFT library used by librosa. Parameters ---------- lib : None or module Must implement an interface compatible with `numpy.fft`. If `None`, reverts to `numpy.fft`. Examples -------- Use `pyfftw`: >>> import pyfftw >>> librosa.se...
def set_fftlib(lib=None): '''Set the FFT library used by librosa. Parameters ---------- lib : None or module Must implement an interface compatible with `numpy.fft`. If `None`, reverts to `numpy.fft`. Examples -------- Use `pyfftw`: >>> import pyfftw >>> librosa.se...
[ "Set", "the", "FFT", "library", "used", "by", "librosa", "." ]
librosa/librosa
python
https://github.com/librosa/librosa/blob/180e8e6eb8f958fa6b20b8cba389f7945d508247/librosa/core/fft.py#L11-L38
[ "def", "set_fftlib", "(", "lib", "=", "None", ")", ":", "global", "__FFTLIB", "if", "lib", "is", "None", ":", "from", "numpy", "import", "fft", "lib", "=", "fft", "__FFTLIB", "=", "lib" ]
180e8e6eb8f958fa6b20b8cba389f7945d508247
test
beat_track
Beat tracking function :parameters: - input_file : str Path to input audio file (wav, mp3, m4a, flac, etc.) - output_file : str Path to save beat event timestamps as a CSV file
examples/beat_tracker.py
def beat_track(input_file, output_csv): '''Beat tracking function :parameters: - input_file : str Path to input audio file (wav, mp3, m4a, flac, etc.) - output_file : str Path to save beat event timestamps as a CSV file ''' print('Loading ', input_file) y, sr = lib...
def beat_track(input_file, output_csv): '''Beat tracking function :parameters: - input_file : str Path to input audio file (wav, mp3, m4a, flac, etc.) - output_file : str Path to save beat event timestamps as a CSV file ''' print('Loading ', input_file) y, sr = lib...
[ "Beat", "tracking", "function" ]
librosa/librosa
python
https://github.com/librosa/librosa/blob/180e8e6eb8f958fa6b20b8cba389f7945d508247/examples/beat_tracker.py#L16-L45
[ "def", "beat_track", "(", "input_file", ",", "output_csv", ")", ":", "print", "(", "'Loading '", ",", "input_file", ")", "y", ",", "sr", "=", "librosa", ".", "load", "(", "input_file", ",", "sr", "=", "22050", ")", "# Use a default hop size of 512 samples @ 22...
180e8e6eb8f958fa6b20b8cba389f7945d508247
test
adjust_tuning
Load audio, estimate tuning, apply pitch correction, and save.
examples/adjust_tuning.py
def adjust_tuning(input_file, output_file): '''Load audio, estimate tuning, apply pitch correction, and save.''' print('Loading ', input_file) y, sr = librosa.load(input_file) print('Separating harmonic component ... ') y_harm = librosa.effects.harmonic(y) print('Estimating tuning ... ') #...
def adjust_tuning(input_file, output_file): '''Load audio, estimate tuning, apply pitch correction, and save.''' print('Loading ', input_file) y, sr = librosa.load(input_file) print('Separating harmonic component ... ') y_harm = librosa.effects.harmonic(y) print('Estimating tuning ... ') #...
[ "Load", "audio", "estimate", "tuning", "apply", "pitch", "correction", "and", "save", "." ]
librosa/librosa
python
https://github.com/librosa/librosa/blob/180e8e6eb8f958fa6b20b8cba389f7945d508247/examples/adjust_tuning.py#L15-L32
[ "def", "adjust_tuning", "(", "input_file", ",", "output_file", ")", ":", "print", "(", "'Loading '", ",", "input_file", ")", "y", ",", "sr", "=", "librosa", ".", "load", "(", "input_file", ")", "print", "(", "'Separating harmonic component ... '", ")", "y_harm...
180e8e6eb8f958fa6b20b8cba389f7945d508247
test
frames_to_samples
Converts frame indices to audio sample indices. Parameters ---------- frames : number or np.ndarray [shape=(n,)] frame index or vector of frame indices hop_length : int > 0 [scalar] number of samples between successive frames n_fft : None or int > 0 [scalar] Optional: ...
librosa/core/time_frequency.py
def frames_to_samples(frames, hop_length=512, n_fft=None): """Converts frame indices to audio sample indices. Parameters ---------- frames : number or np.ndarray [shape=(n,)] frame index or vector of frame indices hop_length : int > 0 [scalar] number of samples between successi...
def frames_to_samples(frames, hop_length=512, n_fft=None): """Converts frame indices to audio sample indices. Parameters ---------- frames : number or np.ndarray [shape=(n,)] frame index or vector of frame indices hop_length : int > 0 [scalar] number of samples between successi...
[ "Converts", "frame", "indices", "to", "audio", "sample", "indices", "." ]
librosa/librosa
python
https://github.com/librosa/librosa/blob/180e8e6eb8f958fa6b20b8cba389f7945d508247/librosa/core/time_frequency.py#L30-L68
[ "def", "frames_to_samples", "(", "frames", ",", "hop_length", "=", "512", ",", "n_fft", "=", "None", ")", ":", "offset", "=", "0", "if", "n_fft", "is", "not", "None", ":", "offset", "=", "int", "(", "n_fft", "//", "2", ")", "return", "(", "np", "."...
180e8e6eb8f958fa6b20b8cba389f7945d508247
test
samples_to_frames
Converts sample indices into STFT frames. Examples -------- >>> # Get the frame numbers for every 256 samples >>> librosa.samples_to_frames(np.arange(0, 22050, 256)) array([ 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, ...
librosa/core/time_frequency.py
def samples_to_frames(samples, hop_length=512, n_fft=None): """Converts sample indices into STFT frames. Examples -------- >>> # Get the frame numbers for every 256 samples >>> librosa.samples_to_frames(np.arange(0, 22050, 256)) array([ 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, ...
def samples_to_frames(samples, hop_length=512, n_fft=None): """Converts sample indices into STFT frames. Examples -------- >>> # Get the frame numbers for every 256 samples >>> librosa.samples_to_frames(np.arange(0, 22050, 256)) array([ 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, ...
[ "Converts", "sample", "indices", "into", "STFT", "frames", "." ]
librosa/librosa
python
https://github.com/librosa/librosa/blob/180e8e6eb8f958fa6b20b8cba389f7945d508247/librosa/core/time_frequency.py#L71-L118
[ "def", "samples_to_frames", "(", "samples", ",", "hop_length", "=", "512", ",", "n_fft", "=", "None", ")", ":", "offset", "=", "0", "if", "n_fft", "is", "not", "None", ":", "offset", "=", "int", "(", "n_fft", "//", "2", ")", "samples", "=", "np", "...
180e8e6eb8f958fa6b20b8cba389f7945d508247
test
frames_to_time
Converts frame counts to time (seconds). Parameters ---------- frames : np.ndarray [shape=(n,)] frame index or vector of frame indices sr : number > 0 [scalar] audio sampling rate hop_length : int > 0 [scalar] number of samples between successive frames n_...
librosa/core/time_frequency.py
def frames_to_time(frames, sr=22050, hop_length=512, n_fft=None): """Converts frame counts to time (seconds). Parameters ---------- frames : np.ndarray [shape=(n,)] frame index or vector of frame indices sr : number > 0 [scalar] audio sampling rate hop_length : int...
def frames_to_time(frames, sr=22050, hop_length=512, n_fft=None): """Converts frame counts to time (seconds). Parameters ---------- frames : np.ndarray [shape=(n,)] frame index or vector of frame indices sr : number > 0 [scalar] audio sampling rate hop_length : int...
[ "Converts", "frame", "counts", "to", "time", "(", "seconds", ")", "." ]
librosa/librosa
python
https://github.com/librosa/librosa/blob/180e8e6eb8f958fa6b20b8cba389f7945d508247/librosa/core/time_frequency.py#L121-L162
[ "def", "frames_to_time", "(", "frames", ",", "sr", "=", "22050", ",", "hop_length", "=", "512", ",", "n_fft", "=", "None", ")", ":", "samples", "=", "frames_to_samples", "(", "frames", ",", "hop_length", "=", "hop_length", ",", "n_fft", "=", "n_fft", ")"...
180e8e6eb8f958fa6b20b8cba389f7945d508247