Python Forum
Reading Multiple text Files in pyhton
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reading Multiple text Files in pyhton
#1
I have been working on .txt format files. Almost 13 k files and wanted to extract Age and gender from all the files in separate csv file . I have tired number of different methods but I'm unable to do that.
Pleas help me out.

Here is how does the data looks like:


Output:
A0002 12 500 5000 12-May-2020 12:33:59 A0002.mat 16+24 1000/mV 16 0 -1 -1 0 I A0002.mat 16+24 1000/mV 16 0 -15 22 0 II A0002.mat 16+24 1000/mV 16 0 -15 -8 0 III A0002.mat 16+24 1000/mV 16 0 7 5 0 aVR A0002.mat 16+24 1000/mV 16 0 8 23 0 aVL A0002.mat 16+24 1000/mV 16 0 -16 -21 0 aVF A0002.mat 16+24 1000/mV 16 0 44 16 0 V1 A0002.mat 16+24 1000/mV 16 0 71 -29 0 V2 A0002.mat 16+24 1000/mV 16 0 30 -38 0 V3 A0002.mat 16+24 1000/mV 16 0 0 11 0 V4 A0002.mat 16+24 1000/mV 16 0 -5 49 0 V5 A0002.mat 16+24 1000/mV 16 0 -11 32 0 V6 #Age: 49 #Sex: Female #Dx: 426783006 #Rx: Unknown #Hx: Unknown #Sx: Unknown
Larz60+ write Jun-25-2021, 07:46 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Output tags work for input as well. Added for you, please use bbcode tags on future posts.
Reply
#2
Please show some of the methods you have tried.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Process multiple pdf files Spartan314 1 218 Oct-27-2021, 10:46 PM
Last Post: Larz60+
  Generate Multiple sql Files With csv inputs vkomarag 13 1,165 Aug-20-2021, 07:03 PM
Last Post: vkomarag
  Sorting and Merging text-files AlphaInc 10 1,053 Aug-20-2021, 05:42 PM
Last Post: snippsat
  Generate a string of words for multiple lists of words in txt files in order. AnicraftPlayz 2 553 Aug-11-2021, 03:45 PM
Last Post: jamesaarr
  Replace String in multiple text-files [SOLVED] AlphaInc 5 1,012 Aug-08-2021, 04:59 PM
Last Post: Axel_Erfurt
  Several pdf files to text mfernandes 10 1,493 Jul-07-2021, 11:39 PM
Last Post: Pedroski55
  Open and read multiple text files and match words kozaizsvemira 3 4,554 Jul-07-2021, 11:27 AM
Last Post: Larz60+
  Plotting Multiple files ! Helen_145 1 634 Jun-26-2021, 03:28 PM
Last Post: snippsat
  Running script on multiple files Afrodizzyjack 1 900 May-14-2021, 10:49 PM
Last Post: Yoriz
  Load the data from multiple source files to one table amy83 2 919 Apr-27-2021, 12:33 AM
Last Post: Pedroski55

Forum Jump:

User Panel Messages

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