<jupyter_start><jupyter_text><jupyter_code>from google.colab import drive
drive.mount('/content/drive/')
import os
os.chdir('/content/drive/My Drive')
!ls
import re
import pandas as pd
pattern = r'([a-zA-Z\s]+):(.+)'
data = {
    'name': [],
    'line': []
}
with open('Friends-The-Blackout.txt', 'rt') as file:
  for line in file.readlines():
    match = re.findall(pattern, line)
    if match:
      name, line = match[0]
      data['name'].append(name)
      data['line'].append(line)
df = pd.DataFrame(data)
df.head()
sum(df['name'] == 'Chandler')
len(df)
df.to_csv('TheBlackout.csv', index=False)<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup