Linked Questions

1 vote
3 answers
3k views

Possible Duplicate: Efficient way of parsing fixed width files in Python Not even sure if "space delimited" is really the right term here (which is probably what is hindering my search efforts). ...
Scott's user avatar
  • 303
1 vote
1 answer
1k views

In the file each columns have fix size. Is there any library or function available using that we can convert easily to CSV file ? There are four columns in the file. 1st - 1233212Q1AQYHDVCS1221 2nd ...
Emipro Technologies Pvt. Ltd.'s user avatar
1 vote
1 answer
61 views

I have raw txt files and need to use regex to search each digit separated by space. Question, data format is like: 6 3 1 0 7 3 1 0 8 35002 0 9 34104 0 My regex is: (?P&...
Kelvin Lo's user avatar
  • 199
15 votes
8 answers
49k views

I am very new to Python. I know that this has already been asked, and I apologise, but the difference in this new situation is that spaces between strings are not equal. I have a file, named coord, ...
muammar's user avatar
  • 957
15 votes
7 answers
5k views

I am trying to scrape PDF tables which span across multiple pages. I tried many things but the best seems to be pdftotext -layout as advised here. The problem is that the resultant text file is not ...
Tomas's user avatar
  • 60.2k
5 votes
6 answers
33k views

Problem: A command generates a table that makes it very hard to script around. Solution: Convert table into a Python dictionary for much more efficient use. These tables can have 1 - 20 differing ...
except UserError's user avatar
2 votes
5 answers
5k views

My text file format is: apple very healthy orange tangy and juicy banana yellow in color and yummy I need to create either two lists: l1 = ['apple','orange','banana'] l2=['very healthy',...
Pavithra K C's user avatar
6 votes
1 answer
3k views

In Excel, if you import whitespace delineated text in which the columns do not line up perfectly and data may be missing, like pH pKa/Em n(slope) 1000*chi2 vdw0 CYS-I0014_ ...
tel's user avatar
  • 14k
1 vote
4 answers
3k views

For one of my data analysis pipelines, I end up generating a lot of individual CSV files. I would like to transpose them, concatenate them, and transpose them again. However, the amount of data is ...
Uri Laserson's user avatar
  • 2,461
2 votes
3 answers
2k views

I'm running a utility that parses the output of the df command. I capture the output and send it to my parser. Here's a sample: Filesystem 512-blocks Used Available Capacity ...
cybertextron's user avatar
-1 votes
2 answers
729 views

I have a list that looks like this: Sum = ['* Report_type Leach\n', '* Result_text Concentration \n', '* Run_Id 179\n', '* Location ...
Bob's user avatar
  • 453
1 vote
1 answer
1k views

First time poster, long-time lurker. Have searched high and low for an answer to this but it's got to that stage...! I am having some trouble implementing the answer given by John Machin to this past ...
Joe Plumb's user avatar
  • 539
1 vote
3 answers
556 views

I have the next txt with data: FI R 83.0000m 34.960 1.1262 Fe 2 1.32055m 33.626 0.0522 N 2 5754.61A 33.290 0.0241 TI R 1800.00m 33.092 0.0153 ...
Joan Lopez's user avatar
1 vote
1 answer
378 views

Through one command linux (lsof) I get a serie of data in a table: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME init 1 root cwd unknown ...
John Lapoya's user avatar
1 vote
1 answer
1k views

So I have a series of huge files (several GB) of tabular data. They are txt and each column is defined by a fixed width. This width is indicated by a number of dashes right below the headers. So far ...
Smogshaik's user avatar
  • 363

15 30 50 per page