<jupyter_start><jupyter_text>Column Order:<jupyter_code>col_order = ['K inf md',
           'Kair md', 
           'perm_md', 
           'perm_horz_md', 
           'Perm Ka Max md', 
           'perm_klink_md']
df2 = df[col_order]
df2
df3 = df2.rename(columns={"K inf md": "c1", "Kair md": "c2", "perm_md":"c3", "perm_horz_md":"c4", "Perm Ka Max md":"c5", "perm_klink_md":"c6"})
df3.head(1)
def rank (c1, c2, c3, c4, c5, c6):
    if (c1 !=np.nan):
        return value
    elif (c2 !=np.nan):
        return value
    elif (c3 !=np.nan):
        return value
    elif (c4 !=np.nan):
        return value
    elif (c5 !=np.nan):
        return value
    elif (c6 !=np.nan):
        return value
df3['final'] = df3.apply(rank(df3.c1, df3.c2, df3.c3, df3.c4, df3.c5, df3.c6))
df3
def my_fun(x, var1, var2, var3):
    print (x)
    if (x[var1]-x[var2])>0 :
        x[var3]=x[var1]-x[var2]
    else:
        x[var3]=0
    return x   
df2['final'] = df2.apply(lambda row: final(row), axis=1)


def rank(df2): 
    if df2['launched_date']is not None:
        print(row['launched_date'])
        exit()
        adjusted_date = date_to_time_in_timezone(row['launched_date']) 

    elif row['item_published_at'] is not None:
        adjusted_date = row['item_published_at']#make datetime in PST
    else:
        adjusted_date = row['item_created_at'] #make datetime in PST
    return adjusted_date<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15985915492957747, 'fraction_numerical': 0.03873239436619718, 'mean_word_length': 2.729658792650919, 'pattern_counts': {'":': 6, '<': 5, '<?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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '357998', 'license': 'MIT', 'n_tokens_mistral': 579, 'n_tokens_neox': 566, 'n_words': 127, 'path': 'special_proj_thomas.ipynb', 'repo_name': 'mitch-schneider/lewiscleanup', 'size': '1420'}