Skip to content

Commit 0807828

Browse files
committed
mypy part II
1 parent 635d945 commit 0807828

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pandas/core/reshape/pivot.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import cast, TYPE_CHECKING, Callable, Dict, Tuple, Union
1+
from typing import TYPE_CHECKING, Callable, Dict, Tuple, Union
22

33
import numpy as np
44

@@ -149,7 +149,8 @@ def pivot_table(
149149

150150
if fill_value is not None:
151151
filled = table.fillna(value=fill_value, downcast="infer")
152-
table = cast(DataFrame, filled)
152+
assert filled is not None # needed for mypy
153+
table = filled
153154

154155
if margins:
155156
if dropna:

0 commit comments

Comments
 (0)