Mathematical Functions in Python- Set 4:

In this article, special functions and constants in python are there with respect to data science.

  1. gamma() – In this function, a value is given as an argument, and it returns the gamma function of the argument.

python data science

  1. pi – It is an in-built constant and returns the value of pi (3.141592)
  2. e – It is an in-built constant and returns the value of e (2.718281)

  1. inf – This constant is a positive floating point infinity constant. –inf is there when we want to denote a negative floating point infinity. So, we find this constant in Python 3.5 and above.
  2. isinf() – This function helps to check if the value is infinity or not.
  3. nan – It is a constant which denotes “Not a number” in Python. This constant is found in Python 3.5 and above.
  4. isnan() – If a number is nan then it returns true, otherwise false.

python data science

To learn more about functions 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.