Skip to content

Commit

Permalink
chore: improve docs on attribute setter
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxiao committed Mar 16, 2022
1 parent 2b535b2 commit 74d7bcb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/fundamentals/documentarray/access-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,15 @@ da.summary()
mime_type ('str',) 2 False
```

We can see `mime_type` are set. One can also select multiple attributes in one shot:
We can see `mime_type` are set.

If you want to set an attribute of all Documents to the same value without looping:

```python
da[:, 'mime_type'] = 'hello'
```

One can also select multiple attributes in one-shot:

```python
da[:, ['mime_type', 'id']]
Expand Down

0 comments on commit 74d7bcb

Please sign in to comment.