A comma-separated values (CSV) file stores tabular data (numbers and text) as plain text, with rows and columns delimited by line terminators and commas, respectively. You may also use this tag for variants where fields are separated by tabs or semicolons.

learn more… | top users | synonyms

2
votes
2answers
36 views

Wrapping a CSV file for access and testing

I have a simple class that represents and accesses the data from a CSV file (using the CsvHelper library). I've tried restructuring the code to allow for better unit testing, but I'm sure the ...
5
votes
1answer
29 views

Improving CSV filtering with Python using regex

Consider a .csv file that contains a set of video names like so: ...
6
votes
1answer
496 views

Python search for array in large text file

I asked similar question at: http://stackoverflow.com/questions/38410982/superfast-regexmatch-in-large-text-file ...
2
votes
0answers
38 views

Building nested object structures from CSV input

I'm reading big csv files and mashing the lines into hierarchical objects for analysis and display. The csv might look like this: ...
7
votes
2answers
134 views

Load and analyze a list of people from a file

I recently completed a programming task in Java for a job that was javascript heavy but the hiring company wanted some Java knowledge. I've been using Java since the turn of the year. Other than ...
6
votes
1answer
64 views

Calculate where the patient results reside within the normal distribution

My background is medical, but I required a program that calculated whether my patients are "normal" or 1-2 SD values away from the mean. The program works just fine, but I'm interested how I can do ...
8
votes
1answer
63 views

Extract data from a DBMS, create a CSV dump and transfer it to an FTP server

First of all, my code does work as expected at least to some extent. The intention of the program is to extract data from a DBMS in order to create a CSV dump and transfer it to an FTP server. My two ...
3
votes
2answers
59 views

Optimize a simple and quick python script for transposing a .csv file

I need to transpose the following file output1.csv, which is is a result from a quantum chemistry calculation into a single colum efficiently: ...
1
vote
0answers
27 views

Export database values as csv with a helper class

Should I be using getter and setter functions in my class nodeStruct? I am currently using them where there is need to manipulate the input value (e.g for ...
1
vote
0answers
24 views

Grouping logs and providing counts

The code is supposed to group start and end time logs and provide log counts and unique ID counts. The grouping will be variable 1 hour, 6 hours, 12 hours, 24 hours, etc. What is the better way to ...
5
votes
2answers
53 views

Sieve of Eratosthenes with a Swing UI

I'm fairly new to Java. I want to divide my code into 3 classes. First class to contain my GUI, second to compute the algorithm and third class to write results in my file. I have the code working but ...
8
votes
2answers
38 views

Reusable VBA macro to prevent Excel from destroying the data (+ backup capacity)

My goal is to prepare the Excel file (see the download link at the end) I would share with my non-technical colleagues, so that they enter some data into it and then I was able to automatically ...
2
votes
1answer
23 views

An interesting use of the reduce function to convert tab-delimited data into JSON

I am learning functional programming in JavaScript. This is some code from a video tutorial by funfunfunction. I am particularly concerned about the way the existence of the customer key is checked in ...
3
votes
1answer
63 views

Converting embedded JSON into flat table

I am new Python user, who decided to use Python to create simple application that allows for converting json files into flat table and saving the output in cvs format. I was wondering if you could ...
3
votes
4answers
234 views

Finding the average of each row in a CSV file

I am getting back into python after a year of not doing it at all. I just wrote a bit of code to create a file that looks like this: 1,2 1,1,1,1 -1,0,1 42,17 ...
3
votes
1answer
54 views

Using Ruby to record tasks

I started writing this program to get a better understanding of different aspects of Ruby. I tried to follow the ruby style guide here. What it's supposed to do is take the exercises/tasks you give ...
5
votes
3answers
182 views

Parse a CSV file and return an object or array

I recently published a JavaScript module for NPM which is also available on Github by the name of rawiki-parse-csv. The code takes raw CSV data and returns an array. The method has one option to ...
2
votes
1answer
110 views

csvshuf: a tool to shuffle CSV columns written in Python

Edit: After reading Gareth's answer I have pushed an updated version of the code to github. I needed to shuffle cells from specific columns in several CSV files. One of the requirements was to be ...
6
votes
2answers
103 views

Fast CSV parser

I have written a CSV parser to read in 12609000 lines of CSV data. Each line has 16 fields of both string and double type data. The following code takes about 40 seconds to parse the data. I would ...
5
votes
2answers
113 views

Writing a hiveserver2 query result to CSV with Python using pyhs2

I am trying to create a small application that will help me extract data from Hadoop via hiveserver2 by simply writing it to CSV. At the moment, it takes about 40 seconds to pull 10,000 records from a ...
3
votes
1answer
51 views

Extracting coordinates file that are inside a bounding box

I'm scanning a CSV file to see which values fit inside of a given box. The CSV file has X and Y coordinates, and the arguments to the function are the perimeters of a box (i.e, top, bottom, left side, ...
1
vote
2answers
65 views

Reading CSV files and inserting in a SQL database in VB.Net

This program reads all files in a folder and subfolders line by line, converts them in a supported character set, replaces all unsupported characters and inserts them in a SQL database. My idea was to ...
3
votes
2answers
35 views

Combining values corresponding to the same key

What the following code does is: The key field is column0 (where sometimes there could be single key, and sometimes keys separated by comma). The rest of the columns are also either single or comma ...
1
vote
1answer
126 views

Reading and processing a big CSV file

I am trying to write a script to read a CSV file containing 1 million domain names, look up these domain names and store the results in another CSV file. I am trying the following code, but the number ...
4
votes
1answer
43 views

Saves Scores of an Arithmetic Quiz

This code is part of a larger code that generates an Arithmetic Quiz, although the code I have show below just saves the score that the user got on the test and their name. When saving the code it ...
-1
votes
1answer
65 views

Displaying membership information

The code is about displaying membership information of all clients from a database. This is for homework and I'm just curious if more can be done to improve this. Feel free to alter it, but please ...
6
votes
2answers
71 views

Comparing vehicle crash data the previous year

I have created an automated macro which takes vehicle crash data from a .csv file and automatically creates a pivot table and charts and compares it to the previous year. The code is approximately ...
3
votes
2answers
89 views

Displaying member information from a CSV file

The code is about displaying membership information of all clients from database. I was just wondering what I could do to improve/change it. ...
1
vote
2answers
79 views

Write into the same CSV file multiple times

I implemented an OutputWriterService.class to write content in the same file multiple times. The writeToCsvFile method is ...
1
vote
1answer
32 views

Bulk customer creation

Here is my script which takes 50k records from a CSV and does CRUD operation with them. Unfortunately there are a lot of issues with the performance. CSV fields are: msisdn, resellerid, product ...
2
votes
1answer
57 views

Update record with CSV

I'm using Rails 4.2.5, and I'd like to update existing records with a csv file with two fields: id,category. Where if the category field is blank, it defaults to misc. Here's an example csv file: <...
-1
votes
1answer
43 views

Replacing address details in colon delimited string

I'm sanitising personal data in a large database with a series of Regular Expressions. In many cases the sensitive data is in a colon-delimited field within a CSV file. Here is a sample: ...
1
vote
1answer
50 views

Python CSV reader

I have a function that pulls data from a file or string literal in my case and returns them in either a list or a dict. My ...
4
votes
2answers
117 views

Parsing a string as fast as possible that is using comma delimiters

I have made a simple static parser for a bigger program. This parser takes a string that has comma deliminators and I need to separate the strings in to a vector for handling in a different section of ...
6
votes
1answer
85 views

Summing chemical properties in a CSV stream

I have written my first program in go. It's rewritten from python. Program takes csv file, emulates query ...
3
votes
1answer
40 views

Splitting apart a comma separated list

I have a system that outputs a comma separated string into a single column. I need to grab the individual values out of that list. The list could have random spaces and commas that need to be ...
1
vote
0answers
54 views

A command line Java program for computing grade point average - follow-up

(See the previous and initial iteration.) I have refactored the API based on excellent review by cbojar. Also, a honorary mention goes to janos for pruning some unnecessary code out of the transcript ...
7
votes
3answers
99 views

A command line Java program for computing grade point average

(See the next iteration.) I have this command line program for computing GPA (grade point average). Given credit sequence \$\langle c_1, c_2, \dots, c_n \rangle\$ and grade sequence \$\langle g_1, ...
0
votes
2answers
46 views
3
votes
1answer
152 views

Arithmetic quiz with class database and score analysis

I have done this quiz project and I have tried as hard as I could when I was writing to make it user friendly to read. Could you help me on improving and making it more user friendly please. ...
0
votes
1answer
98 views

csv loader and kNN algorithm in Java

I have applied the KNN algorithm for classifying handwritten digits. the digits are in vector format initially 8*8, and stretched to form a vector 1*64.. As it stands my code applies the kNN ...
1
vote
1answer
79 views

Reading a CSV file containing a dataset of 8×8 images

I am trying to implement a machine learning algorithm (k-nn for example). But before I attempt to do that I was hoping for some feedback on my current Main class, which essentially builds 8×8-pixel ...
1
vote
1answer
65 views

Find csv item index

I'm quite new to Python and I have been trying to find a way to search a csv for a test string and return the index of that item in the csv. I am using the code below but find it hard to believe that ...
3
votes
1answer
127 views

Joining huge CSV files and splitting the result into batches

I've got ~20GB of data about the same subject, concatenated from small files of 16kB, each produced by different measurement equipment. They share some headers (on the example: B, D & E) and they ...
3
votes
0answers
97 views

Python Script to query OSRM (drive-times)

The below script takes two arguments Path to the OSRM Map Path to a .csv containing the columns ...
26
votes
5answers
3k views

Performance of a Foreach inside a Foreach iterating through a million records

I have two DataTables: dt: is populated from a CSV file with over 1.7 million rows dataStructure.Tables["AccountData"]: is ...
3
votes
1answer
61 views

Reducing memory footprint when manipulating big csv file

I have CSV file which has structure like this (separated by tabulators): ...
8
votes
1answer
130 views

RFC 4180-compliant CSV parser in Java

While looking at a recent question, I realized that there is no CSV parser in the standard Java library. I decided to write one that complies with RFC 4180. Highlights of the standard include: ...
2
votes
1answer
73 views

Student data parsing application

My application takes a .csv (comma separated values) file and serializes the data into a binary file. Then it converts the binary file back to a .csv file (identical to the original file). For ...
2
votes
2answers
61 views

Extracting price statistics from a CSV file

I got the following task to solve: ...