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
#3
Why do you want to make a file like this?
Output:
4,0,0 5,0,0 6,2,[29743,29745]
What is the purpose? It is not an easy format to work with. When writing this dataframe I think pandas would save as.
Output:
4,0,0 5,0,0 6,2,"[29743,29745]"
Quotes are placed around the list to indicate the list is a single value. The quotes also turn the list into a string. When you read the CSV file you'll have to convert the list-like string back to a list.

If you want to make a file that contains this kind of information I suggest using a json format file. But first you should really think about if a list like this, containing so little information, is worth making.
Reply


Messages In This Thread
RE: Logic suggestions for comparing 2 csv's - by deanhystad - Nov-08-2023, 07: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,824 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