Problem faced when collect data randomly from cluster
The problem was understanding the index between train_unlabeled data and the cluster. There are no connection between index of train_unlabeled data set and the data that belongs to cluster. As I am using jupyter notebook, so the indexes given to itself. Now when I clustered those unlabelled data (index start from 344 to 863) into 2, then which data belongs which cluster it already takes its new index for cluster which is not same as previous index.

For better understanding I'm giving an example:

suppose for unlabelled data (train_unlabeled) the data those indexes are 344,345,346,347 and 348. After clustering 344 and 346 took their place at cluster 0 and 345,347,348 at cluster 1. While clustering the new index of 344 will be 0, for 345 will be 1, for 346 will be 2 and so on.

That's why when I print the indexes of data, belongs to cluster 0 and 1 (by using print (i, sample_i) this command) it just shows the index of data of its own cluster. 

My mistake was I though that both indexes are same.

Now for keep similarity of indexes before and after cluster, I reset the the index of train_unlabeled data. 

The command is: train_unlabeled = train_unlabeled.reset_index()

Here comes another problem, that is a new column named:index is added.

 

So, after resetting index (now, index starts from 0), I drop the extra index column by using this command : train_unlabeled =train_unlabeled.drop('index', axis=1, inplace=True)

And at last I cluster that unlabeled data (train_unlabeled) and would be able to take 95% data randomly from cluster by using cluster index.