<jupyter_start><jupyter_text>Lab Program 1> - Input: .csv file> - Output: predicted hypothesis as .csv<jupyter_code>import csv

with open('pgm1.csv') as fh:
    reader = csv.reader(fh)
    h = ['0','0','0','0','0','0']
    for row in reader:
        if row[-1] == 'no':
            print(h)
            continue
        for i in range(len(row)-1):
            if h[i] != row[i] and h[i] != '0':
                h[i] = '?'
            elif h[i] == '0':
                h[i] = row[i]
        print(h)<jupyter_output>['sunny', 'warm', 'normal', 'strong', 'warm', 'same']
['sunny', 'warm', '?', 'strong', 'warm', 'same']
['sunny', 'warm', '?', 'strong', 'warm', 'same']
['sunny', 'warm', '?', 'strong', '?', '?']
{'fraction_non_alphanumeric': 0.25, 'fraction_numerical': 0.01694915254237288, 'mean_word_length': 2.4585365853658536, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '24036', 'license': 'MIT', 'n_tokens_mistral': 286, 'n_tokens_neox': 270, 'n_words': 64, 'path': '.ipynb_checkpoints/pgm1-checkpoint.ipynb', 'repo_name': 'pavanpej/ML-Lab', 'size': '708'}