Data import
Engee supports different file formats for importing data. Before you start working - upload them to Engee file browser . To import files, use the
button or drag-and-drop into the file browser area:
The Engee core, based on the Julia programming language, includes only the most basic packages by default. To add the ability to import files in the desired format, install additional packages using the package manager Pkg.
To view installed custom packages, use the Pkg.status() command.
|
With the base packages, Engee supports importing data from:
-
.engee model files into the workspace;
-
.ngscript and .ipynb scripts in script editor
. Executing variable cells imports their values into the variable window (more details in Working with Python);
-
variables from .mat and .jld2 files into the variables window
(more details in Importing and exporting variables);
-
blocks from workspace to user libraries .nglib files
.
Import of data from other formats is realised using I/O functions (see Retrieving data from imported files) for details. |
Importing big data
To work with Big Data, Engee uses the structure WorkspaceArray. CSV files and the tabular data structure DataFrame are used to import data into the WorkspaceArray. |
To create a WorkspaceArray:
-
DataFrame - create a DataFrame based on existing data, for example:
using DataFrames # connecting the DataFrames package times = [2 ^ i for i in LinRange(1, 3, 1000)] values = [sin(i ^ 2 + 1) * 2 + cos(i) for i in times] data_frame = DataFrame(time = times, value = values) # creating a DataFrame with two columns — time and value
Create a WorkspaceArray from a DataFrame:
my_workspacearray = WorkspaceArray("my_data_frame", data_frame)
where
my_workspacearray
is a variable with the WorkspaceArray data type that contains data from a DataFrame nameddata_frame
. -
CSV - create CSV file from the received DataFrame:
using CSV # connecting the CSV package CSV.write("/user/workspacearray_csv.csv", delim="\t", data_frame)
Create a WorkspaceArray from the received CSV:
workspacecsv = WorkspaceArray("workspacearray_csv", "/user/workspacearray_csv.csv") # where "/user/workspacearray_csv.csv" is the path to the CSV file, and "workspacearray_csv" is its name
To create a WorkspaceArray from an imported CSV, follow the conditions described here.