for full_file_path in glob(join(dir_name, '*.txt')):
    with open(full_file_path, 'rb') as f:
        _, file_name = split(full_file_path)
tokens = nltk.word_tokenize(f.read().lower())
adverbs_in_file = [token for token, tag in nltk.pos_tag(tokens) if tag in
    nltk_adverb_tags]
file_to_adverb_dict[file_name] = ' '.join(adverbs_in_file).upper()
print(pd.DataFrame(list(file_to_adverb_dict.items()), columns=['file_names', 'col1']))
Problems while trying to generate pandas dataframe columns from regulars expressions?