File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -368,17 +368,19 @@ def decode_arff(fh):
368368 def _convert_array_format (data , array_format , attribute_names ):
369369 """Convert a dataset to a given array format.
370370
371+ Converts a non-sparse matrix to numpy array.
372+ Converts a sparse matrix to a sparse dataframe.
373+
371374 Parameters
372375 ----------
373- array_format : str
374- Tag to attach to the dataset to get a pandas SparseDataFrame or a
375- NumPy array instead.
376+ array_format : str {'array', 'dataframe'}
377+ Desired data type of the output
376378 - If array_format='array'
377379 Converts non-sparse numeric data to numpy-array
378380 Enforces numeric encoding of categorical columns
379- Missing values are represented as NaN in the dataframe
381+ Missing values are represented as NaN in the numpy-array
380382 - If array_format='dataframe'
381- Convers sparse data to sparse dataframe
383+ Converts sparse data to sparse dataframe
382384
383385 """
384386 if array_format == "array" and not scipy .sparse .issparse (data ):
You can’t perform that action at this time.
0 commit comments