cudf.DataFrame.atan#

DataFrame.atan()#

Get Trigonometric inverse tangent, element-wise.

The inverse of tan so that, if y = x.tan(), then x = y.atan()

Returns
DataFrame/Series/Index

Result of the trigonometric operation.

Examples

>>> import cudf
>>> ser = cudf.Series([-1, 0, 1, 0.32434, 0.5, -10])
>>> ser
0    -1.00000
1     0.00000
2     1.00000
3     0.32434
4     0.50000
5   -10.00000
dtype: float64
>>> ser.atan()
0   -0.785398
1    0.000000
2    0.785398
3    0.313635
4    0.463648
5   -1.471128
dtype: float64

atan operation on DataFrame:

>>> df = cudf.DataFrame({'first': [-1, -10, 0.5],
...                      'second': [0.234, 0.3, 10]})
>>> df
   first  second
0   -1.0   0.234
1  -10.0   0.300
2    0.5  10.000
>>> df.atan()
      first    second
0 -0.785398  0.229864
1 -1.471128  0.291457
2  0.463648  1.471128

atan 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.atan()
Float64Index([-0.7853981633974483,  0.3805063771123649,
                            0.7853981633974483, 0.0,
                            0.2914567944778671],
            dtype='float64')