File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
pandas/core/arrays/sparse Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
"""Sparse Dtype"""
2
2
3
3
import re
4
- from typing import Any
4
+ from typing import Any , Tuple
5
5
6
6
import numpy as np
7
7
@@ -223,7 +223,7 @@ def construct_from_string(cls, string):
223
223
raise TypeError (msg )
224
224
225
225
@staticmethod
226
- def _parse_subtype (dtype ) :
226
+ def _parse_subtype (dtype : str ) -> Tuple [ str , bool ] :
227
227
"""
228
228
Parse a string to get the subtype
229
229
@@ -249,7 +249,7 @@ def _parse_subtype(dtype):
249
249
has_fill_value = False
250
250
if m :
251
251
subtype = m .groupdict ()["subtype" ]
252
- has_fill_value = m .groupdict ()["fill_value" ] or has_fill_value
252
+ has_fill_value = bool ( m .groupdict ()["fill_value" ])
253
253
elif dtype == "Sparse" :
254
254
subtype = "float64"
255
255
else :
You can’t perform that action at this time.
0 commit comments