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 tagged [import]

Questions about getting data, files, images etc. from various formats into a form that can be read, tranformed and manipulated by Mathematica

3
votes
2answers
58 views

Importing an Excel file as a structured dataset

I need to import an Excel file as a dataset with row and column headers, and the following option using "Dataset" does not work. However, I can import the Excel file using "Data" option as a list ...
2
votes
2answers
49 views

Using list of rules from imported .mat file

I'm attempting to learn Mathematica to replace MATLAB. However, I have some data in .mat files which contains named variables. Whenever I import the .mat file, I get a list of rules. What's the best ...
0
votes
1answer
62 views

Get .csv or .xlsx real data, some missing, into Mathematica and form it for curve fitting and 3D plotting

Problem: My data consists of Real values at Real $x, y$ positions. It is stored in the array-forms: comma-separated (type .csv) and spreadsheet (type .xlsx). As a Mathematica Dataset, it may be ...
10
votes
3answers
1k views

Import tweets from Twitter

Robert Raguet-Schofield in the Mathematica Blog introduced a way to import tweets from Twitter into Mathematica. I attempted to use this method. I started with this line of code: ...
0
votes
3answers
65 views

How to import a CSV file of files that have space delimited values?

I've received a data file in a mysterious ".pos" format. It consists of many lists that are separated by the space character; these are in turn separated by commas,e.g., { {a b c},{d e f},...} ...
0
votes
0answers
26 views

interface problem for image recognition

I made the following code that should recognize the image imported from the pc. If I do it for the first time it's fine, but if I load a second image it leaves me the name of the previous one. You ...
0
votes
0answers
14 views

Import all images of a folder on mathematica [duplicate]

How can I import all the images of a folder on mathematica specifying the category of such images? For example, if I have a folder with images representing the night how do I import them and specify ...
2
votes
1answer
42 views

Importing a raw image

I have raw images that I can import and view with ImageJ. They are the output of a program which I don't have the source code for, so I'm stuck with the output format. They are imported as follows ...
1
vote
0answers
42 views

Importing and evaluating text file [closed]

I appologise in advance if this was asked before, but I couldn't find the answer. I have a huge amount of data collected in several lists that I need to analyse. I don't want to have all this data ...
1
vote
0answers
64 views

Cannot import data as NetCDF

This might be obvious but I cannot import a dataset. Import["data.nc", "Datasets"] returns {"longitude", "latitude", "time", "time_weights", "date", "aet"} ...
2
votes
1answer
39 views

How do you upload text from a PDF using FormFunction?

I can import text from a PDF using text = Import[filename, "Plaintext"]; I'd like to do the same thing using FormFunction, but am unsure how. I've tried the ...
2
votes
0answers
55 views

Import specific range of Google spreadsheet

I am trying to import only a specific range of a Google spreadsheet as data in Mathematica for further usage like plotting. So I tried to use the data = Import["https://...", "Data"] function, but ...
3
votes
0answers
59 views

Is there a way of reading the data out of a MATLAB's “.fig” file in Mathematica?

I have a ".fig" file from MATLAB that I know is a list of $ (x, y) $ coordinates. As far as I know, the ".fig" format stores the data and recreates it every time is opened. I would like to get the ...
2
votes
1answer
61 views

Memory consumption problem when reading png images with Image`ImportExportDump`ImageReadPNG

For importing png images I use often: image = First@Image`ImportExportDump`ImageReadPNG[fileName] (see: ?*`*PNG*) since this is faster than: ...
1
vote
1answer
88 views

Numeric data from a color map

Importing the following image (without a scale): and knowing the extreme temperatures, is it possible to obtain the graduated scale? Also, it would be interesting to get the temperatures of all the ...
5
votes
1answer
230 views

Opening Mathematica file in Google drive

I have a Mathematica file in my Google drive. There is no option to open the Mathematica file directly, without downloading it. Is it possible to directly open the file from Google drive?
1
vote
1answer
64 views

Is there any built-in way to loop over a column/lines?

I have a file as following: cat data.m 1 2 3 x+y 2 x + 3 y So it contains rows containing numeric numbers or expressions, which at this stage is not ...
4
votes
1answer
73 views

Reading total number of frames in an AVI

I am reading large AVI files and want to know the number of stored frames. To do that in Mathematica 11.3 I use the following: ...
4
votes
2answers
227 views

Question regarding MathMF

I want to extract images from an avi file with MathMF from https://github.com/SimonWoods/MathMF. (please see here the answer of Simon) A test avi file (named "...
6
votes
1answer
172 views

Fast export of png images from large avi file with Mathematica 11.3

In version 11.1.1 I used MathMF by Simon Woods to extract png images from large avi files (up to 100GB in size). His package was MUCH faster than using something like that: ...
42
votes
4answers
6k views

Importing videos in Mathematica

Mathematica's Import command is purportedly able to import .AVI files. However, I find that many files that I want to import do only result in MMA showing a blank ...
0
votes
1answer
25 views

How to dynamically name and date a file for import? [duplicate]

I want to import a data file named "A(var1)B(var2)C(var3).dat" where the values of the variables var1, var2, var3 are being provided by a function. How can I do that?
11
votes
2answers
775 views

How to make Import recognize a new file extension?

I've written an import converter for a custom file format, and it all seems to be working as expected, except for the fallback behavior with no arguments: ...
1
vote
1answer
68 views

Loop for saving images with plots of numerical data to make a movie

I am having a problem with construction of a loop that would load data from a bunch of files one by one, then produce a plot for each of the files, then save each of the plots as a separate image file,...
0
votes
0answers
39 views

Undo added line breaks PutAppend

I used PutAppend to write away a some results. It turns out that Mathematica has inserted annoying line breaks. This is discussed in Why there are line breaks when ...
0
votes
0answers
68 views

Trouble importing PDF onto mathematica

I'm new to Mathematica, so I don't really understand some of the coding. Each time I enter this, or a variant of this code ...
2
votes
0answers
27 views

Loading previous saved variables into DynamicModule

I have a GUI, built inside a DynamicModule. I would like to be able to load previous set options and values, changing the values that are currently set within the DynamicModule, not the global ...
1
vote
0answers
50 views

How to parse through a .txt file in the Classify function and assign a class to each item?

I have 2 txt files that contain 500 DNA sequences each. Both files use 2 hard returns to separate the sequences like so: ATCGATCT... ATCGATCT... ATCGATCT... I ...
6
votes
1answer
460 views

How to import/export to libsvm?

Under the hood Mathematica uses libsvm, so I don't think this question is beyond the pale. I need to export an svm I trained with Classify to the standard SVM Format (which is readable by libsvm). ...
5
votes
2answers
146 views

How to import only the first column

I have a file with data given in this manner: ...
1
vote
1answer
77 views

How to import complex .txt file to matrix in MMA for user defined keywords / database?

I am thinking about how can we import complex .txt file (Ansys/Abaqus) to MMA for the selected database? For example: txt file (input file): ...
3
votes
1answer
68 views

Importing data from an https server

When trying to import data from an https request I get the following error message. ...
8
votes
1answer
1k views

How can I recover the source code from cdf file?

by a mistake I have deleted the nb file by which the CDF was generated. All required definitions were in one cell. If I remember the code looked like this: ...
2
votes
0answers
49 views

How to store the values of a function in a file

As it is well known, it is possible to define a function that remembers its values once its evaluated, using the following code: f[x_]:=f[x]=rhs During the day ...
8
votes
1answer
120 views

11.3 - import of files with paths containing non-ASCII characters [duplicate]

Import: Version 11.2 works correctly, no problem with non-ASCII characters in the path of file. But upgrated version 11.3 a) does not import these files b) ...
0
votes
2answers
37 views

Is there any means of Importing folder with images( .jpeg) directly?

I am using Mathematica for training dataset of fruits, for which i need to import the collection of images. Can we import a folder with images directly or Do we need to import each image in iteration ...
5
votes
1answer
170 views

How to save/load (export/import) symbolized variables?

I have a large number of variables/functions with subscripts and use definitions with memoization to avoid recomputing them within a kernel session, but I cannot figure out how to export them all for ...
0
votes
1answer
88 views

How can I get rid of extraneous brackets when importing data from MATLAB? [closed]

How can I easily correct this data sequence from MATLAB to one readable in Wolfram Mathematica? The problem is the 2 outer brackets: ({{ ... }}) ...
2
votes
3answers
491 views

Export, Import and extra curly brackets?

list= {{}, {200, 200, 200}, {}, {201, 201}}; Export["list.csv", {list}, "csv"] data = Import["lnumber.csv", "csv"]; The result of this export and import is an ...
13
votes
2answers
379 views

How to workaround failures with Unicode filepaths?

(Cross-posted on the Wolfram Community.) The Mathematica's Kernel and FrontEnd currently work well with Unicode file/directory paths, but some other components of the system contain long-standing ...
6
votes
1answer
88 views

Syntax for making a custom `Import` converter with parameters?

The machinery for Import allows custom converters to be defined for importing different file formats. The examples in the link provide details for writing such a ...
0
votes
0answers
35 views

How to Import .edf file in Mathematica?

My file is: https://drive.google.com/file/d/1dbjE4zWRS4zKr2lQk05wg-bjEyM5KT0I/view?usp=sharing I was trying to import .edf file in Mathematica, but every time it showed error. Import["File.edf"]; ...
5
votes
1answer
116 views

webscraping: Wolfram notebook vs browser

In the Netherlands there is a website Funda.nl There you can find all houses for sale or for rent. I used webscraping as a tool to collect data for analyse-purpose. The script I used is like: ...
9
votes
2answers
162 views

How to import python pickle *.pkl?

I find some ELMo-models on github. I want to use the Simplified-Chinese version: http://pbmpb9h15.bkt.gdipper.com/zhs.model.tar.xz But these files were saved as python pickles. I want to import ...
3
votes
2answers
445 views

Mathematica Import functions fails for data download from website

I am trying to download some data from a website that uses "java enabling" to tell me that I cannot download the data. Using Import[ "website...", "Data"] I get ...
14
votes
6answers
4k views

How do you skip missing data values in a data file?

In scanning through a simple imported file of weather station data, some dates have missing data. What is a test to use to check whether a datum is valid? I tried ...
19
votes
1answer
2k views

Release the web camera after using CurrentImage[]

CurrentImage[] will capture an image from the webcam. It is even possible to create a live video in the notebook using ...
6
votes
1answer
200 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
2answers
41 views

Customized function for manipulation of data and plotting

I have a number of datasets (csv) which require the same manipulation and plotting, but I don't want to repeatedly write the same set of code again and again. What is the best way to do this? Piece ...
2
votes
1answer
37 views

Using SFTP directories as regular directories

Is it possible to use SFTP directories in a similar way to normal directories in Mathematica? I would like it if I could Import,Export,Get,Put etc to SFTP directories just as if they were normal ...