Mathematical Functions in Python- Set 1:

Numeric Functions in python for data science:

We can import a module “math” for performing mathematical operations in Python.

1. ceil() – When we use this function, it returns the smallest integral value greater than the number. In case the number is already an integer, the same number will return.
2. floor() – When this function is called, it returns the greatest integral value smaller than the number. In case the number is already an integer, the same number is return.
3. fabs() – It returns the absolute value of a number.
4. factorial() – It returns the factorial of a number. In case the number is not integral, an error message is shown.
5. copysign(a, b) – When we use this function it returns the number with value of ‘a’ but with sign of ‘b’. The value which we get back is of float type.
6. gcd() – This function takes two numbers as arguments. When the function is called, it computes the greatest common divisor of the numbers given in the argument. This function is found in Python 3.5 and above.

If you want to learn more about fucntion in python for data science then you can check this and this as well. These blogs will help you in getting a better idea of the industry.

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