@@ -194,7 +194,7 @@ class NDFrame(PandasObject, SelectionMixin):
194194 # TODO(PY36): replace with _attrs : Dict[Hashable, Any]
195195 # We need the TYPE_CHECKING, because _attrs is not a class attribute
196196 # and Py35 doesn't support the new syntax.
197- _attrs = {} # type: Dict[Hashable, Any]
197+ _attrs = {} # type: Dict[Optional[ Hashable] , Any]
198198
199199 # ----------------------------------------------------------------------
200200 # Constructors
@@ -205,7 +205,7 @@ def __init__(
205205 axes : Optional [List [Index ]] = None ,
206206 copy : bool = False ,
207207 dtype : Optional [Dtype ] = None ,
208- attrs : Optional [Mapping [Hashable , Any ]] = None ,
208+ attrs : Optional [Mapping [Optional [ Hashable ] , Any ]] = None ,
209209 fastpath : bool = False ,
210210 ):
211211
@@ -248,7 +248,7 @@ def _init_mgr(self, mgr, axes=None, dtype=None, copy=False):
248248 # ----------------------------------------------------------------------
249249
250250 @property
251- def attrs (self ) -> Dict [Hashable , Any ]:
251+ def attrs (self ) -> Dict [Optional [ Hashable ] , Any ]:
252252 """
253253 Dictionary of global attributes on this object.
254254 """
@@ -257,7 +257,7 @@ def attrs(self) -> Dict[Hashable, Any]:
257257 return self ._attrs
258258
259259 @attrs .setter
260- def attrs (self , value : Mapping [Hashable , Any ]) -> None :
260+ def attrs (self , value : Mapping [Optional [ Hashable ] , Any ]) -> None :
261261 self ._attrs = dict (value )
262262
263263 @property
@@ -3149,10 +3149,10 @@ def to_csv(
31493149 sep : str = "," ,
31503150 na_rep : str = "" ,
31513151 float_format : Optional [str ] = None ,
3152- columns : Optional [Sequence [Hashable ]] = None ,
3152+ columns : Optional [Sequence [Optional [ Hashable ] ]] = None ,
31533153 header : Union [bool_t , List [str ]] = True ,
31543154 index : bool_t = True ,
3155- index_label : Optional [Union [bool_t , str , Sequence [Hashable ]]] = None ,
3155+ index_label : Optional [Union [bool_t , str , Sequence [Optional [ Hashable ] ]]] = None ,
31563156 mode : str = "w" ,
31573157 encoding : Optional [str ] = None ,
31583158 compression : Optional [Union [str , Mapping [str , str ]]] = "infer" ,
0 commit comments