Making a dataframe from multiple (say 50) lists with differing lengths using for loop

np1 is missing. To avoid problems like this, use a reprex. See the FAQ: How to do a minimal reproducible example reprex for beginners.

Generating a reprex uses a fresh session to assure that everything referenced in the code is there.