Skip to content

Boxscore.py #2

@molhck

Description

@molhck

ValueError : could not convert sting to float

Hi,

I'm trying to get some boxscores stats. And when I run the code, I received this error message :

ValueError : could not convert string to float : '-0,139%'

And I tried to modify some parts of the code by :

def Quantify (x):

out = []

converted = float(out.strip('.%'))

for i in x:

if len(i) < 1:

out.append(None)

else:

out.append(float(i))

return(out)

But now I get this error : AttributeError : 'list' object has no attribute 'strip'

Is something that I'm missing here ?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions