text_plain_output_1.png
import pandas as pd

import re

import string

review_text_train = pd.read_csv('../input/review_text_train.csv', index_col=False, delimiter=',', header=0)
review_text_test = pd.read_csv('../input/review_text_test.csv', index_col=False, delimiter=',', header=0)
review_meta_train = pd.read_csv('../input/review_meta_train.csv', index_col=False, delimiter=',', header=0)
review_meta_test = pd.read_csv('../input/review_meta_test.csv', index_col=False, delimiter=',', header=0)

df_train = review_text_train.copy()

df_train.isna().sum()

def clean_text_round_1(text):
    text = text.lower()
    text = re.sub('[%s]' % re.escape(string.punctuation), '', text)
    text = re.sub('\\w*\\d\\w*', '', text)
    return text
round_1 = lambda x: clean_text_round_1(x)

data_review_cleaned = pd.DataFrame(df_train.review.apply(round_1))

data_review_cleaned