Data.search¶
- Data.search(xcol=None, value=None, columns=None, accuracy=0.0)¶
Search the numerica data part of the file for lines that match and returns the corresponding rows.
- Keyword Arguments:
xcol (index types, None) – a Search Column Index. If None (default), use the current setas.x
value (float, tuple, list or callable, None) – Value to look for
columns (index or array of indices or None (default)) – columns of data to return - none represents all columns.
accuracy (float) – Uncertainty to accept when testing equalities
- Returns:
ndarray – numpy array of matching rows or column values depending on the arguments.
Note
The value is interpreted as follows:
a float looks for an exact match
a list is a list of exact matches
an array or list of booleans (index like Numpy does)
a tuple should contain a (min,max) value.
A callable object should have accept a float and an array representing the value of the search col for the the current row and the entire row.
None opens an interactive span selector in a plot window.