# define your string and create list of it
string = 'data science and analysis'
lst = list(string)

# Find the count of each element in the list
elem_counts = {elem: lst.count(elem) for elem in lst}

# Get the least frequent element
least_frequent = min(elem_counts, key=elem_counts.get)

# replace missing values with the least frequent char
results = string.replace(' ', least_frequent)

# print the results