运行 ❯
获取你
自己的 Python
服务器
×
改变朝向
改变主题,深色/浅色
前往 Spaces
import pandas as pd data = { "name": ["Sally", "Mary", "John", "Mary"], "age": [50, 40, 30, 40], "qualified": [True, False, False, False] } df = pd.DataFrame(data) newdf = df.drop_duplicates() print(newdf)
name age qualified 0 Sally 50 True 1 Mary 40 False 2 John 30 False