application_vnd.jupyter.stderr_output_1.png
import os

import os

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import string

import numpy as np
import pandas as pd
import os

currr_dir = '../input/'
all_headlines = []
x = 0
for filename in os.listdir(currr_dir):
    if 'Articles' in filename:
        article_df = pd.read_csv(currr_dir + filename)
        all_headlines.extend(list(article_df.headline.values))
        x = 1
        break
all_headlines = [h for h in all_headlines if h != 'Unknown']

def clean_text(txt):
    txt = ''.join((w for w in txt if w not in string.punctuation)).lower()
    txt = txt.encode('utf8').decode('ascii', 'ignore')
    return txt

corpus = [clean_text(x) for x in all_headlines]
print(corpus[:10])