Skip to main content

Questions tagged [csv-format]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
42 views

Why is StringSplit dropping empty entries? [closed]

I am parsing a CSV and whenever the trailing records are empty: StringSplit[",2,,4,,",","] I get: {"2&...
user13892's user avatar
  • 9,443
0 votes
1 answer
107 views

Removing empty values after importing CSV file

I am trying to import a CSV file with the following structure: the 1st column has 15 values, the 2nd column has 10 values, and 3rd column has 15 values. But when I import and try to access the 2nd ...
a019's user avatar
  • 867
1 vote
1 answer
90 views

Trying to plot a CSV file and getting a blank graph

I am trying to plot two NMR line graphs superimposed to show a before and after. I was able to successfully do it with excel files but the CSV files have been giving me trouble. This is my code. I ...
Isabelle's user avatar
2 votes
2 answers
231 views

Import complex numbers from a CSV file created in MATLAB

I export a simple CSV file created in MATLAB with complex numbers, such as: 0.1+2.1i,0.9+0.13i,0.02+0.3i I would like to import it into Mathematica with the "i" recognized as the imaginary ...
Philipp Strasberg's user avatar
0 votes
1 answer
70 views

Having issues creating rules from a CSV import

I'm importing a CSV file with two columns. I've done this with other files, but this one is causing issues when trying to create rules to associate IDs with the titles. Here's a sample of the ...
Sam B's user avatar
  • 159
2 votes
2 answers
286 views

How to import, read and convert a .bib to .csv format?

I have a document in .bib format, namelad by savedrecs1.bib, obtained from Web of Science. The document have a set of reference, of the type: ...
SAC's user avatar
  • 1,335
1 vote
2 answers
109 views

Importing an unusually formatted text file and converting to CSV

I have some data that looks like: ...
apg's user avatar
  • 2,155
0 votes
0 answers
38 views

Data Export not working when running module using Wolframscript compared to executing in notebook

I have a Mathematica module im_solver.m that I wish to iterate through Python or a bash script. The module runs a bunch o' other modules. At the end im_solver.m executes a diagnostic.m that collects ...
Nick Valverde's user avatar
0 votes
0 answers
80 views

How to export a specific csv file text?

I have a data set of text in string format as ...
SAC's user avatar
  • 1,335
1 vote
0 answers
58 views

Why is Import[file, "CSV"] faster than Import[file, "TSV"]

I have a lot of data which use tabs as field separators. There are no tab characters in their fields. The data are all alphanumerical, strings are not enclosed in quotes. Theoretically ...
Adalbert Hanßen's user avatar
1 vote
1 answer
116 views

Graph blockchain transaction data

I am new to Mathematica, and i am trying to Graph some blockchain transaction data. I would like the Addresses "From" & "To" to be the Nodes/Vertices, and the edges to be a ...
RMBG's user avatar
  • 11
2 votes
1 answer
104 views

How to convert a CSV entry from a String to an Expression?

I have a list that looks like this: {{"74.28300000000003,90.32258064516131"},{"75.06400000000004,92.90322580645163"}} To be able to use these ...
Heidehexer's user avatar
0 votes
0 answers
163 views

ListLinePlot: Options expected (instead of ImportCSVToDataset

I have the following code ...
Strictest Tiger's user avatar
3 votes
1 answer
134 views

How to import CSV file with mixed data, including string Mathematica expressions and numbers

I am importing a CSV file that looks like this (Extract of data as viewed in Notepad): ...
Richard's user avatar
  • 93
0 votes
1 answer
83 views

It's about manipulating .csv file

Actually I load .csv file about movies to Mathematica and store it in "dt", and there is one column records the production countries which is the first column df[[All,{1}]]. And the format ...
Yeqin Li's user avatar
3 votes
3 answers
166 views

Exporting CSVs of UTM coordinates. How to stop northing exporting in scientific notation?

I need to batch convert a folder of CSVs containing UTM coordinates from GDA94 to GDA2020. Sample data below: Copyable form: ...
JJ-'s user avatar
  • 31
0 votes
1 answer
50 views

How can I save the eigenvalues of a 1000x1000 COE matrix and 500x500 COE matrix in the same file?

I have generated eigenvalues of '1' 1000x1000 matrix of CircularOrthogonalEnsemble and saved it in a csv file using Export. Now ...
rohith t k's user avatar
0 votes
1 answer
534 views

Converting JSON to CSV but the formatting is not correct

I have a folder of about a million JSON files and I wrote this to convert them quickly to CSV, but the formatting is not correct for the software I'm feeding them into. Here's the code I'm using: <...
Nothingtoseehere's user avatar
2 votes
2 answers
149 views

Exporting a Large List to a CSV File Kills Kernel in 12.3?

I noticed that Mathematica 12.3 (also 12.1) kills the kernel when I try to Export a large list to a CSV file. No error messages, no warning, just a hard stop. Here is the code I wrote to replicate the ...
drk's user avatar
  • 81
0 votes
2 answers
62 views

Data wrangling to create a matrix from lists

I have a super simple data wrangling question that I can't seem to figure out (I am new to Mathematica). Basically I'm not sure what function to use. I have two parameters, ...
Clara's user avatar
  • 1
0 votes
1 answer
159 views

Exporting complex exponential float arrays to Python

A question related to a previous question. The answer in the previous question works well for simple complex arrays but not when considering arrays with exponential float coefficients as in the ...
John Doe's user avatar
  • 229
22 votes
2 answers
1k views

How to make Mathematica read in CSV as fast as Python's Pandas

I have many big CSV files for processing in Mathematica. And each time loading them into Mathematica takes a long time. Meanwhile, it takes much less time using Pandas under Python. For example, ...
sunt05's user avatar
  • 4,367
1 vote
1 answer
321 views

Editing complex arrays for export to Python

Quick question, can anyone advise on an efficient way to convert complex arrays with complex part denoted '${I}$' in Mathematica to '$j$' (as used in Python) and curly brackets '{}' replaced with '[]' ...
John Doe's user avatar
  • 229
1 vote
2 answers
195 views

Import all elements in a specific column from a CSV file given the name of the column

I have a large CSV file with many columns (300 MB). I know their names. I don't know the column numbers. How can I efficiently import a column for inspection by name? Here is a tiny example file: <...
Conor's user avatar
  • 7,449
0 votes
2 answers
468 views

Import from CSV formatting issue

I have two lists of data here: dm and dmHalo (see attached image). Theses are the same lists, the only difference is that dm was exported to a csv file and then reimported, while dmHalo was generated ...
asorlik's user avatar
  • 117
4 votes
2 answers
177 views

Organising and examining a complicated CSV file

I am being sent data in CSV files. The sender is providing helpful comments and lots of headings so that it is fine to look at in a spreadsheet environment. However, when I import it into Mathematica ...
Hugh's user avatar
  • 16.5k
1 vote
1 answer
104 views

Import of csv-data don't read columns

I couldn't catch the point: when I try to read an easy csv-dataset with ";" as delimiter, I get only "strings" instead of a set of columns. Here are two lines of the csv-File: k_id;...
DaMaSt's user avatar
  • 33
3 votes
1 answer
1k views

Formatting Imported Complex Arrays from Python (csv. files)

Just a short question, I am trying to import a complex array (matrix) from Python to Mathematica by first writing to a csv. file. When I Import the csv. array to Mathematica it is in a form (matrix ...
John Doe's user avatar
  • 229
2 votes
2 answers
139 views

Plot the complete dataset as listplots

I have imported as a csv file and converted to a Dataset. The data is in the following csv format ...
Indeterminate's user avatar
2 votes
2 answers
361 views

How to Listplot data from huge DataSet?

I have this data set in .csv and I imported them to mathematica to analyze them using Import function. Now here I have only shown a part of the dataset just to give an example of how it looks in Excel....
Indeterminate's user avatar
1 vote
1 answer
74 views

Incomplete data transfer: large CSV data Import, computation outputs exported as MX, then import the MX data [closed]

I have a very large CSV data file, which I imported it to my active Notebook: ...
Tugrul Temel's user avatar
  • 6,223
0 votes
1 answer
140 views

Import CSV data from internet to mathematica [closed]

This Link has data in CSV format for 2015 and other years. I would like to get the data for 2015 (by clicking on 2015) but the CSV data format has more rows than Excel can handle and therefore the ...
Tugrul Temel's user avatar
  • 6,223
1 vote
1 answer
227 views

Correcting delimiter definitions in .csv files

I have a number of .csv files that have a semicolon (;) delimiter rather than comma, and I'm wondering if there is a simple way to change the text in them all. Lets say I have a test file "a.csv&...
ChaSta's user avatar
  • 1,095
1 vote
2 answers
228 views

How to import a (large) .CSV file maintaining its shape (defined by curly brackets)

I'm working on large tables generated with Mathematica, evaluated on different computers. I plan on join the tables on my computer and proceed with the interpolation of the data there contained. The ...
D-Brc's user avatar
  • 113
1 vote
2 answers
607 views

Import and extract certain column and row

I have a problem with importing and extracting 2nd column in my CSV file. I need to have 3 list, the first one first column except for first row, the second will be second column except for 1st row ...
Vocis's user avatar
  • 195
8 votes
0 answers
74 views

Export Strings without quotes to a CSV file [duplicate]

Would like to export a List of Lists to a CSV file. Would like the strings in the exported file to not have quotes around them, which doesn't appear to be the default behavior. Is there an option ...
user6546's user avatar
  • 1,069
1 vote
1 answer
121 views

How to use column header as the x-axis in ListPlot?

I imported a csv file, and the header of the columns are specific dates. How would I plot these points using ListPlot, but the x-axis instead of 1,2,3, etc, is the dates from the column headers? For ...
froyogirlio's user avatar
0 votes
0 answers
45 views

Reading CSV data as numbers rather than symbols

I am attempting to read some data from a CSV file I have using edgeDistribution = Import["edge_distribution_2.csv", "CSV"] Mathematica will ...
cp250's user avatar
  • 33
1 vote
1 answer
65 views

Formating of cells with Dates on Exporting [closed]

I am trying to export a matrix into a .CSV file which has dates with format: Year/Month/Day. When I try to export it into a CV those cells are converted into Day/Month/Year When I try to export it ...
João Viana's user avatar
0 votes
1 answer
87 views

Importing a CSV file hangs up [duplicate]

Ver.12.1.0.0 hangs up when I do "Import" a csv file that contain an entry ""000000000000000000000000000000000000000053253943D755066515000057", while this csv file can be read ...
user13561's user avatar
0 votes
1 answer
358 views

How to export list of lists to a CSV without "Row[{}]" text?

When I export a CSV file using the code above, I get something like this: I'd like to export the answers / text on the right column without "Row[{}]" but just the raw text. Is this possible?...
Youssef A's user avatar
1 vote
0 answers
74 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 ...
newtest4 math's user avatar
-3 votes
1 answer
88 views

Reading a excel CSV file [closed]

I have a CSV file with exactly the following data: ...
user58270's user avatar
  • 135
2 votes
1 answer
561 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): ...
user avatar
1 vote
1 answer
387 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 ...
John Doe's user avatar
  • 141
0 votes
1 answer
155 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 ...
Karl A's user avatar
  • 67
2 votes
1 answer
568 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?
Indeterminate's user avatar
3 votes
3 answers
7k 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 ...
Gagik's user avatar
  • 131
0 votes
1 answer
171 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 ...
Vocis's user avatar
  • 195
0 votes
0 answers
78 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: ...
Chelsea Swank's user avatar