Below is the output of the -
df['x'].value_counts()
-1 266551
1 172667
0 155994
I would like to calculate the maximum of the counts except of the value -1.
In this case, answer would be 172667.
How can i remove the value of -1 from it and select the max of other values?
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.