Function to converting DataFrames to YAML-safe dicts.