text_html_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

import numpy as np
import pandas as pd
dataset = pd.read_csv('../input/pseudo_facebook.tsv', sep='\t')

dataset.shape

data_age1 = dataset.groupby('age').mean()

data_age1.reset_index(inplace=True)

datacount = dataset.groupby('age').count()
datacount = datacount.reset_index()
data1000 = datacount[datacount['tenure'] >= 1000]

dataset_1k = data_age1.loc[data_age1['age'].isin(data1000['age'])]
dataset_1k[dataset_1k['tenure'] == dataset_1k['tenure'].max()]

data2000 = datacount[datacount['tenure'] >= 2000]
dataset_2k = data_age1.loc[data_age1['age'].isin(data2000['age'])]
dataset_2k[dataset_2k['tenure'] == dataset_2k['tenure'].max()]

dataset_2k['mobile_surfing'] = dataset_2k.mobile_likes + dataset_2k.mobile_likes_received
dataset_2k['web_surfing'] = dataset_2k.www_likes + dataset_2k.www_likes_received

dataset_2k[dataset_2k['mobile_likes'] == dataset_2k['mobile_likes'].max()]