DataFrame Subset¶
-
drewtils.dfSubset(data, where)¶ Return a subset of the data given a series of conditions
New in version 0.1.9.
Parameters: - data (
pandas.DataFrame:) – DataFrame to view - where (str or list or tuple) – Conditions to apply.
Notes
If the argument is a string, it will be converted to a tuple for iteration. Items in iterable can be either a string or three-valued iterable of the following form:
string: 'column operand target' iterable: ('column', 'operand', 'target')
If the first-level item is a string, it will be split at spaces. Operands are string-representations of operators from the operator module, e.g.:
'eq', 'ge', 'le', 'ne', 'gt', 'lt', 'contains'
Returns: view – View into the data frame after successive slices Return type: pandas.DataFrame:See also
- data (