File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -128,15 +128,12 @@ def melt(
128128 id_data = frame .pop (col )
129129 if is_extension_array_dtype (id_data ):
130130 if K > 0 :
131- id_data = concat ([id_data ] * K , ignore_index = True )
131+ mdata [ col ] = concat ([id_data ] * K , ignore_index = True )
132132 else :
133133 # We can't concat empty list. (GH 46044)
134- id_data = type (id_data )([], name = id_data .name , dtype = id_data .dtype )
134+ mdata [ col ] = type (id_data )([], name = id_data .name , dtype = id_data .dtype )
135135 else :
136- # error: Incompatible types in assignment (expression has type
137- # "ndarray[Any, dtype[Any]]", variable has type "Series")
138- id_data = np .tile (id_data ._values , K ) # type: ignore[assignment]
139- mdata [col ] = id_data
136+ mdata [col ] = np .tile (id_data ._values , K )
140137
141138 mcolumns = id_vars + var_name + [value_name ]
142139
You can’t perform that action at this time.
0 commit comments