Hello there,
I'm using python to read .csv files, and then manipulate it's Series and DataFrames.
Anyways, I'm trying to figure out how to implement a remove duplicates functionality for all the cells of one or more columns of a DataFrame read from a .csv file, in which inside the python script, you set what symbol you want the duplicates to be removed for in all the cells of the column(s) of the DataFrame, with an exception, do not remove duplicates of a symbol when that symbol is the only symbol of a cell, and it's by itself in that cell with no other values.
Example:
If you have columns A and B, and within both of the columns there's dashes( - minus symbol/character) being used, if those dashes are being used with other symbols, like for example: 852-541-897 or 4-12-2021 or bob-tom or -c, then remove those dashes leaving the other symbol(s) there, example continued, result data of cells after duplicate function is applied: 852541897 or 4122021 or bobtom or c, but, the only exception is when a single dash - is by itself in a cell with no other values, in that case do not remove that single - that's by itself in the cell with no other values. A single dash - by itself in a cell with no other values has special meaning for my use case, so I don't want those dash specific single dash - duplicates removed unless they're with other values.
note: i'm aware that when opening a .csv file in excel, that excel has a remove duplicates button, but it would also remove the single dash - duplicates that are by themselves in the cell without any other values, so i'm trying to write a simple python script to account for this exception, that gets applied to the entire DataFrame's column(s) cell values.
also, one last thing, i'm going to use pyinstaller to generate an executable from the python file, to double click on, so i'm also wondering, what python package has the functionality, so that when I double click the python executable it brings up the windows 10 file explore(which opens up in the path relative to the path(current working directory) where the python executable is double clicked in.), so that 1 or more .csv files can be selected all at once, so that the remove duplicates functionality knows what .csv files to be applied to.
I hope I explained this specific remove duplicates functionality clearly,
thanks in advance for the help!