Row refers to things put in line (hilera, fila) so the expression “in a row” means lined up one after the other. We can use it either for time and space.
So if we say: “It rained for three weeks in a row” this means that it rained day after day for three entire weeks. It is what we say in Spanish “tres semanas seguidas”.
Don’t forget that the famous game “Tres en raya” is called in English “Three in a Row”