Moved DataFrame handling in misc module