Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8169399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:50:18+00:00 2026-06-06T20:50:18+00:00

I have data in textfile. example. A B C D E F 10 0

  • 0

I have data in textfile. example.

A B C D E F
10 0 0.9775 39.3304 0.9311 60.5601
10 1 0.9802 32.3287 0.9433 56.1201
10 2 0.9816 39.9759 0.9446 54.0428
10 3 0.9737 37.8779 0.9419 56.3865
10 4 0.9798 34.9152 0.905 69.0879
10 5 0.9803 50.057 0.9201 64.6289
10 6 0.9805 39.1062 0.9093 68.4061
10 7 0.9781 33.8874 0.9327 60.7631
10 8 0.9802 32.5734 0.9376 60.9165
10 9 0.9798 32.3466 0.94 54.7645
11 0 0.9749 40.2712 0.9042 71.2873
11 1 0.9755 35.6546 0.9195 63.7436
11 2 0.9766 36.753 0.9507 51.7864
11 3 0.9779 35.6485 0.9371 59.2483
11 4 0.9803 35.2712 0.8833 79.0257
11 5 0.981 46.5462 0.9156 66.6951
11 6 0.9809 41.8181 0.8642 83.7533
11 7 0.9749 36.7484 0.9259 62.36
11 8 0.9736 36.8859 0.9395 58.1538
11 9 0.98 32.4069 0.9255 61.202
12 0 0.9812 37.2547 0.9121 68.1347
12 1 0.9808 31.4568 0.9372 55.9992
12 2 0.9813 36.5316 0.9497 53.1687
12 3 0.9803 33.1063 0.9051 69.8894
12 4 0.9786 35.0318 0.8968 72.9963
12 5 0.9756 63.441 0.9091 69.9482
12 6 0.9804 39.1602 0.9156 65.2399
12 7 0.976 35.5875 0.9248 62.6284
12 8 0.9779 33.7774 0.9416 56.3755
12 9 0.9804 32.0849 0.9401 55.2871

I want the sum of column C. With the condition that. Column A has a value that is unique (10 lines). Please advise me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T20:50:19+00:00Added an answer on June 6, 2026 at 8:50 pm
    with open('data.txt') as f:
        next(f)
        d=dict()
        for x in f:
            if x.split()[0] not in d:
                d[x.split()[0]]=float(x.split()[2])
            else:
                d[x.split()[0]]+=float(x.split()[2])
    

    output:

    {'11': 9.7756, '10': 9.791699999999999, '12': 9.7925}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some data which I run through, which generates a textfile. The data
I have a text logfile, containing lines of data separated by | for example
I have to read in some data from text files formated like the example
I have text file(test.data), which include some values and class name, for example 4.5,3.5,U1
I have text file(test.data), which include(this is just example other files have more values....)
I have almost 100MB of example.sql file. (Actually data export file from another database)
I have multiple textfiles with data as follows: 0.000000E+0 0.000000E+0 1.800000E-1 0.000000E+0 4.200000E-1 0.000000E+0
This is the data in my text file: (I have shown 10 rows out
We have some C# code that reads data from a text file using a
I have Text file that contains data separated with a comma , . How

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.