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

How can I import a txt file with both tsv and csv characteristics and plot it?

I have a problem with importing and plotting a txt data. I used this code: data=Import["C:/Users/user/Desktop/Mohammad Simulation/2nm.txt","TSV"] header=Take[data, {10, 1889}]; But, I am not able ...
-3
votes
1answer
67 views

Reading a excel CSV file [closed]

I have a CSV file with exactly the following data: ...
2
votes
1answer
119 views

CSV import with delimiters not working for certain characters (curly quotation marks)

Here's an example CSV file (Example 1): "Text","”","False","False","False","False","0","1","24","0","9","450","450" and the code to import it (Code 1): ...
1
vote
1answer
70 views

Plotting a 2D grid “spectrogram” from a large .csv file [closed]

I'm aware of this question here that uses MatrixPlot to plot the spectrogram of a sound file, but it's too complicated for me to understand, unfortunately. My file ...
5
votes
1answer
372 views

Huge CSV file with numeric and text data

I try to load a huge CSV file (~ 4 Gbyte), the data is both numeric and textual. So, I can't load the data as a string. ...
0
votes
1answer
40 views

Export to CSV gives unformatted output and unexpected characters

I want to export data I collected in a Table to a CSV (or XLSX)-File. However, the output is not very handy, it is not in a column-shape but surrounded by {} and in ...
2
votes
1answer
81 views

Importing a csv file yields weird first character

Whenever I import a CSV file, I get this weird character at the beginning of the file ,I am not sure why. How can I avoid this?
3
votes
3answers
325 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
81 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
62 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
47 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
215 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, ...
2
votes
1answer
130 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: ...
3
votes
1answer
751 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 ...
7
votes
1answer
1k 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
271 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
532 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
84 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 ...
20
votes
2answers
7k views

Speeding up Import and Export in CSV format

I am handling large numerical data in Mathematica. In smaller problems everything worked fine using Export and Import with the ...
3
votes
1answer
397 views

Writing CSV or alternative

I've tried to export a list to a CSV file. I shut it down after about 20 minutes of processing. The list has 261,000 rows and 30 columns. I finally exported it to a TXT file and its size was 111 MB....
6
votes
2answers
129 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 ...
0
votes
1answer
100 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/...
37
votes
5answers
9k 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
96 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
76 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 ...
5
votes
0answers
132 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 ...
2
votes
1answer
576 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: ...
0
votes
0answers
109 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
68 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 ...
3
votes
0answers
111 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 ...
9
votes
3answers
1k 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 ...
4
votes
3answers
2k 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 ...
4
votes
1answer
813 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 ...
0
votes
0answers
113 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
266 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 ...
3
votes
2answers
552 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 ...
1
vote
1answer
312 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. ...
4
votes
0answers
266 views
6
votes
2answers
237 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 ...
2
votes
2answers
975 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
51 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
252 views

How to build file to be used in Gephi 0.9.1?

I have an adjacency matrix obtained by: ...
1
vote
0answers
185 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
477 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.
2
votes
1answer
127 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 ...
4
votes
1answer
758 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
1answer
1k 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
213 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
828 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 ...
11
votes
2answers
2k views

Stream CSV or TSV files

RAM limitations make import impractical for large CSV files. Is it possible to Stream CSV correctly? str = OpenRead["EU.csv"]; Read[str, "CSV"] Read::readn: ...