'Is there a way to delete an entire row and shift the cells up in xlwings?

If I wanted to delete an entire row and shift the cells up is there a way to do that? Below is a snippet of my loop which is iterating through the column and clearing the contents of the cell if it doesn't match my parameters. Is there a way rather than clearing just the cell in column A I could delete the whole row and shift up?

    for i in range(lastRow):
        i = i + 1
        if sheet.range('A' + str(i)).value != 'DLQ' or 'DLR':
            xw.Range('A' + str(i)).clear()
            continue
        else:
            continue


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source