Skip to content

Commit 1821ea5

Browse files
Fixed error of wrong type by removing warning for distinct categoricals (#502)
* Fixed error of wrong type by removing warning for distinct categoricals #501 * Prepare release 5.3.0
1 parent 89ef9d2 commit 1821ea5

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

CHANGES.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
Changelog
33
=========
44

5-
Version 5.3.0 (2021-11-26)
5+
Version 5.3.0 (2021-12-10)
66
==========================
77
* Add Deprecation warnings and migration helpers in order to facilitate the Kartothek version 6.0.0 migration.
8+
* Removed warning for distinct categoricals (#501)
89

910

1011
Version 5.2.0 (2021-11-22)

kartothek/io/dask/_utils.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# -*- coding: utf-8 -*-
22

33

4-
import warnings
54
from functools import partial
65

76
import pandas as pd
@@ -12,8 +11,6 @@
1211
except ImportError:
1312
pass
1413

15-
CATEGORICAL_EFFICIENCY_WARN_LIMIT = 100000
16-
1714

1815
def _identity():
1916
def _id(x):
@@ -49,12 +46,6 @@ def _cast_categorical_to_index_cat(df, categories):
4946
def _construct_categorical(column, dataset_metadata_factory):
5047
dataset_metadata = dataset_metadata_factory.load_index(column)
5148
values = dataset_metadata.indices[column].index_dct.keys()
52-
if len(values) > CATEGORICAL_EFFICIENCY_WARN_LIMIT:
53-
warnings.warn(
54-
"Column {} has {} distinct values, reading as categorical may increase memory consumption.",
55-
column,
56-
len(values),
57-
)
5849
return pd.api.types.CategoricalDtype(values, ordered=False)
5950

6051

0 commit comments

Comments
 (0)