@@ -458,7 +458,7 @@ def _try_convert_data(self, name, data, use_dtypes=True,
458458 try :
459459 dtype = np .dtype (dtype )
460460 return data .astype (dtype ), True
461- except :
461+ except Exception :
462462 return data , False
463463
464464 if convert_dates :
@@ -474,7 +474,7 @@ def _try_convert_data(self, name, data, use_dtypes=True,
474474 try :
475475 data = data .astype ('float64' )
476476 result = True
477- except :
477+ except Exception :
478478 pass
479479
480480 if data .dtype .kind == 'f' :
@@ -485,7 +485,7 @@ def _try_convert_data(self, name, data, use_dtypes=True,
485485 try :
486486 data = data .astype ('float64' )
487487 result = True
488- except :
488+ except Exception :
489489 pass
490490
491491 # do't coerce 0-len data
@@ -497,7 +497,7 @@ def _try_convert_data(self, name, data, use_dtypes=True,
497497 if (new_data == data ).all ():
498498 data = new_data
499499 result = True
500- except :
500+ except Exception :
501501 pass
502502
503503 # coerce ints to 64
@@ -507,7 +507,7 @@ def _try_convert_data(self, name, data, use_dtypes=True,
507507 try :
508508 data = data .astype ('int64' )
509509 result = True
510- except :
510+ except Exception :
511511 pass
512512
513513 return data , result
@@ -526,7 +526,7 @@ def _try_convert_to_date(self, data):
526526 if new_data .dtype == 'object' :
527527 try :
528528 new_data = data .astype ('int64' )
529- except :
529+ except Exception :
530530 pass
531531
532532 # ignore numbers that are out of range
@@ -543,7 +543,7 @@ def _try_convert_to_date(self, data):
543543 unit = date_unit )
544544 except ValueError :
545545 continue
546- except :
546+ except Exception :
547547 break
548548 return new_data , True
549549 return data , False
@@ -649,12 +649,9 @@ def _parse_no_numpy(self):
649649 self .obj = DataFrame (
650650 loads (json , precise_float = self .precise_float ), dtype = None )
651651
652- def _process_converter (self , f , filt = None ):
652+ def _process_converter (self , f , filt = lambda col , c : True ):
653653 """ take a conversion function and possibly recreate the frame """
654654
655- if filt is None :
656- filt = lambda col , c : True
657-
658655 needs_new_obj = False
659656 new_obj = dict ()
660657 for i , (col , c ) in enumerate (self .obj .iteritems ()):
0 commit comments