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
#1
So im not looking for functional code, i want to keep learning and just need suggestions or pointers on what to look at in order to accomplish the following:

I have a CSV file with (IP, Store, Register, Status) this is provided from one system. Then in a totally different system we have support tickets, which we can get an export out of in CSV as well. It will contain (Store, Problem Description, Problem #, Date Opened)

The common link between the 2 csv files is the store #, so i would like to be able to write some logic to consume both files, and "search/return" all records from csv file #2 that exist in csv #1 by store and have a new dataframe returned with just those results.

Simple Example
CSV #1 (Store 5 was reported as "Down" when the ping script ran)
111.22.33.4 , 4, 200, 0
111.22.34.5 , 5, 201, 1
111.22.35.6 , 6, 202, 0
111.22.35.7 , 6, 203, 0


CSV #2 (Service report shows that there is currently a ticket/problem opened for Store 6)
6,"Register 202 down", 29743, 11/7/2023
6,"Register 203 down", 29745, 11/7/2023

Return a dataframe that returns a total count of records found by store

Expected Dataframe Data: (Store, Ticket Count, [Ticket #])
If possible in the dataframe, if not in whatever can return the data in this structure

4,0,0
5,0,0
6,2,[29743,29745]

If this is possible, what should i look at using? Pandas Dataframes, Series, Numpy, etc....)
Looking for suggestions on being able to accomplish this efficiently
Reply


Messages In This Thread
Logic suggestions for comparing 2 csv's - by cubangt - Nov-08-2023, 02:41 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Require Some Suggestions gouravlal 2 2,012 Jul-27-2020, 06:14 AM
Last Post: gouravlal
  Python Debugger Suggestions nilamo 3 3,216 Oct-22-2018, 07:05 PM
Last Post: jdjeffers
  Logic error when comparing randomly generated integers SadoDeomeoon 5 4,818 Jun-05-2017, 02:38 PM
Last Post: SadoDeomeoon
  Learning Python, need suggestions vkozinec 1 32,825 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