Questions tagged [csv-format]

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.

Filter by
Sorted by
Tagged with
3
votes
3answers
85 views

How can I import a CSV file into Mathematica? [closed]

I have a data.csv file in the Downloads folder in my Macbook. I am trying to import the data into a Mathematica notebook using ...
0
votes
1answer
57 views

Import many csvs from folder and change date format from american to european

I have many csv files in one folder and I have to import all of them into Mathematica. I need actually just two columns and all the rows except for the first one so I got rid of another 6 columns and ...
0
votes
0answers
58 views

Finding area between curves formed by csv data

I have a bunch of Differential Pulse Voltammetry data I am trying to import into Mathematica, and find the area between each curve and the blank. So far I have used the following commands: ...
0
votes
0answers
44 views

Plotting data imported from Excel and overlaying it on a disk

I'm new to Mathematica and I'm trying to get the hang of plotting data from an external CSV file. The data is just x, y, z values from an experiment I ran. I would ...
2
votes
1answer
98 views

How can empty fields in a csv file be set to Missing when importing as a Dataset?

When importing a csv file with empty fields as a Dataset, the empty fields are set to zero-length strings (""). There is an option, ...
1
vote
0answers
44 views

How can I export the values of both the dependent variable and the independent variable? [closed]

This is the first time I am using Mathematica. I am trying to calculate the bandgap of a solid using the following script. ...
2
votes
1answer
89 views

How do I tell Mathematica to write numbers on a file without using scientific notation?

I need to write numbers out to a file without using the scientific notation. How do I tell Mathematica to do that? This is the code I am using: ...
7
votes
1answer
531 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 ...
1
vote
1answer
149 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 ...
4
votes
1answer
365 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
79 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
119 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
607 views

Appending to a .csv file [duplicate]

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
72 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
81 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
70 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
487 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
125 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
100 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
67 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
946 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
80 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
231 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
289 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
214 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
769 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
49 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
245 views

How to build file to be used in Gephi 0.9.1?

I have an adjacency matrix obtained by: ...
1
vote
0answers
164 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
397 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
663 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
116 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
515 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
563 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
106 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
980 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
187 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
686 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
884 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
185 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
235 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
405 views

Export to excel or CSV file with column and rows. List manipulation required

...
4
votes
2answers
690 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
180 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
948 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
118 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
612 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
2k 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
162 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 ...