Dec-17-2017, 08:05 PM
Dear Python Experts,
I have googled this error but just came to new ways of slicing the data frame what led to near error (invalid slice).
What does that exactly mean to many indexers and why does that happen when I only slice 1:3?
I have googled this error but just came to new ways of slicing the data frame what led to near error (invalid slice).
What does that exactly mean to many indexers and why does that happen when I only slice 1:3?
from sklearn.ensemble import RandomForestClassifier #---Random Forest Classifier clf = RandomForestClassifier(max_features = 8, random_state = 0) clf.fit(X_train1.ix[1:,3], y_train1.ix[1:,3]) clf_predicted = clf.predict(X_test)