|
8 | 8 | TYPE_CHECKING,
|
9 | 9 | final,
|
10 | 10 | )
|
11 |
| -import warnings |
12 | 11 |
|
13 | 12 | import numpy as np
|
14 | 13 |
|
15 | 14 | from pandas._libs.tslibs import OutOfBoundsDatetime
|
16 | 15 | from pandas.errors import InvalidIndexError
|
17 | 16 | from pandas.util._decorators import cache_readonly
|
18 |
| -from pandas.util._exceptions import find_stack_level |
19 | 17 |
|
20 | 18 | from pandas.core.dtypes.common import (
|
21 | 19 | is_list_like,
|
@@ -387,56 +385,6 @@ def _set_grouper(
|
387 | 385 | self._gpr_index = ax
|
388 | 386 | return obj, ax, indexer
|
389 | 387 |
|
390 |
| - @final |
391 |
| - @property |
392 |
| - def ax(self) -> Index: |
393 |
| - warnings.warn( |
394 |
| - f"{type(self).__name__}.ax is deprecated and will be removed in a " |
395 |
| - "future version. Use Resampler.ax instead", |
396 |
| - FutureWarning, |
397 |
| - stacklevel=find_stack_level(), |
398 |
| - ) |
399 |
| - index = self._gpr_index |
400 |
| - if index is None: |
401 |
| - raise ValueError("_set_grouper must be called before ax is accessed") |
402 |
| - return index |
403 |
| - |
404 |
| - @final |
405 |
| - @property |
406 |
| - def indexer(self): |
407 |
| - warnings.warn( |
408 |
| - f"{type(self).__name__}.indexer is deprecated and will be removed " |
409 |
| - "in a future version. Use Resampler.indexer instead.", |
410 |
| - FutureWarning, |
411 |
| - stacklevel=find_stack_level(), |
412 |
| - ) |
413 |
| - return self._indexer_deprecated |
414 |
| - |
415 |
| - @final |
416 |
| - @property |
417 |
| - def obj(self): |
418 |
| - # TODO(3.0): enforcing these deprecations on Grouper should close |
419 |
| - # GH#25564, GH#41930 |
420 |
| - warnings.warn( |
421 |
| - f"{type(self).__name__}.obj is deprecated and will be removed " |
422 |
| - "in a future version. Use GroupBy.indexer instead.", |
423 |
| - FutureWarning, |
424 |
| - stacklevel=find_stack_level(), |
425 |
| - ) |
426 |
| - return self._obj_deprecated |
427 |
| - |
428 |
| - @final |
429 |
| - @property |
430 |
| - def groups(self): |
431 |
| - warnings.warn( |
432 |
| - f"{type(self).__name__}.groups is deprecated and will be removed " |
433 |
| - "in a future version. Use GroupBy.groups instead.", |
434 |
| - FutureWarning, |
435 |
| - stacklevel=find_stack_level(), |
436 |
| - ) |
437 |
| - # error: "None" has no attribute "groups" |
438 |
| - return self._grouper_deprecated.groups # type: ignore[attr-defined] |
439 |
| - |
440 | 388 | @final
|
441 | 389 | def __repr__(self) -> str:
|
442 | 390 | attrs_list = (
|
|
0 commit comments