Skip to content

Commit 3281df4

Browse files
committed
updated docs
1 parent 3185e92 commit 3281df4

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

docs/demo_vocab.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jupytext:
66
format_version: 0.13
77
jupytext_version: 1.14.0
88
kernelspec:
9-
display_name: Python 3 (ipykernel)
9+
display_name: Python 3.10.6 ('cf-pandas')
1010
language: python
1111
name: python3
1212
---
@@ -139,6 +139,19 @@ vocab2.make_entry("other_variable_nickname", "match_that_string", attr="standard
139139
vocab1 + vocab2
140140
```
141141

142+
Merge 2 or more Vocab objects:
143+
144+
```{code-cell} ipython3
145+
cfp.merge([vocab1, vocab2])
146+
```
147+
148+
Can also add in place
149+
150+
```{code-cell} ipython3
151+
# also works
152+
vocab1 += vocab2
153+
```
154+
142155
## Use the `Reg` class to write regular expressions
143156

144157
We used simple exact matching regular expressions above, but for anything more complicated it can be hard to write regular expressions. You can use the `Reg` class in `cf-pandas` to write regular expressions with several options, as demonstrated more in [another doc page](https://cf-pandas.readthedocs.io/en/latest/demo_reg.html), and briefly here.

0 commit comments

Comments
 (0)