load_data_frame

getml.data.load_data_frame(name)[source]

Retrieves a DataFrame handler of data in the getML engine.

A data frame object can be loaded regardless if it is held in memory (accessible through the ‘Data Frames’ tab in the getML monitor) or not. It only has to be present in the current project and thus listed in the output of list_data_frames().

Args:
name (str):

Name of the data frame.

Examples:

d, _ = getml.datasets.make_numerical(population_name = 'test')
d2 = getml.data.load_data_frame('test')
Raises:

TypeError: If any of the input arguments is of wrong type.

ValueError:

If name does not corresponding to a data frame on the engine.

Returns:
DataFrame:

Handle the underlying data frame in the getML engine.

Note:

The getML engine knows to different states of a data frame object. First, the current instance in memory (RAM) that holds the most recent changes applied via the Python API (listed under the ‘in_memory’ key of list_data_frames()). Second, the version stored to disk by calling the save() method (listed under the ‘in_project_folder’ key). If a data frame object corresponding to name is present in both of them, the most recent version held in memory is loaded. To load the one from memory instead, you use the load() method.

In order to load a data frame object from a different project, you have to switch projects first. Caution: any changes applied after the last call to save() will be lost. See set_project() and DataFrame for more details about the lifecycles of the models.