Python Forum
How to automate list separation. NOOB
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to automate list separation. NOOB
#1
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.
Reply


Messages In This Thread
How to automate list separation. NOOB - by LobateScarp - Sep-20-2019, 10:24 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] Automate the boring stuff, inserting commas in list srikanth 1 2,077 Jul-02-2019, 02:29 PM
Last Post: metulburr
  Automate the boring stuff, inserting commas in list DJ_Qu 3 4,655 Apr-21-2019, 03:52 PM
Last Post: perfringo
  1. How can I automate this batch creation of documents? 2. How can I automate posting SamLearnsPython 2 3,387 Jul-02-2018, 11:36 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020