issue in handling CSV data

Andrea D'Amore a at d-amo.re
Sun Sep 8 04:35:24 EDT 2019


On Sun, 8 Sep 2019 at 02:19, Sharan Basappa <sharan.basappa at gmail.com> wrote:
 This is the error:
> my_data_3 = my_data_2.astype(np.float)
> could not convert string to float: " "81

> As you can see, the string "\t"81 is causing the error.
> It seems to be due to char "\t".

It is not clear what format do you expect to be in the file.
You say "it is CSV" so your actual payload seems to be a pair of three
bytes (a tab and two hex digits in ASCII) per line.

Can you paste a hexdump of the first three lines of the input file and
say what you expect to get once the data has been processed?


-- 
Andrea



More information about the Python-list mailing list