Sep-20-2019, 10:24 AM
Good day.
I just installed my 1st Python IDE (IDLE) in order to find the max, 2nd max, and min values from a data set.
The problem is that the enormous data set text files I copy/paste from have dates and values but no commas.
Is there a way for me to automate the task of removing dates and ordering what's left into a list?
I haven't been able to find anything to do so; maybe I just don't know how to phrase such a question into my search engine. I have also installed Spyder if that is of any help. I run Linux.
Sample raw data I need to sort/list (I just need the values at the end of the strings:)
2009 09 23 11 45 00 1 9999.000
2009 09 23 12 00 00 1 9999.000
2009 09 23 12 15 00 1 4593.017
2009 09 23 12 30 00 1 4593.005
2009 09 23 12 45 00 1 4592.993
I would need to quickly get max (4593.017) and min (4592.993) while ignoring all the 9999.000s and the rest of the values.
I figure that if I just replace the spaces with commas it might work, but then I wouldn't get the min values, not that I know how to do that either. ;) An ascending/descending sorting would be easy enough to scroll through, though, and given my lack of coding knowledge, I would gladly accept using that method.
I tried this (and others) but without success:
https://stackoverflow.com/questions/2694...with-comma
advTHANKSance for any assistance you can provide.
I just installed my 1st Python IDE (IDLE) in order to find the max, 2nd max, and min values from a data set.
The problem is that the enormous data set text files I copy/paste from have dates and values but no commas.
Is there a way for me to automate the task of removing dates and ordering what's left into a list?
I haven't been able to find anything to do so; maybe I just don't know how to phrase such a question into my search engine. I have also installed Spyder if that is of any help. I run Linux.
Sample raw data I need to sort/list (I just need the values at the end of the strings:)
2009 09 23 11 45 00 1 9999.000
2009 09 23 12 00 00 1 9999.000
2009 09 23 12 15 00 1 4593.017
2009 09 23 12 30 00 1 4593.005
2009 09 23 12 45 00 1 4592.993
I would need to quickly get max (4593.017) and min (4592.993) while ignoring all the 9999.000s and the rest of the values.
I figure that if I just replace the spaces with commas it might work, but then I wouldn't get the min values, not that I know how to do that either. ;) An ascending/descending sorting would be easy enough to scroll through, though, and given my lack of coding knowledge, I would gladly accept using that method.
I tried this (and others) but without success:
https://stackoverflow.com/questions/2694...with-comma
advTHANKSance for any assistance you can provide.