def METHOD_NAME(self, stream: str, df: 'pd.DataFrame'):
    number_of_rows = len(df.index)
    schema_out = []
    for column_name, properties in self.schemas[stream]['properties'].items():
        column_types = properties.get('type', [])
        column_format = properties.get('format')
        for any_of in properties.get('anyOf', []):
            column_types += any_of.get('type', [])
        nullable = COLUMN_TYPE_NULL in column_types
        col_type = find(lambda x: COLUMN_TYPE_NULL != x, column_types)
        # pa.long_string() is not supported by Delta Lake library as of 2022/12/12
        column_type = pa.string()
        column_type_df = str
        if COLUMN_TYPE_ARRAY == col_type:
            column_type = pa.list_(pa.string())
            column_type_df = str
        elif COLUMN_TYPE_BOOLEAN == col_type:
            column_type = pa.bool_()
            column_type_df = bool
        elif COLUMN_TYPE_INTEGER == col_type:
            column_type = pa.int64()
            column_type_df = int
        elif COLUMN_TYPE_NUMBER == col_type:
            column_type = pa.float64()
            column_type_df = float
        elif COLUMN_TYPE_OBJECT == col_type:
            column_type = pa.string()
            column_type_df = str
        elif COLUMN_TYPE_STRING == col_type and COLUMN_FORMAT_DATETIME == column_format:
            column_type = pa.string()
            column_type_df = str
        elif COLUMN_TYPE_STRING == col_type:
            column_type = pa.string()
            column_type_df = str
        non_null = df[column_name].notnull()
        df.loc[non_null, [column_name]] = df[non_null][column_name].apply(
            lambda x: str(column_type_df(x)),
        )
        if df[column_name].dropna().count() != number_of_rows:
            df[column_name] = df[column_name].fillna('')
            column_type = pa.string()
            column_type_df = str
        df[column_name] = df[column_name].map(column_type_df)
        f = pa.field(
            name=column_name,
            type=column_type,
            nullable=nullable,
            metadata={},
        )
        schema_out.append(f)
    schema = pa.schema(schema_out, metadata={})
    return df, schema