cudf.DataFrame.acos#

DataFrame.acos()#

Get Trigonometric inverse cosine, element-wise.

The inverse of cos so that, if y = x.cos(), then x = y.acos()

Returns
DataFrame/Series/Index

Result of the trigonometric operation.

Examples

>>> import cudf
>>> ser = cudf.Series([-1, 0, 1, 0.32434, 0.5])
>>> ser.acos()
0    3.141593
1    1.570796
2    0.000000
3    1.240482
4    1.047198
dtype: float64

acos operation on DataFrame:

>>> df = cudf.DataFrame({'first': [-1, 0, 0.5],
...                      'second': [0.234, 0.3, 0.1]})
>>> df
   first  second
0   -1.0   0.234
1    0.0   0.300
2    0.5   0.100
>>> df.acos()
      first    second
0  3.141593  1.334606
1  1.570796  1.266104
2  1.047198  1.470629

acos operation on Index:

>>> index = cudf.Index([-1, 0.4, 1, 0, 0.3])
>>> index
Float64Index([-1.0, 0.4, 1.0, 0.0, 0.3], dtype='float64')
>>> index.acos()
Float64Index([ 3.141592653589793, 1.1592794807274085, 0.0,
            1.5707963267948966,  1.266103672779499],
            dtype='float64')