Jump to content

calv84

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by calv84

  1. 1 hour ago, andershs said:

     

    This is just from the top of my head.

    But couldn't you do something like this:

    If you encounter 'm' and you know you are dealing with monetary values:

    1. Remove 'm' from the string or trim the string and set the string length to n-1
    2. Try to cast the string to float
    3. Multiply the float by 1000000

    This can similarly also be applied to 'k' monetary values (multiplying instead with 100000).

    I know there are some steps and each step could present problems, but it is worth a try.

    Of course...

     

    I'll give that a go. Thank you. 

  2. Hi guys

     

    I've been trying to teach myself Python over the last few weeks and fm seemed to be a good place to start, and this thread has been a big inspiration for me and I refer back to it every couple days.

     

    My goal is to ultimately unearth good value players from scouting only in game statistics not attributes. 

     

    An issue that i have run into is converting the Value string into a usable float.  The way the value data is extracted from the game makes it incredibly difficult (for my simple mind) to apply a set of rules to convert it into usable data.

     

    Hopefully below will highlight the issue i'm running into.

     

    The way I had been looking to take the issue is to replace K or M with a set number of 0's and remove the non-numeric characters. This is obviously isn't going to work due to the structure of the exported data. For example if i replaced M with 000000 i would receive: 

    • 2m = 2000000
    • 7.5m = 75000000
    • 9.75m = 975000000

     

    Can anyone tell me how they have solved this? Or if there is a different field available? I'm really not keen on this being a manual process. 

     

    image.png.9ee487c62bada4ca7eb9ce518e4bb7e9.png

    image.png.e1f874406140340f5bd1581a6be7131b.png

     

    image.png

×
×
  • Create New...