File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -491,15 +491,14 @@ class DataFrame(NDFrame, OpsMixin):
491
491
_internal_names_set = {"columns" , "index" } | NDFrame ._internal_names_set
492
492
_typ = "dataframe"
493
493
_HANDLED_TYPES = (Series , Index , ExtensionArray , np .ndarray )
494
+ _accessors : Set [str ] = {"sparse" }
495
+ _hidden_attrs : FrozenSet [str ] = NDFrame ._hidden_attrs | frozenset ([])
496
+ _constructor_sliced : Type [Series ] = Series
494
497
495
498
@property
496
499
def _constructor (self ) -> Type [DataFrame ]:
497
500
return DataFrame
498
501
499
- _constructor_sliced : Type [Series ] = Series
500
- _hidden_attrs : FrozenSet [str ] = NDFrame ._hidden_attrs | frozenset ([])
501
- _accessors : Set [str ] = {"sparse" }
502
-
503
502
@property
504
503
def _constructor_expanddim (self ):
505
504
# GH#31549 raising NotImplementedError on a property causes trouble
Original file line number Diff line number Diff line change @@ -370,14 +370,6 @@ def _constructor(self: FrameOrSeries) -> Type[FrameOrSeries]:
370
370
"""
371
371
raise AbstractMethodError (self )
372
372
373
- @property
374
- def _constructor_sliced (self ):
375
- """
376
- Used when a manipulation result has one lower dimension(s) as the
377
- original, such as DataFrame single columns slicing.
378
- """
379
- raise AbstractMethodError (self )
380
-
381
373
@property
382
374
def _constructor_expanddim (self ):
383
375
"""
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