File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change 2
2
Changelog
3
3
=========
4
4
5
- Version 5.3.0 (2021-11-26 )
5
+ Version 5.3.0 (2021-12-10 )
6
6
==========================
7
7
* Add Deprecation warnings and migration helpers in order to facilitate the Kartothek version 6.0.0 migration.
8
+ * Removed warning for distinct categoricals (#501)
8
9
9
10
10
11
Version 5.2.0 (2021-11-22)
Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
2
3
3
4
- import warnings
5
4
from functools import partial
6
5
7
6
import pandas as pd
12
11
except ImportError :
13
12
pass
14
13
15
- CATEGORICAL_EFFICIENCY_WARN_LIMIT = 100000
16
-
17
14
18
15
def _identity ():
19
16
def _id (x ):
@@ -49,12 +46,6 @@ def _cast_categorical_to_index_cat(df, categories):
49
46
def _construct_categorical (column , dataset_metadata_factory ):
50
47
dataset_metadata = dataset_metadata_factory .load_index (column )
51
48
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
- )
58
49
return pd .api .types .CategoricalDtype (values , ordered = False )
59
50
60
51
You can’t perform that action at this time.
0 commit comments