Skip to content

Commit 74d7bcb

Browse files
committed
chore: improve docs on attribute setter
1 parent 2b535b2 commit 74d7bcb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/fundamentals/documentarray/access-attributes.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,15 @@ da.summary()
8787
mime_type ('str',) 2 False
8888
```
8989

90-
We can see `mime_type` are set. One can also select multiple attributes in one shot:
90+
We can see `mime_type` are set.
91+
92+
If you want to set an attribute of all Documents to the same value without looping:
93+
94+
```python
95+
da[:, 'mime_type'] = 'hello'
96+
```
97+
98+
One can also select multiple attributes in one-shot:
9199

92100
```python
93101
da[:, ['mime_type', 'id']]

0 commit comments

Comments
 (0)