Skip to content

Instantly share code, notes, and snippets.

@koushikmln
Created February 6, 2018 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koushikmln/204f6e7541f5cd41a0dea87db1c95da0 to your computer and use it in GitHub Desktop.
Save koushikmln/204f6e7541f5cd41a0dea87db1c95da0 to your computer and use it in GitHub Desktop.
def getOrderItemTuples(order_items):
return list(map(lambda x: (int(x.split(",")[1]),float(x.split(",")[4])),order_items))
order_items = open("/data/retail_db/order_items/part-00000","r").read().splitlines()
getOrderItemTuples(order_items[:20])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment