Skip to main content



Asserts that given columns do not have any null values. This assertion can be used with Layer dataset entities.

  • Parameters

    column_names (List[str**]) -- List of columns to be checked.

  • Returns

    Function object.

  • Return type

    Callable[[...], Any]

from layer.decorators.assertions import assert_not_null
from layer.decorators import dataset

@assert_not_null(["UserName", "OperatingSystem"])
def create_my_dataset():
# No null value in the dataframe. Prints a success message.
data = [["user1", "linux"], ["user2", "linux"], ["user3", "other"]]
dataframe = pd.DataFrame(data, columns=["UserName", "OperatingSystem"])
return dataframe