class DatasetModel(loggers.ModelLoggerMixin, models.Model):
Minimal model representing a dataset.
This is basically a Django representation of the LyDataset
class.
Its DatasetModel.load_dataframe
method makes use of the function
cached_load_dataframe
to load the dataset into a pandas DataFrame.
Note that this function uses joblib
to cache the results of the function call
in a persistent location given by the JOBLIB_CACHE_DIR setting.
Class |
|
Meta options for the DatasetModel . |
Method | __str__ |
Return the name of the dataset. |
Method | get |
Assemble kwargs from this model's field. |
Method | get |
Create a LyDataset from this model. |
Method | get |
Return the GitHub repository object. |
Method | load |
Load the underlying table. |
Method | save |
Update the is_private field based on the GitHub repository. |
Class Variable | institution |
Undocumented |
Class Variable | last |
Undocumented |
Class Variable | ref |
Undocumented |
Class Variable | repo |
Undocumented |
Class Variable | subsite |
Undocumented |
Class Variable | year |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | last |
Undocumented |
Property | name |
Return the name of the dataset. |
Assemble kwargs from this model's field.
These will both be used to call the cached_load_dataframe
function as well
as initialize a LyDataset
object.
Load the underlying table.
This calls the cached_load_dataframe
function with the assembled
kwargs and returns the resulting pd.DataFrame
.
lyprox.loggers.ModelLoggerMixin.save
Update the is_private field based on the GitHub repository.