@@ -604,7 +604,7 @@ def _expand_elements(body):
604
604
body [ind ] += empty * (lens_max - length )
605
605
606
606
607
- def _data_to_frame (data , header , index_col , skiprows , infer_types ,
607
+ def _data_to_frame (data , header , index_col , skiprows ,
608
608
parse_dates , tupleize_cols , thousands ):
609
609
head , body , foot = data
610
610
@@ -707,7 +707,7 @@ def _validate_flavor(flavor):
707
707
return flavor
708
708
709
709
710
- def _parse (flavor , io , match , header , index_col , skiprows , infer_types ,
710
+ def _parse (flavor , io , match , header , index_col , skiprows ,
711
711
parse_dates , tupleize_cols , thousands , attrs , encoding ):
712
712
flavor = _validate_flavor (flavor )
713
713
compiled_match = re .compile (match ) # you can pass a compiled regex here
@@ -730,15 +730,20 @@ def _parse(flavor, io, match, header, index_col, skiprows, infer_types,
730
730
ret = []
731
731
for table in tables :
732
732
try :
733
- ret .append (_data_to_frame (table , header , index_col , skiprows ,
734
- infer_types , parse_dates , tupleize_cols , thousands ))
733
+ ret .append (_data_to_frame (data = table ,
734
+ header = header ,
735
+ index_col = index_col ,
736
+ skiprows = skiprows ,
737
+ parse_dates = parse_dates ,
738
+ tupleize_cols = tupleize_cols ,
739
+ thousands = thousands ))
735
740
except StopIteration : # empty table
736
741
continue
737
742
return ret
738
743
739
744
740
745
def read_html (io , match = '.+' , flavor = None , header = None , index_col = None ,
741
- skiprows = None , infer_types = None , attrs = None , parse_dates = False ,
746
+ skiprows = None , attrs = None , parse_dates = False ,
742
747
tupleize_cols = False , thousands = ',' , encoding = None ):
743
748
r"""Read HTML tables into a ``list`` of ``DataFrame`` objects.
744
749
@@ -776,9 +781,6 @@ def read_html(io, match='.+', flavor=None, header=None, index_col=None,
776
781
that sequence. Note that a single element sequence means 'skip the nth
777
782
row' whereas an integer means 'skip n rows'.
778
783
779
- infer_types : None, optional
780
- This has no effect since 0.15.0. It is here for backwards compatibility.
781
-
782
784
attrs : dict or None, optional
783
785
This is a dictionary of attributes that you can pass to use to identify
784
786
the table in the HTML. These are not checked for validity before being
@@ -853,13 +855,11 @@ def read_html(io, match='.+', flavor=None, header=None, index_col=None,
853
855
pandas.read_csv
854
856
"""
855
857
_importers ()
856
- if infer_types is not None :
857
- warnings .warn ("infer_types has no effect since 0.15" , FutureWarning )
858
858
859
859
# Type check here. We don't want to parse only to fail because of an
860
860
# invalid value of an integer skiprows.
861
861
if isinstance (skiprows , numbers .Integral ) and skiprows < 0 :
862
862
raise ValueError ('cannot skip rows starting from the end of the '
863
863
'data (you passed a negative value)' )
864
- return _parse (flavor , io , match , header , index_col , skiprows , infer_types ,
864
+ return _parse (flavor , io , match , header , index_col , skiprows ,
865
865
parse_dates , tupleize_cols , thousands , attrs , encoding )
0 commit comments