You can use:
>>> df[~df.eq('?').sum(axis=1).gt(1)]
x y z
0 1 2 ?
1 3 2 1
3 2 3 1
If you're looking for any duplicates including the numbers, you can try:
>>> df.loc[~df.T.apply(pd.Series.duplicated, keep=False).T.any(axis=1)]
x y z
0 1 2 ?
1 3 2 1
3 2 3 1
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.