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 8740013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:03:22+00:00 2026-06-13T11:03:22+00:00

So I have to take information from a large data file that has 14

  • 0

So I have to take information from a large data file that has 14 properties (columns). Using this information I was able to take the data and combine it into a list of floats. I have to analyse it and was required to normalise the values (value – minvalue)/(maxvalue – minvalue). I then put the original value list into a dictionary with the normalised values to that they are still related.

I need to now take 2 different keys of this dictionary which correspond to 2 different lists of normalised values and then subtract them from each other for further analysis.

Sample of my dictionary info:

    (3.0, 13.73, 4.36, 2.26, 22.5, 88.0, 1.28, 0.47, 0.52, 1.15, 6.62, 0.78, 1.75, 520.0): 
    [0.7105263157894738, 0.7154150197628459, 0.4812834224598929, 0.6134020618556701, 0.1956521739130435, 0.10344827586206898, 0.02742616033755273, 0.7358490566037735, 0.2334384858044164, 0.4556313993174061, 0.2439024390243903, 0.1758241758241758, 0.17261055634807418]

there are over 100 similar entries

Using Python3 and no libraries apart from math
Any help is appreciated but if you feel there is an easier way to do this please let me know.

Edit: I cannot use any imported libraries

Ill add in some of my code but I have to snip a large portion of it out as it is much too large to include in this post.

     for line in temp_file: 
        line = line.strip()                                         #remove white space
        line_list = line.split(",")                                 #split the list into components seperated by commas
        temp_list2 = []
        for item in line_list[0:]:                                 
              value_float = float(item)                             #make values currently of type string into type float
              temp_list2.append(value_float)
        tuple_list = tuple(temp_list2)                              #make each item into a seperate tuple and then list
        data_list.append(tuple_list)                                #these tuples in a master list data_list
  prop_elts = [(x[1:]) for x in data_list]

——snip——– (here is just where i defined each of the columns and then calculated the normalised values)

   i =  0
  while i < len(data_list):
      all_props_templist = [prop1_list[i],prop2_list[i],prop3_list[i],prop4_list[i],prop5_list[i],prop6_list[i],prop7_list[i],prop8_list[i],prop9_list[i],prop10_list[i],prop11_list[i],prop12_list[i],prop13_list[i]] 
      all_properties.append(all_props_templist)  
      i = i + 1  
  my_data_Dictionary = {el1: el2 for el1, el2 in zip(data_list,all_properties )}
  • 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-13T11:03:22+00:00Added an answer on June 13, 2026 at 11:03 am

    If data is your dict,

    [a-b for a, b in zip(data[key1], data[key2])]
    

    is a list whose elements are the diffference between the corresponding elements in data[key1] and data[key2].


    PS. When you see numbered variable names:

      all_props_templist = [prop1_list[i],prop2_list[i],prop3_list[i],prop4_list[i],prop5_list[i],prop6_list[i],prop7_list[i],prop8_list[i],prop9_list[i],prop10_list[i],prop11_list[i],prop12_list[i],prop13_list[i]] 
    

    know that the situation is crying out for a list with an index in place of the number:

    all_props_templist = [prop_list[j][i] for j in range(13)]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class that has to take product information from one system's database
I have a large (~50Mb) file containing poorly formatted XML describing documents and properties
at the moment I have a small application and need to take information from
I am using Oracle 10g, and I have a view that joins two large
So I have this form that has tons of text boxes, combo boxes, etc.
I have a large collection of custom objects that I have retrieved from a
i have a extremely large xml-file - which is derived from the field of
I have a MySQL database and I use a while loop to take information
I have to take 2 values from DateTimePicker and then compare their values with
I have a situation where i have to take input(form) from user. After continue

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.