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

subscribers = pd.read_csv('../input/daim-hakathon/SUBSCRIBERS_80.csv')
subscribers['subscribed'] = 1

dataset = pd.read_csv('../input/daim-hakathon/COOKIES_80.csv')
dataset1 = pd.merge(dataset, subscribers)

dataset1.count()

dataset2 = dataset1.drop(['subscribed'], axis=1)
dataset = pd.merge(dataset, dataset2, indicator=True, how='outer').query('_merge=="left_only"').drop('_merge', axis=1)
dataset['subscribed'] = 0

data = pd.concat([dataset1, dataset])

data.to_csv('COOKIES_80v2.csv', index=False)

indexes = data[data['numero_page'] == 0].index
data.drop(indexes, inplace=True)
data.isnull().sum()

data['chapitre'].fillna('home_page', inplace=True)
data.isnull().sum()