File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -2329,22 +2329,21 @@ cdef inline object convert_to_unicode(object item,
2329
2329
2330
2330
Returns
2331
2331
-------
2332
- str
2332
+ str or int or float
2333
2333
"""
2334
2334
cdef:
2335
- bint do_convert = 1
2336
2335
float64_t float_item
2337
2336
2338
2337
if keep_trivial_numbers:
2339
2338
if isinstance (item, int ):
2340
2339
if < int > item == 0 :
2341
- do_convert = 0
2340
+ return item
2342
2341
elif isinstance (item, float ):
2343
2342
float_item = item
2344
2343
if float_item == 0.0 or float_item != float_item:
2345
- do_convert = 0
2344
+ return item
2346
2345
2347
- if do_convert and not isinstance (item, str ):
2346
+ if not isinstance (item, str ):
2348
2347
item = PyObject_Str(item)
2349
2348
2350
2349
return item
@@ -2388,7 +2387,6 @@ def _concat_date_cols(tuple date_cols, bint keep_trivial_numbers=True):
2388
2387
if col_count == 0 :
2389
2388
return np.zeros(0 , dtype = object )
2390
2389
2391
-
2392
2390
if not all (util.is_array(array) for array in date_cols):
2393
2391
raise ValueError (" not all elements from date_cols are numpy arrays" )
2394
2392
You can’t perform that action at this time.
0 commit comments