Can someone identify why this code is not adding items to a .csv column?
The code below should add a movie “blah” to a column titled “Watched Movies” in a .csv file. It works the first time you use it, but does not work the second time. the message ‘”blah” has been added to your watched movies.’ prints, but it does not actually add “blah” to the column.
I am running into a problem when using python to add and remove items from a csv file
I created an excel (.csv) file with two columns – one for Movies I want to watch and one for Watched Movies. I an trying to write Python functions that can add movies to either list with some conditions. For example, if the movie is already in the list you’re trying to add it to, the user will be told that it is already in the list and the movie will not be added. Additionally, if the movie is not in the list you’re trying to add it to, but it is in the other list, the movie will be removed from that list and added to the one you want. I am using pandas to interact with the .csv file.