# import necessary libraries
import re

# define the string
string = 'data science and analysis'

# create a set of unique values in the string
set_chars = set(re.findall(r'[a-z]', string))
                
# use sorted() function & give count as key
least_frequent = sorted(set_chars, key = string.count)[0]

# Replace missing values with the least frequent char
results = re.sub(r'\s', least_frequent, string)

# Print the results
print(results)