File tree 1 file changed +3
-13
lines changed
1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -508,24 +508,14 @@ def get_sheet_by_index(self, index: int):
508
508
509
509
def _convert_cell (self , cell , convert_float : bool ) -> Scalar :
510
510
511
- from openpyxl .cell .cell import TYPE_BOOL , TYPE_ERROR , TYPE_NUMERIC
511
+ from openpyxl .cell .cell import TYPE_ERROR , TYPE_NUMERIC
512
512
513
513
if cell .value is None :
514
514
return "" # compat with xlrd
515
- elif cell .is_date :
516
- return cell .value
517
515
elif cell .data_type == TYPE_ERROR :
518
516
return np .nan
519
- elif cell .data_type == TYPE_BOOL :
520
- return bool (cell .value )
521
- elif cell .data_type == TYPE_NUMERIC :
522
- # GH5394
523
- if convert_float :
524
- val = int (cell .value )
525
- if val == cell .value :
526
- return val
527
- else :
528
- return float (cell .value )
517
+ elif not convert_float and cell .data_type == TYPE_NUMERIC :
518
+ return float (cell .value )
529
519
530
520
return cell .value
531
521
You can’t perform that action at this time.
0 commit comments