|
11 | 11 | from pandas.core.index import (Index, MultiIndex, _ensure_index,
|
12 | 12 | InvalidIndexError)
|
13 | 13 | import pandas.core.indexing as indexing
|
14 |
| -from pandas.core.indexing import _maybe_convert_indices |
15 | 14 | from pandas.tseries.index import DatetimeIndex
|
16 | 15 | from pandas.tseries.period import PeriodIndex
|
17 | 16 | from pandas.core.internals import BlockManager
|
18 |
| -import pandas.core.array as pa |
19 | 17 | import pandas.core.common as com
|
20 | 18 | import pandas.core.datetools as datetools
|
21 | 19 | from pandas import compat, _np_version_under1p7
|
22 | 20 | from pandas.compat import map, zip, lrange, string_types, isidentifier, lmap
|
23 | 21 | from pandas.core.common import (isnull, notnull, is_list_like,
|
24 |
| - _values_from_object, _maybe_promote, _maybe_box_datetimelike, |
25 |
| - ABCSeries, SettingWithCopyError, SettingWithCopyWarning) |
| 22 | + _values_from_object, _maybe_promote, |
| 23 | + _maybe_box_datetimelike, ABCSeries, |
| 24 | + SettingWithCopyError, SettingWithCopyWarning) |
26 | 25 | import pandas.core.nanops as nanops
|
27 | 26 | from pandas.util.decorators import Appender, Substitution
|
28 | 27 | from pandas.core import config
|
@@ -1757,6 +1756,11 @@ def filter(self, items=None, like=None, regex=None, axis=None):
|
1757 | 1756 | Keep info axis where "arg in col == True"
|
1758 | 1757 | regex : string (regular expression)
|
1759 | 1758 | Keep info axis with re.search(regex, col) == True
|
| 1759 | + axis : int or None |
| 1760 | + The axis to filter on. By default this is the info axis. The "info |
| 1761 | + axis" is the axis that is used when indexing with ``[]``. For |
| 1762 | + example, ``df = DataFrame({'a': [1, 2, 3, 4]]}); df['a']``. So, |
| 1763 | + the ``DataFrame`` columns are the info axis. |
1760 | 1764 |
|
1761 | 1765 | Notes
|
1762 | 1766 | -----
|
|
0 commit comments