Skip to content

Commit 80e5b33

Browse files
authored
pass skipna=False explicitly
pass skipna=False explicitly to avoids pandas FutureWarning: " A future version of pandas will default to `skipna=True`. To silence this warning, pass `skipna=True|False` explicitly."
1 parent 8efcf9d commit 80e5b33

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

openml/datasets/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ def attributes_arff_from_df(df):
504504
for column_name in df:
505505
# skipna=True does not infer properly the dtype. The NA values are
506506
# dropped before the inference instead.
507-
column_dtype = pd.api.types.infer_dtype(df[column_name].dropna())
507+
column_dtype = pd.api.types.infer_dtype(df[column_name].dropna(), skipna=False)
508508

509509
if column_dtype == 'categorical':
510510
# for categorical feature, arff expects a list string. However, a

0 commit comments

Comments
 (0)