Python Forum
Copy info of 2 files with share information
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Copy info of 2 files with share information
#1
Hi,

I´m really new using Python. But I have to solve a problem to make the analysis of my scientific data.

I have two excel files with different data:

The first one contains results of my experiments and has 6 different columns, which the second one corresponds to ID of my probe. Each probe appears 9 times because of the replicates (one replicate on each row),17109 rows total.

The second file contains many properties of each single probe, starting with ID of the probe in column one and 11 columns total length.

I want to copy the properties info of the second file in column 7 onwards of file one.

I would like to know if there is a Python script which can do that. I mean:

1) Read the probe ID in row 1 in file one
2) Seek that probe in file two
3) Select all the properties (one row, 11 columns) of file two and copy it
4) Paste all that information in file one on column 7 onwards
5) Read the probe ID in row 2 in file one...

and repeat the process for all rows in the file one.

I will appreciate your help.

Best regards


my code here
Reply
#2
that is fairly simple, especially if you convert the excel files to csv, however we are not going to do it for you. You must show us some code and ask specific questions.
start with reading our tutorial for working with files. Also read about csv module, which is part of standard python library.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Copy Paste excel files based on the first letters of the file name Viento 2 349 Feb-07-2024, 12:24 PM
Last Post: Viento
  What is all the info in the info window in Idle? Pedroski55 3 647 Jul-08-2023, 11:26 AM
Last Post: DeaD_EyE
  Timestamp of file changes if a share mapped to a server…. tester_V 34 3,714 Jul-04-2023, 05:19 AM
Last Post: tester_V
Question Need help for a python script to extract information from a list of files lephunghien 6 1,033 Jun-12-2023, 05:40 PM
Last Post: snippsat
  Create new folders and copy files cocobolli 3 1,336 Mar-22-2023, 10:23 AM
Last Post: Gribouillis
  Copy only hidden files and folders with rsync Cannondale 2 954 Mar-04-2023, 02:48 PM
Last Post: Cannondale
  Compare filename with folder name and copy matching files into a particular folder shantanu97 2 4,395 Dec-18-2021, 09:32 PM
Last Post: Larz60+
  access share attributed among several class methods drSlump 0 1,039 Nov-18-2021, 03:02 PM
Last Post: drSlump
  How to share a numpy array between 2 processes on Windows? qstdy 0 2,137 Jan-29-2021, 04:24 AM
Last Post: qstdy
  Extracting information from .xlsx files hobbyist 0 1,578 Jan-06-2021, 07:20 PM
Last Post: hobbyist

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020