Questions tagged [delimited]
221 questions
83
votes
3 answers
Reading text file with multiple space as delimiter in R
I have big data set which consist of around 94 columns and 3 Million rows. This file have single as well as multiple spaces as delimiter between columns. I need to read some columns from this file in R. For this I tried using read.table() with…

Pawan
- 1,066
- 1
- 10
- 16
44
votes
4 answers
Ways to read only select columns from a file into R? (A happy medium between `read.table` and `scan`?)
I have some very big delimited data files and I want to process only certain columns in R without taking the time and memory to create a data.frame for the whole file.
The only options I know of are read.table which is very wasteful when I only want…

Alex Stoddard
- 8,244
- 4
- 41
- 61
42
votes
3 answers
How can I get 2nd and third column in tab delim file in bash?
I want to use bash to process a tab delimited file. I only need the second column and third to a new file.

RnD
- 1,172
- 4
- 15
- 25
15
votes
5 answers
Parsing a tab delimited file into separate lists or strings
I am trying to take a tab delimited file with two columns, Name and Age, which reads in as this:
'Name\tAge\nMark\t32\nMatt\t29\nJohn\t67\nJason\t45\nMatt\t12\nFrank\t11\nFrank\t34\nFrank\t65\nFrank\t78\n'
And simply create two lists, one with names…

user972297
- 151
- 1
- 1
- 3
15
votes
4 answers
Parse a pipe-delimited string into 2, 3, 4 or 5 variables (depending on the input string)
I have a line like this in my code:
list($user_id, $name, $limit, $remaining, $reset) = explode('|', $user);
The last 3 parameters may or may not be there. Is there a function similar to list that will automatically ignore those last parameters if…

MikeG
- 1,205
- 12
- 19
14
votes
5 answers
Convert delimited string into array key path and assign value
I have a string like this:
$string = 'one/two/three/four';
which I turn it into a array:
$keys = explode('/', $string);
This array can have any number of elements, like 1, 2, 5 etc.
How can I assign a certain value to a multidimensional array, but…

Alex
- 66,732
- 177
- 439
- 641
13
votes
1 answer
SQLite Transform Columns to Comma Delimited String
I have a table with rows of data and need to create a comma delimited string for all the rows for a column. Can this be achieved just using the the SELECT statement in SQLite or I have to get the data into Cursor and build the string by iterating…

Vincy
- 1,078
- 1
- 9
- 16
12
votes
5 answers
How do I open space-delimited file in Microsoft Excel?
When i try to open space delimited file in excel, the whole content opens in a single column. Is there any way to open the space delimited file in excel so that the delimited contents are properly formatted into different columns?
My scenario is…

merazuu
- 4,118
- 6
- 18
- 19
10
votes
5 answers
Add quotation marks to comma delimited string in PHP
I have a form which is a select multiple input which POSTs values like this: option1,option2,option3 etc..
How is the best way to convert this to 'option1','option2','option3' etc...
Currenty I'm doing this, but it feels…

Per
- 149
- 2
- 4
- 12
9
votes
3 answers
Regular expression to allow comma and space delimited number list
I want to write a regular expression using javascript or jquery to allow
comma delimited list of numbers OR
space delimited numbers OR
comma followed by a space delimited numbers OR
a combination of any of the above ex
anything that is not a…

javafun
- 195
- 2
- 2
- 8
8
votes
3 answers
Generate DDL SQL create table statement after scanning CSV file
Are there any command line tools (Linux, Mac, and/or Windows) that I could use to scan a delimited file and output a DDL create table statement with the data type determined for me?
Did some googling, but couldn't find anything. Was wondering if…

Vinh Nguyen
- 1,014
- 1
- 9
- 19
6
votes
4 answers
working with a delimited text file
started working on the text file reading- delimited by pipe underscore and pipe - |_|
tried the following code.doesn't produce the desired result.
the split condition should be modified, but how. please advise.
Thanks everyone - this works…

ratna
- 103
- 1
- 8
6
votes
1 answer
Parsing pipe delimited input in awk
Have seen many posts asking similar question. Can't get it working.
Input looks like:
|
Trying to parse with awk.
Have tried many variants from excellent posts:
FS = "^[\x00- ]*|[\x00- ]*[|][\x00-…

scorpdaddy
- 71
- 1
- 1
- 3
6
votes
2 answers
Linq query with subquery as comma-separated values
In my application, a company can have many employees and each employee may have have multiple email addresses.
The database schema relates the tables like this:
Company -> CompanyEmployeeXref -> Employee -> EmployeeAddressXref -> Email
I am using…

Keith
- 2,618
- 4
- 29
- 44
6
votes
2 answers
Processing a large .txt file in python efficiently
I am quite new to python and programming in general, but I am trying to run a "sliding window" calculation over a tab delimited .txt file that contains about 7 million lines with python. What I mean by sliding window is that it will run a…

flz416
- 61
- 2