application_vnd.jupyter.stderr_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

df_new = pd.read_json('/kaggle/input/indonesiandata/emotion_id_tweets.json', lines=True)

ex_label = []
for i in range(df_new['annotation'].shape[0]):
    if df_new['annotation'][i]['labels'] == []:
        ex_label.append('no_emotion')
    else:
        ex_label.append(df_new.annotation[i]['labels'][0])

df = pd.DataFrame()
df['content'] = df_new['content']
df['emotion'] = ex_label

df['len'] = df['content'].astype(str).apply(len)
df.head()