This is a very simple, yet useful concept to understand.
.fit is used to execute the operation being commanded, such as calculating the mean, most frequent, or median.
After the operation is conducted, it is then entered to the data by using .transform method.