[ncl-talk] CSV Data Spacing

Rick Brownrigg brownrig at ucar.edu
Fri Nov 4 14:05:12 MDT 2016


Hi Michelle,

I'm not sure what the question is.  The output is consistent with the
documented behavior of write_table -- which states that if no explicit with
is given in the format codes, then the "default" behavior results (hence,
the variable-length, per-variable, per-value widths).  If you want nice
tabular output, use explicit widths.  On the other hand, "CSV" means
comma-separated:  if you want commas in the output, change you format to
look something like "%g,%g,%g,%g,%g,%g,%g"

Hope that helps...
Rick


On Fri, Nov 4, 2016 at 1:31 PM, Michelle Serino <mmserino at tamu.edu> wrote:

> Good afternoon everyone,
>
> I have code (attached) that creates soundings from RUC data (data
> <https://drive.google.com/file/d/0B0VUa1xUjt5GaUVkMFd5MlgxWGM/view?usp=sharing>)
> and writes that data to csv files.  The delimiter is a single space, but
> when looking at the csv file (screen shot attached), the spacing is not
> consistent.  It appears that this is due to simply the size of the numbers
> in other columns, but it seems to be affecting other code I have that reads
> this file.  The only place the delimiter is specified is on line 116 of my
> code, and below that is where I write the data to the file.  I do not
> currently have direct access to my code, so I hope the format I provided is
> easily executable.  I appreciate the help.
>
> Thank you,
>
> Michelle Serino
>
> Michelle M. Serino
> M.S. Candidate
> Texas A&M University
> Atmospheric Sciences Dept.
> Eller O&M, Suite 1017
> College Station, TX 77843
> (484) 769-0949
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161104/bea0878d/attachment.html 


More information about the ncl-talk mailing list