Nov-08-2023, 07:41 PM
(This post was last modified: Nov-08-2023, 07:41 PM by deanhystad.)
Why do you want to make a file like this?
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.
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.