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
#10
If there are 4000 buoys I can't consider manual labor 'much easier' (if there are only two files then maybe ;-).

If I look at the link:

https://www.ndbc.noaa.gov/view_text_file...ical/dart/

I see that there is filename with some data embedded int it: 55023t2009

You should find the pattern what those numbers mean and take advantage of it: let Python download all the files into one directory, then create list of files in directory and then iterate over all files to find maximum (or minimum) value. While Python is doing it you can grab a coffee (or tea or Red Bull or whatever drink you like) :-)

EDIT: it's Friday afternoon and I am not the sharpest pencil in the box. You can read and process files without need to save in local disk, but you still need to find pattern how filenames are constructed.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Messages In This Thread
RE: How to automate list separation. NOOB - by perfringo - Sep-20-2019, 01:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] Automate the boring stuff, inserting commas in list srikanth 1 2,130 Jul-02-2019, 02:29 PM
Last Post: metulburr
  Automate the boring stuff, inserting commas in list DJ_Qu 3 4,722 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,444 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