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
0answers
23 views

Can I please get some feedback on my coding technique for object oriented php? [on hold]

I'm looking at getting a job as a php developer. I have submitted tests, but not heard back from them. Can I please get some feedback on my coding technique for object oriented php? Here is a test I ...
2
votes
1answer
22 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
51 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
225 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
47 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
161 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
95 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
94 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
83 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
49 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
57 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
34 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
112 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
42 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
68 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
72 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
54 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
42 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
49 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
105 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 ...
5
votes
1answer
82 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
39 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
53 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
94 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
143 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
89 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
73 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
56 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
118 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
87 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
59 views

Reducing memory footprint when manipulating big csv file

I have CSV file which has structure like this (separated by tabulators): ...
8
votes
1answer
119 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
71 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
60 views

Extracting price statistics from a CSV file

I got the following task to solve: ...
4
votes
3answers
44 views

csview: A tiny utility to view csv files

Seeing a csv in table form is nicer then viewing it as row text, for example the csv from Calculate food company sales for the year (with headers added by me) looks much nicer in this table form than ...
7
votes
2answers
86 views

Calculate food company sales for the year

I am working on a Python project where a food processing company is trying to calculate its total sales for the year. Python has to read from a text file where its divided into for categories split by ...
6
votes
3answers
239 views

Loading tab-separated tweet data into an array

I'm working on this school project and was wondering if there was any way of storing this information better, faster, more professionally. I'm also restricted to only using an array; don't ask me we ...
1
vote
2answers
222 views

Maths quiz that read/writes CSV files [closed]

Could this code possibly be shortened, or even better be rewritten in the fewest lines of code possible? ...
4
votes
3answers
136 views

Write data from database to a CSV file

I have a database containing a high amount of data. I want my app to filter and select only some of it, and save it into a CSV file or JSON. For the moment I have this method which takes the data ...
2
votes
1answer
135 views

A Dynamic CSV Serializer

I made a dynamic CSV serializer as a learning challenge a while back, I'm hoping to get my code picked apart so I can learn what I can do better. This is a bit long, so I wouldn't expect anyone to ...
1
vote
2answers
60 views

Replacing data in a .csv file

The code works well and does what I intend for it to do. In essence, it opens a file referenced as 'resource'. This is a .csv file. I then searches for the keys in the dictionary and for each key that ...
3
votes
1answer
60 views

Creating a table within a .csv file

I recently made a post on Code Review entitled Writing lists to .csv file. I found the feedback extremely helpful, and wished to provide a continuation of that particular topic; of working with Python ...
1
vote
1answer
56 views

Writing a Counter object to a CSV-file in Python 3

In Python 3.4, a Counter object called cnt like this: ...
3
votes
2answers
77 views

Compare lines in 2 text files with different numbers of fields

This is the (hopefully) final version of my script for my file comparison problem mentioned previously in two posts on Stack Overflow (here and here). I have come up with the code shown below, which ...
2
votes
0answers
145 views

Opening the same CSV file in two different ways in order to transform data in one column and update original CSV using Python

I have the following functions and accompanying script. The purpose of these is is to extract XML data from one CSV column (one XML document for each row), and then transform it into a dictionary (...