- Published on
- · Data Independent
Pandas Drop Duplicates | pd.DataFrame.Drop_Duplicates()
This post is auto-generated from a public YouTube video for personal study notes. It is not an endorsement. The transcript is machine-derived and may contain errors; refer to the original video for accuracy.
About this video
Do you ever have repeat rows in your data when you don't want to? Pandas Drop duplicates will remove these for you.
Pandas DataFrame.drop_duplicates() will remove any duplicate rows (or duplicate subset of rows) from your DataFrame. It is super helpful when you want to make sure you data has a unique key or unique rows.
I use this function most when I have a column that represents a unique id of an object. I'll run .drop_duplicates() specifying my unique column as the subset.
Loading transcript…