File tree 3 files changed +12
-12
lines changed
3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -488,15 +488,14 @@ class DataFrame(NDFrame, OpsMixin):
488
488
_internal_names_set = {"columns" , "index" } | NDFrame ._internal_names_set
489
489
_typ = "dataframe"
490
490
_HANDLED_TYPES = (Series , Index , ExtensionArray , np .ndarray )
491
+ _accessors : Set [str ] = {"sparse" }
492
+ _hidden_attrs : FrozenSet [str ] = NDFrame ._hidden_attrs | frozenset ([])
493
+ _constructor_sliced : Type [Series ] = Series
491
494
492
495
@property
493
496
def _constructor (self ) -> Type [DataFrame ]:
494
497
return DataFrame
495
498
496
- _constructor_sliced : Type [Series ] = Series
497
- _hidden_attrs : FrozenSet [str ] = NDFrame ._hidden_attrs | frozenset ([])
498
- _accessors : Set [str ] = {"sparse" }
499
-
500
499
@property
501
500
def _constructor_expanddim (self ):
502
501
# GH#31549 raising NotImplementedError on a property causes trouble
Original file line number Diff line number Diff line change @@ -375,14 +375,6 @@ def _constructor(self: FrameOrSeries) -> Type[FrameOrSeries]:
375
375
"""
376
376
raise AbstractMethodError (self )
377
377
378
- @property
379
- def _constructor_sliced (self ):
380
- """
381
- Used when a manipulation result has one lower dimension(s) as the
382
- original, such as DataFrame single columns slicing.
383
- """
384
- raise AbstractMethodError (self )
385
-
386
378
@property
387
379
def _constructor_expanddim (self ):
388
380
"""
Original file line number Diff line number Diff line change 1
1
import pydoc
2
+ import inspect
2
3
3
4
import numpy as np
4
5
import pytest
5
6
6
7
import pandas as pd
8
+ from pandas .util ._test_decorators import skip_if_no
7
9
from pandas import DataFrame , Index , Series , date_range
8
10
import pandas ._testing as tm
9
11
@@ -167,3 +169,10 @@ def test_attrs(self):
167
169
s .attrs ["version" ] = 1
168
170
result = s + 1
169
171
assert result .attrs == {"version" : 1 }
172
+
173
+ @skip_if_no ("jinja2" )
174
+ def test_inspect_getmembers (self ):
175
+ # GH38740
176
+ ser = Series ()
177
+ with tm .assert_produces_warning (None ):
178
+ inspect .getmembers (ser )
You can’t perform that action at this time.
0 commit comments