File tree Expand file tree Collapse file tree 1 file changed +20
-10
lines changed
pandas/tests/frame/methods Expand file tree Collapse file tree 1 file changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -432,15 +432,25 @@ def test_refine_percentiles(self, percentiles):
432
432
percentiles = [0.25 , 0.5 , 0.75 ]
433
433
434
434
expected = DataFrame (
435
- {
436
- "count" : len (df .a ),
437
- "mean" : df .a .mean (),
438
- "std" : df .a .std (),
439
- "min" : df .a .min (),
440
- ** {f"{ p :.0%} " : df .a .quantile (p ) for p in percentiles },
441
- "max" : df .a .max (),
442
- },
443
- index = ["a" ],
444
- ).T
435
+ [
436
+ len (df .a ),
437
+ df .a .mean (),
438
+ df .a .std (),
439
+ df .a .min (),
440
+ * [df .a .quantile (p ) for p in percentiles ],
441
+ df .a .max (),
442
+ ],
443
+ index = pd .Index (
444
+ [
445
+ "count" ,
446
+ "mean" ,
447
+ "std" ,
448
+ "min" ,
449
+ * [f"{ p :.0%} " for p in percentiles ],
450
+ "max" ,
451
+ ]
452
+ ),
453
+ columns = ["a" ],
454
+ )
445
455
446
456
tm .assert_frame_equal (result , expected )
You can’t perform that action at this time.
0 commit comments