Fix for detecting metadata column types in tabular files, the number of lines read for detecting column types will always be the max setting, with previously detected column types being overridden if appropriate ( e.g., int overridden with float ). This will only occur in files whose data varies between types within the same column.

This commit is contained in:
Greg Von Kuster
2009-06-18 12:10:36 -04:00
parent f4c3f227fc
commit d951b554cf
+2 -2
View File
@@ -121,8 +121,8 @@ class Tabular( data.Text ):
#"column_types": ["int", "int", "str", "list"]
first_line_column_types = column_types
column_types = [ None for col in first_line_column_types ]
elif ( column_types and None not in column_types ) or i > num_check_lines:
#found and set all known columns, or we exceeded our max check lines
elif i > num_check_lines:
# We exceeded our max check lines
break
#we error on the larger number of columns