mi_clean_data function

Reshape data and delete meaningless rows.