robin-sparkless 4.4.0

PySpark-like DataFrame API in Rust on Polars; no JVM.
Documentation
{
  "name": "width_bucket",
  "pyspark_version": "3.5.0",
  "input": {
    "schema": [
      {
        "name": "id",
        "type": "bigint"
      },
      {
        "name": "val",
        "type": "double"
      }
    ],
    "rows": [
      [
        1,
        5.3
      ],
      [
        2,
        0.1
      ],
      [
        3,
        10.7
      ],
      [
        4,
        5.0
      ]
    ]
  },
  "operations": [
    {
      "op": "withColumn",
      "column": "bucket",
      "expr": "width_bucket(col('val'), 0.2, 10.6, 5)"
    },
    {
      "op": "select",
      "columns": [
        "id",
        "val",
        "bucket"
      ]
    }
  ],
  "expected": {
    "schema": [
      {
        "name": "id",
        "type": "bigint"
      },
      {
        "name": "val",
        "type": "double"
      },
      {
        "name": "bucket",
        "type": "bigint"
      }
    ],
    "rows": [
      [
        1,
        5.3,
        3
      ],
      [
        2,
        0.1,
        0
      ],
      [
        3,
        10.7,
        6
      ],
      [
        4,
        5.0,
        3
      ]
    ]
  }
}