Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need help in python using panda dataframe for this coding practice Load the dataset file into a variable named df and do the following: 1.

need help in python using panda dataframe for this coding practice

Load the dataset file into a variable named df and do the following: 1. Perform the merge of the FIRST_NAME and CITY columns separated by a , (comma) only for students with MAJOR_DESC = Biology and store them in another variable called "series" (This variable will be "m" rows by 1 column).

image text in transcribed 2. Transform series(mx1) to a single row and 1 column by concatenating all rows and save it to another variable out (separated by commas)

image text in transcribed 3. Save the result contained in out to a file outFile_1.CSV

image text in transcribed

NOTE: Use a for loop to automatically produce the 1 outFile_*.CSV files for Biology. The general idea is presented in the following figure.

image text in transcribed______> outfile_1.csv

dataset.csv

FIRST_NAME CITY MAJOR_DESC GPA
ABIMAEL Manati CRIMINAL JUST FORENSIC INVEST 3.18
ADIAN Carolina BUSINESS ADMIN GENERAL PROGRAM 3
ADIELYS San Juan BUSINESS ADMIN GENERAL PROGRAM 1.5
ADRIANA Bayamon BIOLOGY 2.25
ADRIANA Sabana Seca CRIMINAL JUST FORENSIC INVEST 2.9
ADRIANA San Juan CRIMINAL JUST FORENSIC INVEST 3.26
ADRIANA San Juan MARKETING 3
AIRAM Bayamon FORENSIC SCIENCES 1.29
ALANIS Corozal COSMETOLOGY TECHNICIAN 4
Qute = adriana, Balumon, alondra, Tae-basa.on (11) "save" outfile_1.csy dataset \& Progrima

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_2

Step: 3

blur-text-image_3

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

Database Fundamentals Study Guide

Authors: Dr. Sergio Pisano

1st Edition

B09K1WW84J, 979-8985115307

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago