getml.project.DataFrames
DataFrames(data=None)
Container which holds all data frames associated with the running project that are currently stored in memory. The container supports slicing and is sort- and filterable.
Source code in getml/project/containers/data_frames.py
 | 34 35 36 37 38 39 40 41 |  | 
 in_memory  property  
    on_disk  property  
  Returns the names of all data frames stored in the project folder.
delete
delete() -> None
Deletes all data frames in the current project.
Source code in getml/project/containers/data_frames.py
 | 109 110 111 112 113 114 115 |  | 
filter
filter(conditional: Callable) -> DataFrames
Filters the data frames container.
| PARAMETER | DESCRIPTION | 
|---|---|
| conditional | A callable that evaluates to a boolean for a given item.   TYPE:  | 
| RETURNS | DESCRIPTION | 
|---|---|
| DataFrames | A container of filtered data frames. | 
Example
big_frames = getml.project.data_frames.filter(lambda frame: frame.memory_usage > 1000)
Source code in getml/project/containers/data_frames.py
 | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |  | 
load
load() -> None
Loads all data frames stored in the project folder to memory.
Source code in getml/project/containers/data_frames.py
 | 153 154 155 156 157 158 159 160 |  | 
retrieve
retrieve()
Retrieve a dict of all data frames in memory.
Source code in getml/project/containers/data_frames.py
 | 173 174 175 176 177 178 |  | 
save
save() -> None
Saves all data frames currently in memory to disk.
Source code in getml/project/containers/data_frames.py
 | 182 183 184 185 186 187 188 |  | 
sort
sort(key: Callable, descending: bool = False) -> DataFrames
Sorts the data frames container.
| PARAMETER | DESCRIPTION | 
|---|---|
| key | A callable that evaluates to a sort key for a given item.   TYPE:  | 
| descending | Whether to sort in descending order.   TYPE:  | 
| RETURNS | DESCRIPTION | 
|---|---|
| DataFrames | A container of sorted data frames. | 
Example
by_num_rows = getml.project.data_frames.sort(lambda frame: frame.nrows())
Source code in getml/project/containers/data_frames.py
 | 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |  | 
unload
unload() -> None
Unloads all data frames in the current project from memory.
Source code in getml/project/containers/data_frames.py
 | 217 218 219 220 221 222 223 |  |