# 4-5. Frame - Data Cleaning

<figure><img src="https://2909106259-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl07NBXgl5MbkBetObqPW%2Fuploads%2FxX8Z39P2LT8QLrpRq4SD%2Fimage.png?alt=media&#x26;token=2b56d9f8-be1c-4474-bd22-110f875e663a" alt="" width="470"><figcaption></figcaption></figure>

1. ***Fill NA***: Replace the value NA with another value.
2. ***Drop NA***: Removes rows or columns that contain NA values.
3. ***Fill Outlier***: Replaces outliers in a specific column.
4. ***Drop Outlier***: Removes outliers in a specific column.
5. ***Drop Duplicates***: Remove duplicate values.

***

### Fill NA

<figure><img src="https://2909106259-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl07NBXgl5MbkBetObqPW%2Fuploads%2FBw8UJ404oLWYbgd2gRIc%2Fimage.png?alt=media&#x26;token=13e5d6fa-d01c-4cd9-b22e-bff5b5a8ac39" alt="" width="388"><figcaption></figcaption></figure>

1. ***Method***: Select a fill method.
   1. **Replace&#x20;*****Value***: NA with the input value.
   2. ***Forward/Back Fill***: Replace the NA with the value before/after it. If there are consecutive NA's, you can limit the fill to only a few NA's.
   3. ***Statistics***: Replace NA with Statistics.

***

### Drop NA

<figure><img src="https://2909106259-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl07NBXgl5MbkBetObqPW%2Fuploads%2FAFAJdyeMsp1dT7dqPHMD%2Fimage.png?alt=media&#x26;token=65e57619-aceb-47ea-b4c4-850c51ee05ac" alt="" width="398"><figcaption></figcaption></figure>

1. ***How***
   1. ***Select Options***: If the number of non-missing values in any row is less than the value set in ***Threshold**,* delete that row.
   2. ***Any***: If there is any NA in the row, delete the row.
   3. ***All***: If all values in a row are NA, delete the row.
2. ***Ignore Index***: Choose whether to reset the index after the operation.

***

### Drop Duplicates

<figure><img src="https://2909106259-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl07NBXgl5MbkBetObqPW%2Fuploads%2F1cVvrmolfKJIW6C9Epu4%2Fimage.png?alt=media&#x26;token=8cc3db2d-f304-47f8-a53b-05dd20a58822" alt="" width="371"><figcaption></figcaption></figure>

1. ***Keep***: Select which of the duplicate values you want to keep. If you select ***False**,* all duplicate values will be deleted.
2. ***Ignore Index***: Choose whether to reset the index after the operation.
