I am currently studying about Decision tree algorithm and while studying it I found that Entropy is a measure which controls how decision tree decides how to split data

**Entropy** - Control how decision tree decides where to split data.

In the given figure, the right plot with orange box has zero entropy and left orange box does not have zero entropy.I want to know how we can calculate the entropy by just looking the distribution.

I also want to know the argument in python which helps in calculating the entropy of each class.