SHARE
TWEET

Untitled

a guest Jul 19th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cust    Country Region  value   product
  2.  100    france  europe   1       x
  3.  101    france  europe   2       x
  4.  102    poland  europe   3       x
  5.  103    poland  europe   3       y
  6.  104    france  europe   4       y
  7.  105    france  europe   5       y
  8.      
  9. cust    Country Region  value   product min_x
  10.  100    france  europe  1   x   1
  11.  101    france  europe  2   x   1
  12.  102    poland  europe  3   x   1
  13.  103    poland  europe  3   y   3
  14.  104    france  europe  4   y   3
  15.  105    france  europe  5   y   3
  16.  
  17.  
  18.  
  19.  df = spark.read.csv('dataset',header=True)
  20.  df1 = df.groupBy('Product').agg(min(df.value).alias('min_x))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top