File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 119119 header_rows = newDF [ newDF ['_style' ] == 'HEADER' ].index
120120 data_rows = newDF [ newDF ['_style' ] != 'HEADER' ].index
121121
122+ impossiblePercent = newDF [FIELD_IMPOSSIBLE ].apply (lambda x : "0" if x == "" else x ).astype ('int' ) / newDF [FIELD_JACOCO ].apply (lambda x : "0" if x == "" else x ).astype ('int' )
123+ newDF [FIELD_IMPOSSIBLE ] = list (zip (newDF [FIELD_IMPOSSIBLE ], impossiblePercent * 100 ))
124+
122125 latexTable = newDF \
123126 .drop (columns = ['_style' ]) \
124127 .style \
125128 .hide (axis = 0 ) \
126129 .format ({
127130 FIELD_JACOCO : "{:.0f}" ,
128- FIELD_IMPOSSIBLE : "-{:.0f}" ,
131+ FIELD_IMPOSSIBLE : lambda x : "-{:.0f} ({:.0f}\%)" . format ( * x ) ,
129132 FIELD_MISSED : "+{:.0f}" ,
130133 FIELD_SYSNAME : "{:.0f}"
131134 }, subset = pd .IndexSlice [data_rows , :]) \
You can’t perform that action at this time.
0 commit comments