Python Forum
Logic suggestions for comparing 2 csv's
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Logic suggestions for comparing 2 csv's
#5
In your example which is the "support ticket file" and which is the "already opened ticket file"?

"opened tickets" sounds like it should be a database. Your ping results should open a ticket for a register that is down, and repairing a register should close the ticket. You can tell the database to only open the ticket if there is no open ticket for the register.

A file can stand in as a database, but it is a clunky substitute. You could read in your list of open tickets (do you need the store number?) and save as a set. Before opening a ticket, check if the register number is in the open ticket set. You could do this with pandas using the "isin()" function. The set of registers with open tickets would be the "values" for the function.

https://pandas.pydata.org/pandas-docs/st....isin.html
Reply


Messages In This Thread
RE: Logic suggestions for comparing 2 csv's - by deanhystad - Nov-08-2023, 10:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Require Some Suggestions gouravlal 2 1,924 Jul-27-2020, 06:14 AM
Last Post: gouravlal
  Python Debugger Suggestions nilamo 3 3,121 Oct-22-2018, 07:05 PM
Last Post: jdjeffers
  Logic error when comparing randomly generated integers SadoDeomeoon 5 4,726 Jun-05-2017, 02:38 PM
Last Post: SadoDeomeoon
  Learning Python, need suggestions vkozinec 1 27,477 Mar-22-2017, 06:43 PM
Last Post: wavic

Forum Jump:

User Panel Messages

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