Skip to content

Commit 37e374e

Browse files
committed
Improved convert() function documentation
1 parent fba26d3 commit 37e374e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/cli.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,10 +1734,12 @@ This supports nested imports as well, for example to use `ElementTree <https://d
17341734
17351735
.. _cli_convert_complex:
17361736

1737-
Using a convert() function to execute initialization
1738-
----------------------------------------------------
1737+
Defining a convert() function
1738+
-----------------------------
1739+
1740+
Instead of providing a single line of code to be executed against each value, you can define a function called ``convert(value)``.
17391741

1740-
In some cases you may need to execute one-off initialization code at the start of the run. You can do that by providing code that runs before defining your ``convert(value)`` function.
1742+
This mechanism can be used to execute one-off initialization code that runs once at the start of the conversion run.
17411743

17421744
The following example adds a new ``score`` column, then updates it to list a random number - after first seeding the random number generator to ensure that multiple runs produce the same results:
17431745

0 commit comments

Comments
 (0)