In this article, special functions and constants in python are there with respect to data science.
- gamma() – In this function, a value is given as an argument, and it returns the gamma function of the argument.
- pi – It is an in-built constant and returns the value of pi (3.141592)
- e – It is an in-built constant and returns the value of e (2.718281)
- 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.
- isinf() – This function helps to check if the value is infinity or not.
- nan – It is a constant which denotes “Not a number” in Python. This constant is found in Python 3.5 and above.
- isnan() – If a number is nan then it returns true, otherwise false.