polars.Expr.arccos
-
Compute the element-wise value for the inverse cosine.
- 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": [1.0, 0.5, 0]}) >>> df.select(pl.col("a").arccos()) shape: (3, 1) ┌──────────┐ │ a │ │ --- │ │ f64 │ ╞══════════╡ │ 0.0 │ │ 1.047198 │ │ 1.570796 │ └──────────┘ >>> df.select(pl.col("a").arccos().degrees()) shape: (3, 1) ┌──────┐ │ a │ │ --- │ │ f64 │ ╞══════╡ │ 0.0 │ │ 60.0 │ │ 90.0 │ └──────┘
Expr.arccos() → Expr
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/expressions/api/polars.Expr.arccos.html