text_plain_output_1.png
import os

import pandas as pd

base_path = '/kaggle'
if os.path.exists(base_path):
    input_path = os.path.join(base_path, 'input', 'tweet-sentiment-extraction')
    output_path = os.path.join(base_path, 'working')
else:
    base_path = 'data'
    input_path = base_path
    output_path = os.path.join(base_path, 'submissions')
train_file = os.path.join(input_path, 'train.csv')
test_file = os.path.join(input_path, 'test.csv')

train_df = pd.read_csv(train_file)
test_df = pd.read_csv(test_file)

train_df.sample(n=1)['text']

train_df.dtypes

test_df.dtypes

f"The 3 sentiments are '{', '.join(train_df.sentiment.unique().tolist())}'"

train_df.dropna(inplace=True)

train_df.columns