Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- import numpy as np
- ACTIONS = 't201 t202 t203 t204 t205 t206 t207 t208 t209 t210'.split()
- df = pd.read_csv('sandbox/10G.prediction')
- df['left_or_right'] = np.random.choice([True, False], size=df.shape[0])
- df['random_action'] = np.random.choice(ACTIONS, size=df.shape[0])
- df['final_action'] = np.where(df.left_or_right, df.action, df.random_action)
- df[['vid', 'final_action']].to_csv('sandbox/10G_handmade_eps05.prediction2', index=False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement