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:
842
842
# Special-cased because DataFrame.size returns a single scalar
843
843
obj = self .obj
844
844
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 )
846
846
return super ().apply_str ()
847
847
848
848
Original file line number Diff line number Diff line change @@ -1279,9 +1279,9 @@ def test_size_as_str(how, axis):
1279
1279
# on the columns
1280
1280
result = getattr (df , how )("size" , axis = axis )
1281
1281
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 )
1283
1283
else :
1284
- expected = Series (df .shape [1 ], index = df .index , name = "size" )
1284
+ expected = Series (df .shape [1 ], index = df .index )
1285
1285
tm .assert_series_equal (result , expected )
1286
1286
1287
1287
You can’t perform that action at this time.
0 commit comments