klotz: zip*

Bookmarks on this page are managed by an admin user.

0 bookmark(s) - Sort by: Date ↓ / Title / - Bookmarks from other users for this tag

  1. import org.apache.spark.sql.functions.{udf, explode}

    val zip = udf((xs: Seq Long » , ys: Seq Long » ) => xs.zip(ys))

    df.withColumn("vars", explode(zip_udf($"varA", $"varB"))).select(
    $"userId", $"someString",
    $"vars._1".alias("varA"), $"vars._2".alias("varB")).show
    2017-03-09 Tags: , , , by klotz
  2. z = zipfile.ZipFile(out, 'w', zipfile.ZIP_DEFLATED)
    2016-11-11 Tags: , by klotz

Top of the page

First / Previous / Next / Last / Page 1 of 0 SemanticScuttle - klotz.me: Tags: zip

About - Propulsed by SemanticScuttle