Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions about the Text based file format CSV (Comma Seperated Values). Questions include, but are not restricted to, importing from and exporting to this file format.

6
votes
1answer
113 views

Working with a CSV data file with 100 millions rows (and 30 columns)

I am new to working with large datasets.. Currently I am struggling to upload a "big data" file into Mathematica. The file is in the CSV format and has 14GB. There are 100 millions of rows and 30 ...
0
votes
0answers
23 views

Imported CSV output shows null with actual data value; can't plot data [closed]

I'm trying to do a simple import of 2-column CSV data. the first column is integers from 0 to 100 and the second column is various decimal values. The problem is that except for the first pair of ...
1
vote
1answer
41 views

How to separate rows with commas in imported CSV

I imported a CSV file that uses commas as its delimiter, but some fields also contain commas. When I import the file into Mathematica as follows ...
0
votes
0answers
18 views

Different behaviour of List when imported from MX and CSV

On a sort of related question here, I noticed something odd about the behaviour of List. When Import["myCombinAnalysis.MX"] ...
4
votes
1answer
60 views

Import specific columns from a large amount of CSV files

I'm looking to import the 4th column of data from a few hundred CSV files that I have stored in various folders. I have been able to import all CSV files from a given directory through use of: ...
2
votes
2answers
60 views

Convert CSV data for use with CandleStickChart

can anyone show me an example of how to import a CSV file and produce and CandlestickcChart using the imported data. I have tried ...
6
votes
2answers
90 views

Importing a string such as “3d456” from a CSV file causes trouble

I have a CSV file I'm importing with Import and it consistently crashes Mathematica. It turns out the culprit is one particular value of an ID field that was ...
3
votes
1answer
250 views

Appending to a .csv file

I have a selection of Lists of data which are in the same format, and if I Export them all to CSV at the same time I get a nice ...
0
votes
1answer
47 views

Import floating numbers from Google spreadsheets in CSV

For some reason when importing some floating numbers, Mathematica does not interpret them correctly. For example this spreadsheet: https://docs.google.com/spreadsheets/d/...
1
vote
1answer
41 views

separating a `ReadList` of a CSV file into columns using `Case`

I have a really large file and would like to determine the pattern required for separating the columns by the different headers. I attempted to use Cases but it's ...
0
votes
0answers
51 views

Problems importing data file

I'm having trouble importing a CSV file. The CSV file doesn't have simple dimensions, some rows may have many more columns than others. From my imported file I cannot access the ...
2
votes
1answer
142 views

Empty field “\”\“” In CSV Import Problem

I have a huge CSV data, with the format like this: "5";"8";"2803"; "";"6";"2793"; I import the data with this code: ...
5
votes
0answers
104 views

How to change Export default in 11.2?

To achieve the same CSV output as from previous versions Export requires the option "TextDelimiters" -> "". Presumably the ...
0
votes
0answers
75 views

Text-analysis: Import CSV without stringquotes

I have a large amount of text-files. I want to compare these text-files based on common 'words'. I export the output of my analysis as a CSV file. When I import the same file I get all seperate words ...
1
vote
1answer
56 views

read data from file having different format numbers

I'm trying to process my bank's data, which is always formed by lines with 5 fields separated by semicolons. Until recently, it used to write the numbers in the "1234,56" format, and I processed them ...
9
votes
3answers
790 views

Mathematica 11.2 Import Statement Produces Errors & Truncates CSV Data Created in 11.1

Bug introduced in 11.2.0 TL;DR Issue 1 (bug): Import of CSV files with column specification fails when "HeaderLines" or ...
0
votes
0answers
49 views

How to explicitly set horizontal coordinates when plotting multidimensial Table using DateListPlot?

I'm trying to plot a multidimensial data table which is stored in csv file. Like so: ...
1
vote
3answers
170 views

Import of CSV with OpenRead

I have tried to use OpenRead for my application as it appears to be less of a burden on the memory. I OpenRead a .csv file to extract coordinates in the form {x,y} in the following way ...
1
vote
1answer
199 views

Exporting weather data as CSV or XLS file

I am relatively new to mathematica, and sorry if this question is too simple. I am trying to export weatherdata to a csv or xls file. ...
6
votes
2answers
163 views

SemanticImport fails with CSV when last column is ALL empty

(MMA v11.1.1) I have many empty fields in my CSV files and I couldn't understand why sometimes SemanticImport just failed to recognize the headers. I just find out ...
0
votes
2answers
452 views

Plotting data imported from CSV file

So I have some data in a csv file that I want to plot. The csv file has several columns. I want to plot one of the columns as the x axis and all the other columns on the y axis. I have used the Import ...
2
votes
0answers
42 views

Import fails silently [closed]

In brief, an Import of a largish (11G) tsv file fails silently. I'm looking for ways to troubleshoot the problem further, and/or work around the failure. Details ...
0
votes
0answers
187 views

How to build file to be used in Gephi 0.9.1?

I have an adjacency matrix obtained by: ...
1
vote
0answers
137 views

Export number as formatted numeric value, not string

Some related questions include here. Is there a way to format numbers for export in CSV or JSON as numbers - not strings - with a specified number of decimal places and no exponentials? Is output ...
1
vote
1answer
292 views

Import image saved as CSV file [closed]

I have saved my image file from ccd camera as a CSV file. How can I plot this file to get my image back? My file is here.
4
votes
1answer
327 views

How to make Import[…, “Table”] not convert strings to numbers and not convert numbers to strings?

Bug introduced in 8 or earlier and persisting through 11.2.0 I have to to use r = Import["foo.txt", "Table", "FieldSeparators" -> {","}] since my data is Table ...
2
votes
1answer
90 views

Importing integer codes with leading zeros as strings from CSV [closed]

Importing CSV seems to automatically cast to integer what are supposed to be integer codes. This causes problems when some codes have a prefix of a variable number of "0" and have to be matched ...
3
votes
2answers
459 views

I have a bigdata CSV file as a single table of five columns and almost 10 million rows

I need to examine the bigdata file with a database/DBMS and have used MS Office 365/Access successfully so to do, import and query. I have also tried, many times, to open a MMA 10.4 database link ...
4
votes
1answer
272 views

Importing data from a CSV file — a string is being converted to a number

I'm very much a newbie, so please forgive any errors or stupidity. I have a csv file named csvfile. Its, contents confirmed by me, by looking at the contents in a ...
3
votes
0answers
85 views

SemanticImport extremely slow with “Number” format

With the following definition: col = "num\n" <> StringRiffle[Table[i, {i, 1000}], "\n"]; I do not understand why the ...
3
votes
1answer
675 views

Removing quotes from fields after import of table [closed]

I would like to remove quotes around fields when importing a csv table. It should be simple, but I cannot find any answer. My data is in the format ...
0
votes
1answer
126 views

Import hangs on a 15 MB CSV file [closed]

Trying to import a small (15 MB) CSV file and the Import command is either not responding or responding very slowly. Watching the memory usage of the Mathematica kernel when initializing the command ...
0
votes
1answer
401 views

How to export CSV with fixed delimiter and specific format specifier

I would like to export an array to a csv file with a specific type of delimiter and a specific notation of the numbers (in this case scientific notation 1.234E-02). How can I achieve this in a ...
3
votes
1answer
609 views

StringSplit on comma but ignore commas in quotes [closed]

I'm importing CSV files and some of the fields include quoted text with commas as part of the field, rather than as a field separator. What is the syntax (or alternative method entirely) to import ...
1
vote
2answers
153 views

Reading simple data csv file containing “e” and “i”

I can't find a way to properly read a csv file containing complex numbers in the following form: ...
0
votes
2answers
217 views

make a surface plot that changes with time from csv data

How can I plot 4d data from a csv, using a slider for the 4th variable? I would like to use var1 and var2 as x-y corrdinates, var3 as surface height, and var4 as the time slider. If I have a csv <...
-1
votes
2answers
271 views
4
votes
2answers
425 views

Excluding Specific Rows Using Import[…]

As the question states, I'm trying to import a .csv file but I would like to exclude certain rows (points which I know are bad data). This is easy when the points ...
0
votes
1answer
166 views

Combining first 5 columns from CSV file into AbsoluteTime date

Thanks in advance for all your help. I need to import data from a CSV file that looks like : (easier to read in excel) I would like to convert the data into timestamps by creating a Table with 2 ...
1
vote
2answers
715 views

Problem fitting a exponential function to data points [closed]

finale edit: i found someone who solved my problem via matlab. therefore i wont try out the proposed solutions now, but wont delete my question in case someone might have use for the proposed ...
1
vote
1answer
91 views

Creating table out of two lists

I have two lists: fi = { -0.25, -0.21 , -0.1, ...} fv = { 2, 3, 4, ...} Now I want to export these in form of a CSV file, which should look like this: ...
-1
votes
4answers
473 views

Import vs ReadList CSV file with Currency Values

A testing file with the specified format can be downloaded from here Let's read a few lines from this file ...
4
votes
3answers
1k views

Importing CSV with multiline text fields

Bug introduced in 8 or earlier and fixed in 11.2.0 Here is a valid CSV: a1,b1,c1,d1,"e1 e1 e1" a2,b2,"c2 c2 c2",d2,e2 It has two rows and five columns, and ...
3
votes
1answer
1k views

How to properly export string columns in csv?

How can I make sure that certain string columns of a matrix I want to export get properly formatted? That is, all quotes escaped, and every string wrapped in quotes. Here's what happens now: ...
0
votes
1answer
121 views

Import a 3D CSV file results in the wrong dimensions

I exported a some of my data to a file, the data looks like this before the export ...
3
votes
2answers
455 views

Troubles importing date and time from CSV file

I'm trying to import CSV file with the following format: 20150803 00:00:01.649,1.09675,1.09678 using this code: ...
35
votes
5answers
6k views

How can I import a huge CSV file quickly?

I have two CSV files, each one is around 1 GB of data. When I use Import["file.csv"], it takes a very, very, long time to import the data. So how can I accelerate ...
1
vote
1answer
2k views

Export data from Array to *.csv without curly brackets

I have a couple of *.csv files containing data from several experiments. From those, two columns shall be extracted each, to form a new list. This process shall be automated to collect all the data ...
-3
votes
1answer
275 views

Loading CSV file is slow

I'm trying to import a CSV file that contains the latitude and longitude of some USA routes, but the import process is very slow and Mathematica spent about 10 min importing it. A link to the file ...
2
votes
1answer
397 views

Convert spreadsheet (Excel) to *.csv during import

I have long lists of data in spreadsheets and have the problem that Mathematica crashes regularly during import of the .xlsx files. Is it possible within Mathematica to take a certain tab of a .xlsx ...