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 in Python by Sagar
• 130 points
98 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

0 votes
1 answer
+1 vote
1 answer
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 in Python by Nymeria
• 3,520 points
751 views
0 votes
1 answer

How can I find out the index of an element from row and column in Python?

You probably want to use np.ravel_multi_index: [code] import numpy ...READ MORE

answered Apr 16, 2018 in Python by charlie_brown
• 7,720 points
107 views
+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 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 400 views