ENH Warn about panel.to_frame() discarding NaN GH7879

Also there was unimported module warnings with calls to it. In pandas/core/panel.py lines 718, 748 for example.
what does this setattr line do?