Forum Discussion
Ellie_1066
Mar 14, 2025Copper Contributor
Complicated data analys
Enkel Avslutande Heder k2 b2 n2 k1 b1 n1 Ö k3 b3 n3 k9 b9 n9 S k4 b4 n4 V k5 b5 n5 N k6 b6 n6 W k7 b7 n7 G k8 b...
- Mar 15, 2025
How about Python:
import pandas as pd # Create your data data = { 'Hand': ['pon', 'kan', ''], 'Value1': ['b2', 'b1', 'ö'], 'Result': [0, 0, 0] } df = pd.DataFrame(data) # Define a function for assigning numeric values def assign_result(row): if row['Value1'] == 'b2': return 10 elif row['Value1'] == 'b1': return 20 elif row['Value1'] == 'ö': return 30 else: return 0 # Apply the function to the DataFrame df['Result'] = df.apply(assign_result, axis=1) print(df)
m_tarler
Mar 17, 2025Bronze Contributor
I'm not sure what you need. The top part almost looks like chess references to me. But it sounds like you want a simple tabular substitution. Try using something like XLOOKUP. If you can give a sample sheet it may be easier to help. If you can't post it here try sharing with OneDrive or a similar cloud option.