Skip to content

Commit c74597a

Browse files
committed
fix bug
1 parent 0fde7c8 commit c74597a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/tools/datetimes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ def should_cache(arg, unique_share=0.7, check_count=None):
7777
else:
7878
assert 0 <= check_count <= len(arg), \
7979
'check_count must be in next bounds: [0; len(arg)]'
80-
assert 0 < unique_share < 1, \
81-
'unique_share must be in next bounds: (0; 1)'
8280
if check_count == 0:
8381
return False
8482

83+
assert 0 < unique_share < 1, 'unique_share must be in next bounds: (0; 1)'
84+
8585
unique_elements = unique(arg[:check_count])
8686
if len(unique_elements) > check_count * unique_share:
8787
do_caching = False

0 commit comments

Comments
 (0)