Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
columnを持つpandasデータ フレームがありますuniqueid。この列に基づいてデータ フレームからすべての重複を削除し、残りのすべての観測値が一意になるようにします。
pandas
uniqueid
drop_duplicates()任意のデータ フレームのメソッドもあります ( docs here )。ドロップする特定の列を引数として渡すことができます。
drop_duplicates()
df.drop_duplicates(subset='uniqueid', inplace=True)