"vscode:/vscode.git/clone" did not exist on "7577a363a6c93b698fcc8b03d12ee2a06e5f10de"
Unverified Commit c5cfe3e3 authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[python] update DataTable handling (#2020)

parent 414bb609
......@@ -36,7 +36,7 @@ The LightGBM Python module can load data from:
- libsvm/tsv/csv/txt format file
- NumPy 2D array(s), pandas DataFrame, H2O DataTable, SciPy sparse matrix
- NumPy 2D array(s), pandas DataFrame, H2O DataTable's Frame, SciPy sparse matrix
- LightGBM binary file
......
......@@ -409,7 +409,7 @@ class _InnerPredictor(object):
Parameters
----------
data : string, numpy array, pandas DataFrame, H2O DataTable or scipy.sparse
data : string, numpy array, pandas DataFrame, H2O DataTable's Frame or scipy.sparse
Data source for prediction.
When data type is string, it represents the path of txt file.
num_iteration : int, optional (default=-1)
......@@ -652,7 +652,7 @@ class Dataset(object):
Parameters
----------
data : string, numpy array, pandas DataFrame, H2O DataTable, scipy.sparse or list of numpy arrays
data : string, numpy array, pandas DataFrame, H2O DataTable's Frame, scipy.sparse or list of numpy arrays
Data source of Dataset.
If string, it represents the path to txt file.
label : list, numpy 1-D array, pandas Series / one-column DataFrame or None, optional (default=None)
......@@ -1009,7 +1009,7 @@ class Dataset(object):
Parameters
----------
data : string, numpy array, pandas DataFrame, H2O DataTable, scipy.sparse or list of numpy arrays
data : string, numpy array, pandas DataFrame, H2O DataTable's Frame, scipy.sparse or list of numpy arrays
Data source of Dataset.
If string, it represents the path to txt file.
label : list, numpy 1-D array, pandas Series / one-column DataFrame or None, optional (default=None)
......@@ -1399,7 +1399,7 @@ class Dataset(object):
Returns
-------
data : string, numpy array, pandas DataFrame, H2O DataTable, scipy.sparse, list of numpy arrays or None
data : string, numpy array, pandas DataFrame, H2O DataTable's Frame, scipy.sparse, list of numpy arrays or None
Raw data used in the Dataset construction.
"""
if self.handle is None:
......@@ -2162,7 +2162,7 @@ class Booster(object):
Parameters
----------
data : string, numpy array, pandas DataFrame, H2O DataTable or scipy.sparse
data : string, numpy array, pandas DataFrame, H2O DataTable's Frame or scipy.sparse
Data source for prediction.
If string, it represents the path to txt file.
num_iteration : int or None, optional (default=None)
......@@ -2207,7 +2207,7 @@ class Booster(object):
Parameters
----------
data : string, numpy array, pandas DataFrame, H2O DataTable or scipy.sparse
data : string, numpy array, pandas DataFrame, H2O DataTable's Frame or scipy.sparse
Data source for refit.
If string, it represents the path to txt file.
label : list, numpy 1-D array or pandas Series / one-column DataFrame
......
......@@ -92,7 +92,11 @@ except ImportError:
"""datatable"""
try:
from datatable import DataTable
import datatable
if hasattr(datatable, "Frame"):
DataTable = datatable.Frame
else:
DataTable = datatable.DataTable
DATATABLE_INSTALLED = True
except ImportError:
DATATABLE_INSTALLED = False
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment