()
| 4510 | |
| 4511 | |
| 4512 | def test_winsorize(): |
| 4513 | arr = pa.array([10, 4, 9, 8, 5, 3, 7, 2, 1, 6]) |
| 4514 | |
| 4515 | result = pc.winsorize(arr, 0.1, 0.8) |
| 4516 | assert result.to_pylist() == [8, 4, 8, 8, 5, 3, 7, 2, 2, 6] |
| 4517 | |
| 4518 | result = pc.winsorize( |
| 4519 | arr, options=pc.WinsorizeOptions(lower_limit=0.1, upper_limit=0.8)) |
| 4520 | assert result.to_pylist() == [8, 4, 8, 8, 5, 3, 7, 2, 2, 6] |
nothing calls this directly
no test coverage detected