Question: Instruction: (Use Jupyter notebook (Python)) This is what the csv files look like: Predict the party affiliation of the House member whose votes have been

Instruction: (Use Jupyter notebook (Python))

Instruction: (Use Jupyter notebook (Python)) This is what the csv files look

This is what the csv files look like:

like: Predict the party affiliation of the House member whose votes have

Predict the party affiliation of the House member whose votes have been recorded in the file named x_new.csv. Write the code here to achieve the following output: Party Prediction: ['democrat'/' republican'] votes = pd.read_csy( 'house-votes-84 (edited).csv) new = pd.read_csv('X_new.csv') print(votes) infants 1 1 1 2 3 4 party democrat republican democrat democrat democrat 1 1 1 water budget phys_fee 1 1 1 1 1 1 1 1 3 1 el_sal religion sat_test 1 1 @ 1 1 1 1 1 @ 1 1 227 democrat 228 democrat 229 republican 23e republican 231 democrat 1 1 1 1 0 1 1 1 1 1 1 1 nic_aid mx_missile immigration synfuels education superfund crime 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 227 228 229 238 231 1 1 3 1 1 1 1 @ 1 1 1 1 1 1 1 1 duty_free south_africa 1 1 1 1 1 1 1 1 1 PWN 1 1 1 227 228 229 230 231 1 [232 rows x 17 columns print(new) 3 5 6 7 8 9 0 1 2 0 1 1 1 4 1 10 11 12 13 14 15 @ 1 0 0 0 1 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!