<jupyter_start><jupyter_text>---title: "Remove_Punctuation"author: "Aishwarya"date: 2020-08-10description: "-"type: technical_notedraft: false---<jupyter_code>import string
import pandas as pd
Sms_content=['hi,how are you','Iam fine','what is it?']
df=pd.DataFrame(Sms_content,columns={'sms'})
df
def remove_punctuation(text):
    new_text=''.join([char for char in text if char not in string.punctuation])
    return new_text

df['new_sms']=df['sms'].apply(lambda row : remove_punctuation(row))
df<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1534090909090909, 'fraction_numerical': 0.015151515151515152, 'mean_word_length': 7.672131147540983, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '83380', 'license': 'MIT', 'n_tokens_mistral': 203, 'n_tokens_neox': 196, 'n_words': 38, 'path': 'docs/python/basics/Remove_Punctuation.ipynb', 'repo_name': 'AishwaryaRamaswami/mlnotes', 'size': '528'}