tagged [csv]

Convert multiple rows into one with comma as separator

Convert multiple rows into one with comma as separator If I issue `SELECT username FROM Users` I get this result: but what I really need is row with all the values separated by comma, like this: How d...

20 May at 16:7

How can I read and manipulate CSV file data in C++?

How can I read and manipulate CSV file data in C++? Pretty self-explanatory, I tried google and got a lot of the dreaded expertsexchange, I searched here as well to no avail. An online tutorial or exa...

19 Jan at 06:52

Rearrange columns using cut

Rearrange columns using cut I am having a file in the following format I want the columns to be rearranged. I tried below command > cut -f2,1 file.txt The command doesn't reorder the columns. Any idea...

27 Nov at 13:13

How to upload and parse a CSV file in php

How to upload and parse a CSV file in php I want to upload a csv file with php. After the file is uploaded, I want to display the data of the CSV file. I would like an example how to accomplish this t...

8 Apr at 10:45

Pandas read in table without headers

Pandas read in table without headers Using pandas, how do I read in only a subset of the columns (say 4th and 7th columns) of a .csv file with no headers? I cannot seem to be able to do so using `usec...

28 Jan at 04:58

Convert XLS to CSV on command line

Convert XLS to CSV on command line How could I convert an XLS file to a CSV file on the windows command line. The machine has Microsoft Office 2000 installed. I'm open to installing OpenOffice if it's...

7 Dec at 06:24

how to read a csv file from a url?

how to read a csv file from a url? Im trying to create a web service which gets to a URL e.g. `www.domain.co.uk/prices.csv` and then reads the csv file. Is this possible and how? Ideally without downl...

18 Jun at 11:50

How do I spool to a CSV formatted file using SQLPLUS?

How do I spool to a CSV formatted file using SQLPLUS? I want to extract some queries to a CSV output format. Unfortunately, I can't use any fancy SQL client or any language to do it. I must use SQLPLU...

13 Mar at 18:19

Save PL/pgSQL output from PostgreSQL to a CSV file

Save PL/pgSQL output from PostgreSQL to a CSV file What is the easiest way to save PL/pgSQL output from a PostgreSQL database to a CSV file? I'm using PostgreSQL 8.4 with pgAdmin III and PSQL plugin w...

9 Apr at 19:0

Generic class to CSV (all properties)

Generic class to CSV (all properties) Im looking for a way to create CSV from all class instances. What i want is that i could export ANY class (all of its instances) to CSV. Can some1 direct me to po...

29 Jul at 12:7

How to concatenate text from multiple rows into a single text string in SQL Server

How to concatenate text from multiple rows into a single text string in SQL Server Consider a database table holding names, with three rows: Is there an easy way to turn this into a single string of `...

converting CSV/XLS to JSON?

converting CSV/XLS to JSON? Does anyone know if there is application that will let me convert preferably XLS to JSON? I'll also settle for a converter from CSV since that's what I'll probably end up h...

29 Oct at 15:6

How can I convert a list of objects to csv?

How can I convert a list of objects to csv? If I have a list of objects called "Car": How do I convert a list of objects, e.g. List to a csv?

7 Aug at 08:19

Split a comma-delimited string into an array?

Split a comma-delimited string into an array? I need to split my string input into an array at the commas. Is there a way to explode a comma-separated string into a flat, indexed array? Input: Output:

19 Apr at 22:12

How to export query result to csv in Oracle SQL Developer?

How to export query result to csv in Oracle SQL Developer? I'm using Oracle SQL Developer 3.0. Trying to figure out how to export a query result to a text file (preferably CSV). Right clicking on the ...

25 Jul at 19:40

Import CSV into SQL Server (including automatic table creation)

Import CSV into SQL Server (including automatic table creation) I have several , which I want to import into an . I know if this is possible with BULK insert, but I want a solution, so that also the o...

23 Sep at 07:14

Populating a dataset from a CSV file

Populating a dataset from a CSV file I would like to read the contents of a CSV file and create a dataset. I am trying like this: but apparently this is not correct.

17 May at 10:24

Output array to CSV in Ruby

Output array to CSV in Ruby It's easy enough to read a CSV file into an array with Ruby but I can't find any good documentation on how to write an array into a CSV file. Can anyone tell me how to do t...

27 Jan at 22:2

Writing to CSV with Python adds blank lines

Writing to CSV with Python adds blank lines I am trying to write to CSV file but there are blank rows in between. How can I remove the blank rows?

28 Mar at 22:33

PHP code to convert a MySQL query to CSV

PHP code to convert a MySQL query to CSV What is the most efficient way to convert a MySQL query to CSV in PHP please? It would be best to avoid temp files as this reduces portability (dir paths and s...

31 Aug at 15:49

Writing a pandas DataFrame to CSV file

Writing a pandas DataFrame to CSV file I have a dataframe in pandas which I would like to write to a CSV file. I am doing this using: And getting the following error: - -

19 Dec at 08:51

Python Pandas: How to read only first n rows of CSV files in?

Python Pandas: How to read only first n rows of CSV files in? I have a very large data set and I can't afford to read the entire data set in. So, I'm thinking of reading only one chunk of it to train ...

14 Feb at 01:51

How do I read a large csv file with pandas?

How do I read a large csv file with pandas? I am trying to read a large csv file (aprox. 6 GB) in pandas and i am getting a memory error: Any help on this?

10 Apr at 14:23

Remove trailing delimiting character from a delimited string

Remove trailing delimiting character from a delimited string What is fastest way to remove the last character from a string? I have a string like I would like to remove the last ',' and get the remain...

18 Aug at 09:23

How do I skip a header from CSV files in Spark?

How do I skip a header from CSV files in Spark? Suppose I give three files paths to a Spark context to read and each file has a schema in the first row. How can we skip schema lines from headers? Now,...

30 Sep at 22:42