If True, returns (data,target) instead of a Bunch object.
See below for more information about the data and target objects.
as_frame : bool, default=False
If True, the data is a pandas DataFrame including columns with
appropriate dtypes (numeric). The target is
a pandas DataFrame or Series depending on the number of target columns.
If return_X_y is True, then (data, target) will be pandas
DataFrames or Series as described below.
Post pruning decision trees with cost complexity pruning
:
The names of the dataset columns.
target_names : ndarray of shape (2,)
The names of target classes.
frame : DataFrame of shape (569, 31)
Only present when as_frame=True. DataFrame with data and
target.
DESCR : str
The full description of the dataset.
filename : str
The path to the location of the data.
(data, target) : tuple if return_X_y is True
A tuple of two ndarrays. The first contains a 2D ndarray of
shape (569, 30) with each row representing one sample and the columns
representing the features. The second ndarray of shape (569,) contains
the target samples. If as_frame=True, both arrays are pandas objects,
i.e. X a dataframe and y a series.