text_html_output_1.png
import pandas as pd

df_train = pd.read_csv('/kaggle/input/amazon-reviews/train.csv')
df_test = pd.read_csv('/kaggle/input/amazon-reviews/test.csv')

df_train.columns = ['label', 'title', 'text']

df_test.columns = ['label', 'title', 'text']

df_train = df_train.head(100000)
df_test = df_test.head(10000)

def concat_columns(df, col1, col2, new_col):
    df[new_col] = df[col1].apply(str) + ' ' + df[col2].apply(str)
    df.drop(col2, axis=1, inplace=True)
    return df
df_train = concat_columns(df_train, 'text', 'title', 'text')
df_test = concat_columns(df_test, 'text', 'title', 'text')

df_train.head()