Skip to content

Commit

Permalink
fix doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
alimanfoo committed Aug 6, 2019
1 parent 2f88442 commit 22adc64
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions petl/transform/regex.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,28 +391,28 @@ def splitdown(table, field, pattern, maxsplit=0, flags=0):
... ['Jane Doe', 'president,engineer,tailor,lawyer'],
... ['John Doe', 'rocket scientist,optometrist,chef,knight,sailor']]
>>> table2 = etl.splitdown(table1, 'roles', ',')
>>> table2
>>> table2.lookall()
+------------+--------------------+
| name | roles |
+============+====================+
| 'Jane Doe' | 'president' |
+------------+-----+--------------+
+------------+--------------------+
| 'Jane Doe' | 'engineer' |
+------------+-----+--------------+
+------------+--------------------+
| 'Jane Doe' | 'tailor' |
+------------+-----+--------------+
+------------+--------------------+
| 'Jane Doe' | 'lawyer' |
+------------+-----+--------------+
+------------+--------------------+
| 'John Doe' | 'rocket scientist' |
+------------+-----+--------------+
+------------+--------------------+
| 'John Doe' | 'optometrist' |
+------------+-----+--------------+
+------------+--------------------+
| 'John Doe' | 'chef' |
+------------+-----+--------------+
+------------+--------------------+
| 'John Doe' | 'knight' |
+------------+-----+--------------+
+------------+--------------------+
| 'John Doe' | 'sailor' |
+------------+-----+--------------+
+------------+--------------------+
"""

Expand Down

0 comments on commit 22adc64

Please sign in to comment.