Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

What does mode(x).mode[0] mean?

$
0
0

@AnnaList wrote:

from scipy.stats import mode
#Determing the mode for each
outlet_size_mode = data.pivot_table(values=‘Outlet_Size’, columns=‘Outlet_Type’,aggfunc=(lambda x:mode(x.dropna()).mode[0]))

what does the highlighted part mean?
how does the code work?

The output is as provided.

image

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles