Sum the values of column matching and not matching from a txt file and write output to a two different files using Python

+1 vote
Name                                                    value

DR_CNDAOFSZAPZP_GPFS_VOL.0 139264

DR_CNDAOFSZAPZP_GPFS_VOL.1 15657

DR_CNDAOFSZAPZP_GPFS_VOL.0 139264

DR_CNDAOFSZAPZP_GPFS_VOL.1 156579

DR_CNDAOFSZAPZP_GPFS_VOL.2 156579

DR_CNDAOFSZAPZP_GPFS_VOL.3 156579

DR_CNDAOFSZAPZP_GPFS_VOL.5 172236

Output1

     Name                                                  \Value

DR_CNDAOFSZAPZP_GPFS_VOL.0 278528

DR_CNDAOFSZAPZP_GPFS_VOL.1 172236

Output2 with out matching names

DR_CNDAOFSZAPZP_GPFS_VOL.2 156579

DR_CNDAOFSZAPZP_GPFS_VOL.3 156579

DR_CNDAOFSZAPZP_GPFS_VOL.5 172236
Nov 20, 2019 in Python by Sagar
• 130 points
1,165 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Python

–1 vote
2 answers
+1 vote
1 answer
0 votes
1 answer

How to list a column of float values from csv file without importing (Python)

Using the default CSV module Demo: import csv with open(filename, "r") ...READ MORE

answered Sep 16, 2020 in Python by Rajiv
• 8,910 points
8,896 views
0 votes
1 answer

How to find the value of a row in a csv file in python and print column and row of that value ?

Hello @Khanhh , Use panda to find the value of ...READ MORE

answered Oct 15, 2020 in Python by Niroj
• 82,880 points
6,714 views
0 votes
1 answer

How to use read a WSDL file from the file system using Python suds?

Hi, good question. It is a very simple ...READ MORE

answered Jan 21, 2019 in Python by Nymeria
• 3,560 points
8,248 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,391 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP