File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -842,7 +842,7 @@ def apply_str(self) -> FrameOrSeriesUnion:
842842 # Special-cased because DataFrame.size returns a single scalar
843843 obj = self .obj
844844 value = obj .shape [self .axis ]
845- return obj ._constructor_sliced (value , index = self .agg_axis , name = "size" )
845+ return obj ._constructor_sliced (value , index = self .agg_axis )
846846 return super ().apply_str ()
847847
848848
Original file line number Diff line number Diff line change @@ -1279,9 +1279,9 @@ def test_size_as_str(how, axis):
12791279 # on the columns
12801280 result = getattr (df , how )("size" , axis = axis )
12811281 if axis == 0 or axis == "index" :
1282- expected = Series (df .shape [0 ], index = df .columns , name = "size" )
1282+ expected = Series (df .shape [0 ], index = df .columns )
12831283 else :
1284- expected = Series (df .shape [1 ], index = df .index , name = "size" )
1284+ expected = Series (df .shape [1 ], index = df .index )
12851285 tm .assert_series_equal (result , expected )
12861286
12871287
You can’t perform that action at this time.
0 commit comments