Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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)]

458899755582841295

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899

Students also viewed these Databases questions