Skip to content

Commit

Permalink
Fix empty list case.
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Mar 3, 2022
1 parent 119ca61 commit e35b82b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/cudf/cudf/core/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -5892,7 +5892,11 @@ def append(
other = other.reindex(combined_columns, copy=False).to_frame().T
if not current_cols.equals(combined_columns):
self = self.reindex(columns=combined_columns)
elif isinstance(other, list) and not isinstance(other[0], DataFrame):
elif (
isinstance(other, list)
and other
and not isinstance(other[0], DataFrame)
):
other = DataFrame(other)
cols = self._data.to_pandas_index()
if (cols.get_indexer(other._data.to_pandas_index()) >= 0).all():
Expand Down

0 comments on commit e35b82b

Please sign in to comment.