File tree 1 file changed +3
-6
lines changed
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -128,15 +128,12 @@ def melt(
128
128
id_data = frame .pop (col )
129
129
if is_extension_array_dtype (id_data ):
130
130
if K > 0 :
131
- id_data = concat ([id_data ] * K , ignore_index = True )
131
+ mdata [ col ] = concat ([id_data ] * K , ignore_index = True )
132
132
else :
133
133
# 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 )
135
135
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 )
140
137
141
138
mcolumns = id_vars + var_name + [value_name ]
142
139
You can’t perform that action at this time.
0 commit comments