<s> from __future__ import division , print_function , absolute_import <EOL> import petl as etl <EOL> import csv <EOL> table1 = [ [ '<STR_LIT:foo>' , '<STR_LIT:bar>' ] , <EOL> [ '<STR_LIT:a>' , <NUM_LIT:1> ] , <EOL> [ '<STR_LIT:b>' , <NUM_LIT:2> ] , <EOL> [ '<STR_LIT:c>' , <NUM_LIT:2> ] ] <EOL> with open ( '<STR_LIT>' , '<STR_LIT:w>' ) as f : <EOL> writer = csv . writer ( f ) <EOL> writer . writerows ( table1 ) <EOL> table2 = etl . fromcsv ( '<STR_LIT>' ) <EOL> table2 <EOL> import petl as etl <EOL> table1 = [ [ '<STR_LIT:foo>' , '<STR_LIT:bar>' ] , <EOL> [ '<STR_LIT:a>' , <NUM_LIT:1> ] , <EOL> [ '<STR_LIT:b>' , <NUM_LIT:2> ] , <EOL> [ '<STR_LIT:c>' , <NUM_LIT:2> ] ] <EOL> etl . tocsv ( table1 , '<STR_LIT>' ) <EOL> print ( open ( '<STR_LIT>' ) . read ( ) ) </s>
