Skip to content
Advertisement

comparing multiple columns in dataframe (more than 2)

I have a data frame

JavaScript

my code

JavaScript

requirement all the ranks must be different then 1 else 0 but I am getting b also as 1

Advertisement

Answer

We can filter the rank like columns, then use nunique along axis=1 to check for the occurrence of N unique values

JavaScript

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement