Hi statalister,

I would like to reshape "long" a large dataset of 8000 households in which every households (in rows) has up to 35 members. If I reshape long using the usual command, stata creates 8000*35=280 k rows.. This is particularly inefficient because most of these rows are entirely empty: in deed most households have a few members only, a handful of them have 35 members.

How can I simply ask stata to reshape but not reshape empty rows?

Thanks