Skip to content

Commit d865e0f

Browse files
committed
Implementing suggestions
1 parent e3c66e5 commit d865e0f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

openml/datasets/dataset.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff 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):

0 commit comments

Comments
 (0)