import pandas as pd # Read the CSV file df = pd.read_csv('gt1_8kElo_all.zip') # Filter the DataFrame based on the conditions filtered_df = df[(df['Result'] == '1-0') & (df['WhiteElo'] > 1900) & (df['WhiteElo'] < 2300) & (df['BlackElo'] < 2600)] # Select only the 'transcript' column transcript_df = filtered_df[['transcript']] # Save the filtered 'transcript' column to a new CSV file transcript_df.to_csv('NEW_lichess_filtered.csv', index=False)