Given a string, find out the frequency of each character and its first occurrence (first index). Implement character_stats(s), treating uppercase and lowercase characters as distinct and counting spaces and punctuation. Return a dictionary keyed by character, with each value containing frequency and first_index. Preserve keys in their order of first appearance.
def character_stats(s):