Sharan Basappa writes:
>>
>> Note that the commas are within the quotes. I'd say Andrea is correct:
>> This is a tab-separated file, not a comma-separated file. But for some
>> reason all fields except the last end with a comma.
>>
However, genfromtxt is not a full-fledged CSV parser. It does
Sharan Basappa wrote:
Now, if you see the print after getting the data, it looks like this:
##
[['"\t"81' '"\t5c']
['"\t"04' '"\t11']
['"\t"e1' '"\t17']
['"\t"6a' '"\t6c']
['"\t"53' '"\t69']
['"\t"98' '"\t87']
['"\t"5c' '"\t4b']
#
On Sunday, 8 September 2019 12:45:45 UTC-4, Peter J. Holzer wrote:
> On 2019-09-08 05:41:07 -0700, Sharan Basappa wrote:
> > On Sunday, 8 September 2019 04:56:29 UTC-4, Andrea D'Amore wrote:
> > > On Sun, 8 Sep 2019 at 02:19, Sharan Basappa
> > > wrote:
> > > > As you can see, the string "\t"81
On 2019-09-08 05:41:07 -0700, Sharan Basappa wrote:
> On Sunday, 8 September 2019 04:56:29 UTC-4, Andrea D'Amore wrote:
> > On Sun, 8 Sep 2019 at 02:19, Sharan Basappa
> > wrote:
> > > As you can see, the string "\t"81 is causing the error.
> > > It seems to be due to char "\t".
> >
> > It is n
On Sunday, 8 September 2019 04:56:29 UTC-4, Andrea D'Amore wrote:
> On Sun, 8 Sep 2019 at 02:19, Sharan Basappa 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.
> > I
On Sun, 8 Sep 2019 at 02:19, Sharan Basappa 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
On Saturday, 7 September 2019 21:18:11 UTC-4, MRAB wrote:
> On 2019-09-08 01:19, Sharan Basappa wrote:
> > I am trying to read a log file that is in CSV format.
> >
> > The code snippet is below:
> >
> > ###
> > import matplotlib.pyplot as plt
> > import seaborn as sn
On 2019-09-08 01:19, Sharan Basappa wrote:
I am trying to read a log file that is in CSV format.
The code snippet is below:
###
import matplotlib.pyplot as plt
import seaborn as sns; sns.set()
import numpy as np
import pandas as pd
import os
import csv
from numpy imp
On Sat, Sep 7, 2019 at 8:28 PM Joel Goldstick wrote:
>
> On Sat, Sep 7, 2019 at 8:21 PM Sharan Basappa
> wrote:
> >
> > I am trying to read a log file that is in CSV format.
> >
> > The code snippet is below:
> >
> > ###
> > import matplotlib.pyplot as plt
> > import
On Sat, Sep 7, 2019 at 8:21 PM Sharan Basappa wrote:
>
> I am trying to read a log file that is in CSV format.
>
> The code snippet is below:
>
> ###
> import matplotlib.pyplot as plt
> import seaborn as sns; sns.set()
> import numpy as np
> import pandas as pd
> import
I am trying to read a log file that is in CSV format.
The code snippet is below:
###
import matplotlib.pyplot as plt
import seaborn as sns; sns.set()
import numpy as np
import pandas as pd
import os
import csv
from numpy import genfromtxt
# read the CSV and get into X
11 matches
Mail list logo