Mathematical Functions in Python- Set 2:

Logarithmic and Power functions in python for data science:

  1. exp(a) – When this function is called, it returns the value of ‘e’ raised to the power ‘a’ (e**a).
  2. log(a, b) – This function will return the logarithmic value of ‘a’ with base ‘b’. In the case base is not mentioned, then natural log is computed.

python data science 

  1. log2(a) – This function is there when we need to compute value of log ‘a’ with base 2. This value is more accurate than the log function.
  2. log10(a) – This function is there for computing value of log ‘a’ with base 10. The value returned is more accurate than values returned by the above functions.

  1. pow(a,b) – It is there for computing value of ‘a’ raised to the power ‘b’ (a**b).
  2. sqrt() – This is there to return the square root of a number.

python data science 

To learn more about function in python for data science, you can check this and this as well.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.