Question
Use python with pandas: I have two csv lists of differentsizes with slightly different information but some lines in eachcsv will have a matching name
Use python with pandas: I have two csv lists of differentsizes with slightly different information but some lines in eachcsv will have a matching name and address in the other csv. I wantto compare the data of each line in one csv to another line in theother csv using the name and address to match on. If they match, Iwant to print out another csv file (matched_merged.csv) that hasnew merged lines from all the unique information for each of thetwo lines sharing the address. After I print out the matched andmerged lines in the matched_merged.csv, I want to print out all thelines from each list that didn't match any thing in the other list.Attached are two of the csv files with some sample data.
Formulas Data Review View File Home Insert Page Layout (i) POSSIBLE DATA LOSS Some features might be lost if you save this workbook in the comma-delimited (.csv) format. To preserve these features, save it in an Excel file format. fx 11 A 1 Aaron Lott 2 Abby Sherman 3 Adam Babboni 4 Alan Bristow 5 Alan D Smith Alan Stang Alex Huk 6 7 8 Alex Power 9 Allan Wehrman 10 Allen Krizak 1 Amanda 12 Amanda Forsberg 13 Amanda Hayley 14 Amber Burt 15 Amy Alderson 16 Amy Holmquest 17 Amy Humphries 18 Andre Garner 19 Andrea Rivera 20 Andy Betz 21 Angela Brown 22 Angela Deaton 23 anhite 24 25 26 X B 1925 Cripple Creek Stage Rd 70 Breed Rd 180 Gant Rd 3150 Stagecoach Ranch Loop 2620 Martin Rd 509 Stonegate Lane 400 Twin Oaks Trail 421 Hummingbird Way 1201 Stagecoach Ranch Loop 639 Soda Creek Rd 7970 E. Hwy 290 695 Narrows Rd 1176 Whitetail 130 Bedford Drive 601 Hillview Circle 1301 CR 486 355 Pug Rippy 5701 Fitzhugh Rd 1325 Old Red Ranch Rd 400 Ted Burger 100 Commons #7-358 3499 Fearless Treadway Lot #10 3499 Fearless Treadway Lot 9 Dripping Springs Dripping Springs Dripping Springs Dripping Springs Dripping Springs Dripping Springs Dripping Springs Spicewood Dripping Springs Spicewood Johnson City Blanco Dripping Springs Spicewood Dripping Springs Novice Help Dripping Springs Dripping Springs Dripping Springs Dripping Springs Dripping Springs Dripping Springs Round Mountain TX TX TX TX TX TX TX TX TX TX * * * * * * * * * * * * * TX TX TX TX TX TX TX TX TX TX TX TX TX D E 78620 78620 78620 78620 78620 78620 78620 78669 78620 78669 78636 78606 78620 78669 78620 79538 78620 78620 78620 78620 78620 78620 78606 F 5 8 X 5 5 5 5 10 10 20 X 5 5 10 10 10 10 5 5 10 5 5 10 10 15 X G 1 1 1 1 1 1 2 1 1 2 2 2 2 1 1 1 1 1 2 2 H 4.8209E+14 4.8209E+14 4.8209E+14 4.8209E+14 4.8209E+14 4.8209E+14 4.8209E+14 4.8054E+14 4.8453E+14 4.8054E+14 4.8032E+14 4.8032E+14 4.8032E+14 4.8054E+14 4.8209E+14 4.8084E+14 4.8209E+14 4.8209E+14 4.8209E+14 4.8209E+14 4.8209E+14 4.8209E+14 4.8209E+14 Don't show again I 10/7/2021 Need year 7/9/2020 J 10/19/2020 spellling QB 4/9/2020 10/16/2020 10/29/2020 9/1/2020 Save As... K L Sh M
Step by Step Solution
3.38 Rating (154 Votes )
There are 3 Steps involved in it
Step: 1
Answer Here is the solution import csv import pandas as pd import numpy as np ...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