CSV to RDataFrame

Hi,

while we implement and backport the fix, you can convert the csv to an equivalent one which will be processed by the csv source.
The python snippet to do this is the following:

import sys

lines = open(sys.argv[1]).readlines()
print lines[0],
for line in lines[1:]:
    sci_numbers = line[:-1].split(',')
    numbers = map(lambda x : "%.8f" %x, map(float, sci_numbers))
    print ",".join(numbers)

the invocation is

python convert.py myoriginal.csv >& converted.csv

The csv you pasted in the previous post contains perhaps a typo, i.e. 0.9e.5: could it be 0.9e-5?

I hope this unblocks you.

Cheers,
D

1 Like