plydata.one_table_verbs.pull¶
-
class
plydata.one_table_verbs.
pull
(*args, **kwargs)[source]¶ Pull a single column from the dataframe
- Parameters
Notes
Always returns a numpy array.
If
plydata.options.modify_input_data
isTrue
,pull
will not make a copy the original column.Examples
>>> import pandas as pd >>> df = pd.DataFrame({ ... 'x': [1, 2, 3], ... 'y': [4, 5, 6], ... 'z': [7, 8, 9] ... }) >>> df x y z 0 1 4 7 1 2 5 8 2 3 6 9 >>> df >> pull('y') array([4, 5, 6]) >>> df >> pull(0, True) array([1, 2, 3]) >>> df >> pull(-1, True) array([7, 8, 9])