text_plain_output_1.png
from sklearn.model_selection import StratifiedShuffleSplit

import matplotlib.pyplot as plt

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

total_suicidal = pd.read_csv('../input/master.csv')

import matplotlib.pyplot as plt

from sklearn.model_selection import StratifiedShuffleSplit
split = StratifiedShuffleSplit(n_splits=1, test_size=0.2, random_state=42)
for train_index, test_index in split.split(total_suicidal, total_suicidal['year']):
    strat_train_set = total_suicidal.loc[train_index]
    strat_test_set = total_suicidal.loc[test_index]

suicidal_copy = strat_train_set.copy()

suicidal_copy.plot(kind='scatter', x='year', y='suicides_no')