Skip to content

Commit d888658

Browse files
Update pull_apart_list to use pd.concat instead of Series.append (#291)
1 parent 7583f3d commit d888658

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

merlin/core/dispatch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ def encode_list_column(original, encoded, dtype=None):
511511
def pull_apart_list(original, device=None):
512512
values = flatten_list_column_values(original)
513513
if isinstance(original, pd.Series):
514-
offsets = pd.Series([0]).append(original.map(len).cumsum()).reset_index(drop=True)
514+
offsets = pd.concat([pd.Series([0]), original.map(len).cumsum()]).reset_index(drop=True)
515515
if isinstance(offsets[0], list):
516516
offsets = pd.Series(offsets.reshape().flatten()).reset_index(drop=True)
517517
else:

0 commit comments

Comments
 (0)