Spec-Zone.ru › Polars

polars.Expr.arctan

Expr.arctan() → Expr

Compute the element-wise value for the inverse tangent.

engine:In MemoryStreamingDistributed
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  │
└──────┘

© 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

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API