Skip to content

Instantly share code, notes, and snippets.

@lakshay-arora
Created October 15, 2019 12:06
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 lakshay-arora/08a005677a7d75e06cd6d136a6c54eb6 to your computer and use it in GitHub Desktop.
Save lakshay-arora/08a005677a7d75e06cd6d136a6c54eb6 to your computer and use it in GitHub Desktop.
# slice the words
my_text_file = my_text_file.map(lambda x : x[:2])
# RDD Object
print(my_text_file)
# Get the RDD Lineage
print(my_text_file.toDebugString())
# Get the first element after all the transformations
print(my_text_file.first())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment