Login
Back to bricks list
Introduction Version

DataFrameRField

Specific RField for Dataframe, these are loaded and dumped into a file

WARNING, this uses the pick function, only load file that you trust, otherwise it could execute malicious code

:param FileRField: [description] :type FileRField: [type]

Attributes

include_in_dict_view: boolsearchable: bool

Functions

__INIT__
               Only small amount of data can be mark as searchable, defaults to False
                  Support primitive value, Type of Callable function
                  If type or callable, it will be called without parameter to initialise the default value, defaults to None
                  Do not mark huge fields as include in dict view, defaults to False
DESERIALIZE
Parameters:
NameTypeDefault valueDescription
r_field_valuestr
Return type:
Any
DUMP_TO_FILE

Implement this method to dump your object into a file to be able to load it later. This method is called when the resource is saved.

Parameters:
NameTypeDefault valueDescription
r_field_valueDataFrame Object to dump (value of the r_field) any
file_pathstr Path of the file to dump (the object must be dumped into this file)
GET_DEFAULT_VALUE
Return type:
Any
LOAD_FROM_FILE

Implement this method to load your object from the file. This method is called when the RField of the resource is loaded.

Parameters:
NameTypeDefault valueDescription
file_pathstr Path of the file
Return type:
DataFrame
SERIALIZE

METHOD NOT USED. Ignore this method.

Parameters:
NameTypeDefault valueDescription
r_field_valueAny
Return type:
str