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

8
votes
4answers
272 views

Reading a text file that contains several CSV-like tables

I wrote some extension methods to read CSV-styled text directly into a datatable or dataset or write them to this format. Is it right to use the methods as extensions or should I create a separate ...
0
votes
0answers
15 views

Stream file to opencsv with the least amount of I/O possible

I have the following code snippet where I'm picking up a file from an ftp server and then streaming it to opencsv. I have very little experience with streams, so I'd like to have someone review this ...
2
votes
1answer
24 views

CSV manipulation with Python

I've prepared a script to manipulate csv files in Windows that simply adds quotes as requested. The script creates a backup of the original files and overwrite the wrong originals in its same folder. ...
8
votes
3answers
334 views

Soundcloud to CSV File

This program connects to Soundcloud and turns the supplied username into a CSV file with the user's like list. The code accomplishes this although it looks rather messy and was wondering what I could ...
4
votes
2answers
54 views

Tic Tac Toe Game Sequence Generator

I want my code to write to a .csv file a bunch of patterns for Tic Tac Toe games (30000). I want to have 9 columns numbered 1 through 9 and in each have the number of the space in the grid that was ...
6
votes
3answers
253 views

Manipulating CSV files to regular text file

At my job, often I have to manually convert *.csv Files structured like: number,number\n number,number\n number,number\n ... To a regular *.txt file with the ...
3
votes
1answer
62 views

Reading from a CSV file in C++

I wrote this code to read from a CSV text file (containing data such as 12,3,568,48,3,8 with no more than 3 digits to each number). It stores the numbers as char arrays in the vector ...
4
votes
1answer
64 views

Script to generate documents based on conditionals and CSV data

I wrote this script a while back to generate press releases. It consumes a csv of data where each row contains the data for a country and fills in values in pre-written text based on the data. In its ...
4
votes
5answers
121 views

Optimising single-delimiter string tokenisation

I am trying to optimise my tokenizing of tab delimited strings: ...
0
votes
1answer
82 views

Need fast csv parser for Python to parse 80GB csv file [closed]

I am looking for the fastest way to parse an 80GB csv file with 300 columns in Python. The csv file does not have backquote commas, e.g a,"blah,blah,blah",c I ...
3
votes
0answers
20 views

Identifying surface events happening at specific time intervals

Here is some code I wrote to surface Mint.com transactions that occur at monthly intervals, in order to identify subscriptions I may be paying for without realizing it. I'd like to have some friends ...
16
votes
2answers
229 views

API for looking up Japanese postal code

Most of my experience is in Python, Java and embedded C, and I need to learn Scala and Play for a new job. As an exercise, I decided to create a very simple API for looking up area by postal code, ...
3
votes
3answers
179 views

Inserting persons in file into SQLite

I've just started working with SQLite in C# to test various features of an application. In building my first SQLite example I wanted to insert a large .csv into a table (Person) with two columns, A ...
2
votes
1answer
87 views

Optimizing for data import in Neo4j using py2neo

Here is my code for importing from a .csv to a neo4j graph using py2neo and cypher statements. I've noticed that it slows down significantly the bigger the graph gets. It takes several seconds just to ...
1
vote
1answer
67 views

Transposing rows and columns for file contents [closed]

This program transposes rows and columns for file contents: ...
0
votes
1answer
41 views

Convert Array CSV to Object using Header

Takes the first array in the array and uses that to set the properties of an array-object. ...
3
votes
1answer
72 views

Confidence score calculation

I was looking for a way to calculate a score 'x' for each pair of elements in two separate arrays. The goal of the code is to return an output array containing the score for each entry in the input ...
3
votes
2answers
73 views

Creating large CSV file

I have a performance problem when trying to create a csv file starting from another csv file. This is how the original file looks: ...
2
votes
1answer
27 views

Split CSV by Repeated cells python

Any time that a row ID (oddly placed in column 8, i.e. row[7]) is repeated after the first instance, I want to write those rows into a second file. The code I'm using is extremely slow -- it's a ...
2
votes
2answers
70 views

CSV File Parser in Ruby - Attempt No. 2

The following is my second attempt at a basic CSV parser in Ruby. I've addressed suggestions that I've got for my previous version here. I have omitted all test cases - the code listing would be too ...
5
votes
3answers
58 views

Some simple Perl and Regex

Reads from a flat file of three columns, delimited by at least one tab character. Filters the three columns based on input; returns list of corresponding emails. Arguments passed like ...
2
votes
1answer
65 views

Parse a csv file and create a dictionary of partial results

I have a bunch of .csv files which I have to read and look for data. The .csv file is of the format: ...
2
votes
0answers
29 views

Parsing CSVs for bulk database insertions

I'm writing this as (eventually) part of a larger program. This will serve as the bulk data insertion from .csv files we parse. I'm primarily looking for parts that are breaking Go's formatting, ...
4
votes
1answer
226 views

Combat log parser for World of Warcraft

This is part of a bigger project I'm doing to get better at JavaScript. It's basically the beginnings of a combat log parser for World of Warcraft. It looks a bit messy right now and I could really ...
4
votes
3answers
718 views

Splitting and printing comma-separated values

I stumbled upon a question on SO asking how to split a comma-separated string into individual values. Since it's been a while since I've had any good reason to write C I'd like to ask for some ...
0
votes
1answer
86 views

Where's the bottleneck in this tvtropes.org scraper?

...
2
votes
1answer
94 views

CSV writer implementation refactored

Based on my initial implementation found here and the suggested improvements in answers and comments, I've refactored the code. The main changes are: Removed redundant buffering. Simplified ...
6
votes
1answer
256 views

CSV writer implementation

I've recently been assigned to write up a CSV writer with "as much flexibility" as possible concerning pretty much all (output stream, string fields with potential new line characters, separator ...
1
vote
1answer
170 views

Python CSV file import and object manipulation

I am trying to import a .csv file and save data in objects for later manipulation in Python. I am very new to coding so please do let me know my fundamental errors. ...
5
votes
3answers
80 views

Extracting two columns from exported iTunes playlist

My friend wanted me to send her a list of songs from one of my iTunes playlists, so I exported the playlist within the app itself. It comes as a plain text file, where each field is separated a ...
3
votes
1answer
159 views

Enhance CSV file database import

I'm using the script below to import a large .csv file to my database. If the table is empty the process takes about 5 minutes to finish on a local machine. If I'm using the file to update existing ...
1
vote
1answer
148 views

Store CSV in Redis

I needed to make a small script to read a csv file and store 2 columns in Redis. Can you guys take a look over the code and let me know how I can improve my code style? ...
10
votes
3answers
370 views

Print Student Names from CSV

Description Print all student names from a CSV file. CSV Format: CSV file does not contain string delimited by double quotes. None of the cells has "," ...
1
vote
1answer
42 views

CSV lookup problem solved with CoffeeScript

Source code with some test: ...
5
votes
1answer
87 views

Using a TSV text file and map for a Q&A program

The program outputs a menu asking for a new question or to ask a question. If you ask a question, it will search a .tsv text file for the question and return the answer. It will then check a map that ...
3
votes
1answer
115 views

Read from csv file, transform to dictionnary

First of all, here's the code I'm working on: ...
3
votes
2answers
586 views

Concatenating rows in CSV files and removing old CSV files

I have written my first Python script that will go into live use at my workplace. I am relatively new to Python and I think this script is pretty good but I would like your input. It runs very fast, ...
3
votes
1answer
107 views

Read CSV with 3 columns and group some elements

I have a csv with 3 columns (date, name, number) and it is about 20K rows long. I want to create a dictionary keyed by date whose value is a dictionary of ...
2
votes
1answer
149 views

AD update from CSV

I get a CSV dump of all employee records from our payroll system once a week. The CSV has something like 28K records. The key between the two systems is the ...
11
votes
2answers
2k views

CSV reader using StreamReader and LINQ

Mostly due to readability, I am using the following code to find a specific csv file on a drive read that CSV file using a streamReader parse it into a ...
2
votes
1answer
176 views

Slow Python text-processing script

This script of mine merges columns 1 and 2 from one input file and sees if these merged combinations exist in the other infile (and vice versa). I know I get stuck in appending. It did not get past ...
0
votes
0answers
79 views

Speeding up filtering function in Pandas

I have a CSV file with 400 000 rows and the following headers: ...
2
votes
1answer
98 views

A module to display, update and save a dictionary as .csv v2.0

I'd like feedback on my revised code after my previous question. The goal is to create a module which can display, update, save dictionaries as .csv files. I'll use this in another program to update ...
3
votes
3answers
217 views

A program to display, update and save a dictionary as .csv

I'm now looking for feedback on v2.0 of this program instead. I'd like some feedback about my code. What bad habits do I have? What advice could help me write more Pythonic? I'm trying to write a ...
1
vote
1answer
380 views

Processing Excel files of a predefined template to generate output CSV files of another predefined template

I'm a freelancer and I recently wrote a python script that processes input xlsx files that contain data in a particular format and output a csv file in another format as required. The code works well ...
4
votes
0answers
60 views

Vectorize Fisher's Exact Test

I have two data frames/ lists of data, humanSplit and ratSplit, and they are of the form ...
2
votes
0answers
99 views

Adding file name information to CSV file columns

Is there a simple way to combine the functions of this Powershell script? It would be nice to have it file to one output file instead of several output files. ...
2
votes
2answers
35 views

Creating two output files from two formatted files

I've been working on a project to take data from csv files, re-format it, and display it as charts. I'm working for a company over the summer and when I leave, I would like my code to be ...
1
vote
1answer
75 views

Returning information about the result of a file processing, without using output parameters [closed]

As part of a C# class CsvConverter that converts various file types to CSV, I am designing a private class CsvConversionResult. ...
10
votes
1answer
359 views

Find the peak stock price for each company from CSV data

During the hiring process, a company gave me this test: Q) Consider Share prices for a N number of companies given for each month since year 1990 in a CSV file. Format of the file is as below ...