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

Quick question about this line of code

$
0
0

@moex wrote:

While I was walking through this tutorial https://www.analyticsvidhya.com/blog/2016/02/complete-tutorial-learn-data-science-scratch/ I stumbled upon this line of code, I am not sure whether I understand how it works properly, but it seems to me that the median is calculated every time the condition is true.
combi$Item_Weight[is.na(combi$Item_Weight)] <- median(combi$Item_Weight, na.rm = TRUE);

Is the median here calculated every time it finds a missing data?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles