<jupyter_start><jupyter_text>Method 1 - multi-steps<jupyter_code>## build the dataframe

df1 = pd.DataFrame(zip(claims, dates, totals),
                 columns = ["Claims", "Dates", "Totals"])

df1
## columns we need to target
## we don't need the "Claims" column
target_columns = ["Dates", "Totals"]
## for loop through to strip html

for target in target_columns:
    df1[target] = df1[target].apply(lambda x: strip_html(x))
df1<jupyter_output><empty_output><jupyter_text>Method 2 - One step but less clear?<jupyter_code>## zip and map
## zip and map
df2 = pd.DataFrame(list(zip(claims, 
                            list(map(strip_html, dates)),
                            list(map(strip_html, totals))
                            )))

df2<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12548512289780078, 'fraction_numerical': 0.01164294954721863, 'mean_word_length': 3.0523560209424083, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '659433', 'license': 'MIT', 'n_tokens_mistral': 265, 'n_tokens_neox': 256, 'n_words': 63, 'path': 'advanced scraping workshops/week_3_html_mix_DEMO.ipynb', 'repo_name': 'sandeepmj/fall21-students-practical-python', 'size': '773'}