MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Reading csv with ;

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99448] Re: Reading csv with ;
  • From: Pillsy <pillsbury at gmail.com>
  • Date: Wed, 6 May 2009 05:21:31 -0400 (EDT)
  • References: <gtp1h5$k58$1@smc.vnet.net>

On May 5, 5:39 am, Dennis <detebe... at hotmail.com> wrote:
[...]
> With mathematica however I have so far been unable to do this. Now the question of course: how so I change the seperator with mathematica?

One solution is to use the "FieldSeparators" option in Import[] or
ImportString[], like so:

ImportString["1;2;3;4\n5;6;7;8", "Table", "FieldSeparators" ->
     {";"}]

which returns the following:

{{1, 2, 3, 4}, {5, 6, 7, 8}}

Cheers,
Pillsy


  • Prev by Date: Remove quotes from Cell Expression
  • Next by Date: Re: Re: Bug with Hypergeometric2F1?
  • Previous by thread: Re: Re: Reading csv with ;
  • Next by thread: Re: Reading csv with ;