(data)
return str(data)
Returns an encoded string that can be stored in the database.

        Raises:
            ValueError: If the value is not a float.
Returns an encoded string that can be stored in the database.
Returns an encoded string that can be stored in the database .
def encode(data):
        """Returns an encoded string that can be stored in the database.

        Raises:
            ValueError: If the value is not a float.
        """
        if not isinstance(data, float):
            raise ValueError('Data is not a float.')

        return str(data)
def encode ( data ) : if not isinstance ( data , float ) : raise ValueError ( 'Data is not a float.' ) return str ( data )