Do I need to split data when using GridSearchCV?
GridSearchCV will take the data you give it, split it into Train and CV set and train algorithm searching for the best hyperparameters using the CV set. You can specify different split strategies if you want (for example proportion of split).
But when you perform hyperparameter tuning information about dataset still 'leaks' into the algorithm.
Hence I would advice to take the following approach:
1) Take your original dataset and hold out some data as a test set (say, 10%)
2) Use grid search on remaining 90%. Split will be done for you by the algorithm here.
3) After you got optimal hyperparameters, test it on the test set from #1 to get final estimate of the performance you can expect on new data.
Gridsearhcv uses StratifiedKFold or KFold. So my question is that should I split my data into train and test before using gridsearch, then do fitting only for test data? I am not sure whether it is necessary because cv method already splits the data but I have seen some examples which split data beforehand. 
Thank you.