Question: I have a file path which I access like this

```
string[] pathDirs = { Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "..\\..\\")),
                "config", "file.txt" };
string pathToFile = Path.Combine(pathDirs);

```

When I run the build from within visual studio it gets the `config` directory from the root directory of the project but when I publish the build and run the program from the published build I get the error

```
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\<user>\AppData\Local\Apps\2.0\GA3VWRPE.G83\KDK3Q6QC.VP1\sv20..tion_333839f4362dc717_0001.0000_958d209d94853f42\config\file.txt'.

```

I'm unsure how to access this directory and file in the published build. How would I do this?

Answer: 
You should specify what column(s) contain(s) duplicates:

```
removeDuplicates = data.drop_duplicates(subset=['COUNTY'])

```
You need to specify not to keep any duplicates with the keyword argument `keep`:

```
removeDuplicates = data.drop_duplicates(keep=False)

```

From the [`pandas.DataFrame.drop_duplicates()`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.drop_duplicates.html) documentation:

`keep`: Determines which duplicates (if any) to keep.

* `"first"` : Drop duplicates except for the first occurrence.
* `"last"` : Drop duplicates except for the last occurrence.
* `False` : Drop all duplicates.

Note: the above only works on the rows that are completely duplicates of other rows, which in your dataframe, you have no complete duplicates.

If you only want to determine a duplicate by one or more specific columns, you can use the `subset` keyword argument:

```
removeDuplicates = data.drop_duplicates(subset=["COOUNTRY"], keep=False)

```

Also from the above linked documentation:

`subset`: Only consider certain columns for identifying duplicates, by default use all of the columns.

So, you get:

```
import pandas as pd

df = {"COUNTRY": ["Country 1", "Country 1", "Country 2", "Country 8"],
      "NAME": ["Kia", "John", "Peter", "Bob"],
      "AGE": [34, 39, 78, 30],
      "YEARS": [18, 6, 5, 2],
      "PREV_STATE": ["FL", "GA", "IN", "NY"]}

df = pd.DataFrame(df)
print(df.drop_duplicates(subset=["COUNTRY"], keep=False))

```

Output:

```
     COUNTRY   NAME  AGE  YEARS PREV_STATE
2  Country 2  Peter   78      5         IN
3  Country 8    Bob   30      2         NY

```