text_plain_output_1.png
import pandas as pd

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

import pandas as pd
file_path = '/kaggle/input/twitter-suicidal-data/twitter-suicidal_data.txt'
d = {'tweet': [], 'intention': []}
column_names = []
file = open(file_path)
for f in file:
    content = f.split(',')
    if content[0] == 'tweet':
        column_names.append(content[0])
        column_names.append(content[1][:-1])
    elif content[1][:-1] != '':
        d['tweet'].append(content[0])
        d['intention'].append(int(content[1][:-1]))
db = pd.DataFrame(data=d, columns=column_names)

print('Cantidad de datos intencion de suicidio: ', len([i for i in list(db['intention'].values) if i == 1]))