title: How to split datatable dataframe into train and test dataset in python
body: <p>I am using <a href="https://datatable.readthedocs.io/" rel="nofollow noreferrer">datatable</a> dataframe. How can I split the dataframe into train and test dataset?<br />
  Similarly to pandas dataframe, I tried to use <code>train_test_split(dt_df,classes)</code> from sklearn.model_selection, but it doesn't work and I get error.</p>
  <pre><code>import datatable as dt
  import numpy as np
  from sklearn.model_selection import train_test_split
  
  dt_df = dt.fread(csv_file_path)
  classe = dt_df[:, &quot;classe&quot;])
  del dt_df[:, &quot;classe&quot;])
  
  X_train, X_test, y_train, y_test = train_test_split(dt_df, classe, test_size=test_size)
  </code></pre>
  <p>I get the following error : TypeError: Column selector must be an integer or a string, not &lt;class 'numpy.ndarray'&gt;</p>
  <p>I try a work around method by converting the dataframe to numpy array:</p>
  <pre><code>classe = np.ravel(dt_df[:, &quot;classe&quot;])
  dt_df = dt_df.to_numpy()
  </code></pre>
  <p>Like that it works, but, I don't know if there is a way allowing the <code>train_test_split</code> working correctly like in pandas dataframe.</p>
  <p><strong>Edit 1:</strong> The csv file contain as columns strings, and the values are unsigned int. Using <code>print(dt_df)</code> we get :</p>
  <pre>
       | CCC  CCG  CCU  CCA  CGC  CGG  CGU  CGA  CUC  CUG  …  
  ---- + ---  ---  ---  ---  ---  ---  ---  ---  ---  ---     
     0 |   0    0    0    0    2    0    1    0    0    1  …  
     1 |   0    0    0    0    1    0    2    1    0    1  …  
     2 |   0    0    0    1    1    0    1    0    1    2  …  
     3 |   0    0    0    1    1    0    1    0    1    2  …  
     4 |   0    0    0    1    1    0    1    0    1    2  …  
     5 |   0    0    0    1    1    0    1    0    1    2  …  
     6 |   0    0    0    1    0    0    3    0    0    2  …  
     7 |   0    0    0    1    1    0    0    0    1    2  …  
     8 |   0    0    0    1    1    0    1    0    1    2  …  
     9 |   0    0    1    0    1    0    1    0    1    3  …  
    10 |   0    0    1    0    1    0    1    0    1    3  …  
        ...
  </pre>
  <p>Thanks for you help.</p>