From cfbcdfeeec22ae94c4dd18bfa13c6b27fc350e58 Mon Sep 17 00:00:00 2001 From: Karneades Date: Mon, 13 May 2019 21:08:52 +0200 Subject: [PATCH] Add csv example to docs for multiple source files --- docs/dsl/csv.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/dsl/csv.rst b/docs/dsl/csv.rst index 8f5ab07..fc9f055 100644 --- a/docs/dsl/csv.rst +++ b/docs/dsl/csv.rst @@ -12,6 +12,14 @@ The ``csv`` method is a member of ``Squib::Deck``, but it is also available outs Squib::Deck.new(cards: data['name'].size) do end +If you have multiple source files which you would like to concatenate use the following:: + + cards1 = Squib.csv file: 'cards1.tsv', col_sep: "\t" + cards2 = Squib.csv file: 'cards2.tsv', col_sep: "\t" + + all_cards = cards1 + all_cards['column1'] += cards2['column1'] + all_cards['column2'] += cards2['column2'] Options -------