Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cust Country Region value product
- 100 france europe 1 x
- 101 france europe 2 x
- 102 poland europe 3 x
- 103 poland europe 3 y
- 104 france europe 4 y
- 105 france europe 5 y
- cust Country Region value product min_x
- 100 france europe 1 x 1
- 101 france europe 2 x 1
- 102 poland europe 3 x 1
- 103 poland europe 3 y 3
- 104 france europe 4 y 3
- 105 france europe 5 y 3
- df = spark.read.csv('dataset',header=True)
- df1 = df.groupBy('Product').agg(min(df.value).alias('min_x))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement