polars.Expr.arctan
-
Compute the element-wise value for the inverse tangent.
- Returns:
-
- Expr
-
Expression of data type
Float64, measuring an angle in radians.
Notes
To convert the result from radians to degrees, call
.degrees().Examples
>>> df = pl.DataFrame({"a": [float("Inf"), 1, 0]}) >>> df.select(pl.col("a").arctan()) shape: (3, 1) ┌──────────┐ │ a │ │ --- │ │ f64 │ ╞══════════╡ │ 1.570796 │ │ 0.785398 │ │ 0.0 │ └──────────┘ >>> df.select(pl.col("a").arctan().degrees()) shape: (3, 1) ┌──────┐ │ a │ │ --- │ │ f64 │ ╞══════╡ │ 90.0 │ │ 45.0 │ │ 0.0 │ └──────┘
Expr.arctan() → Expr
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/expressions/api/polars.Expr.arctan.html