Skip to content

Commit

Permalink
allow index objects in assign
Browse files Browse the repository at this point in the history
  • Loading branch information
mrocklin committed Mar 16, 2019
1 parent 6a012fa commit d706850
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dask/dataframe/core.py
Expand Up @@ -2723,7 +2723,8 @@ def categorize(self, columns=None, index=None, split_every=None, **kwargs):
def assign(self, **kwargs):
for k, v in kwargs.items():
if not (isinstance(v, Scalar) or is_series_like(v) or
callable(v) or pd.api.types.is_scalar(v)):
callable(v) or pd.api.types.is_scalar(v) or
is_index_like(v)):
raise TypeError("Column assignment doesn't support type "
"{0}".format(type(v).__name__))
if callable(v):
Expand Down

0 comments on commit d706850

Please sign in to comment.