File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ def pivot_table(
9898 values = list (values )
9999
100100 grouped = data .groupby (keys , observed = observed )
101- agged = grouped .agg (aggfunc )
101+ agged : DataFrame = grouped .agg (aggfunc )
102102 if dropna and isinstance (agged , ABCDataFrame ) and len (agged .columns ):
103103 agged = agged .dropna (how = "all" )
104104
@@ -148,9 +148,8 @@ def pivot_table(
148148 table = table .sort_index (axis = 1 )
149149
150150 if fill_value is not None :
151- filled = table .fillna (value = fill_value , downcast = "infer" )
152- assert filled is not None # needed for mypy
153- table = filled
151+ table = table .fillna (fill_value , downcast = "infer" ) # type: ignore[assignment]
152+ assert isinstance (table , DataFrame )
154153
155154 if margins :
156155 if dropna :
You can’t perform that action at this time.
0 commit comments