I would like to ask how to pull/display/save in another data frame the IDs of those items whose 2 or more column values match together (Same), example: ID 1 and ID 2 has same Colour and Size value, So I want the output to display only ID 1 and 2 and so on.
Input Data
Data Output
Only Displays those rows which match the condition as specified in question
Thanks for your help.
Assuming this is a pandas DataFrame you can filter out text like
df[df.Color == 'Red' and df.Price > 11]
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.