Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python Convert txt file into list to be able to do mapreduce. Incoming file is a txt (see picture attached for reference), values in each
Python
Convert txt file into list to be able to do mapreduce.
Incoming file is a txt (see picture attached for reference), values in each row are stored into a single column as string values, when imported it gets saved as pyspark.sql.dataframe.
I need them to be split and saved in the following format df = [(4,5),(5,8),(8,2),(8,8),(9,4),(9,1),(7,2),(5,9),(5,5)]
458899755582841295Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started