Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11274 for trunk


Ignore:
Timestamp:
08/06/14 13:28:19 (10 years ago)
Author:
mkommend
Message:

#2224: Inserted string represenation (ToString) of non string data into string columns and increased the interval for column datatype detection from 10 to 100 in the TableFileParser.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/TableFileParser.cs

    r11171 r11274  
    169169      //create columns
    170170      for (int col = 0; col < columns; col++) {
    171         var types = rowValues.Select(r => r[col]).Where(v => v != null && v as string != string.Empty).Take(10).Select(v => v.GetType());
     171        var types = rowValues.Select(r => r[col]).Where(v => v != null && v as string != string.Empty).Take(100).Select(v => v.GetType());
    172172        if (!types.Any()) {
    173173          values.Add(new List<string>());
     
    193193            values[columnIndex].Add(DateTime.MinValue);
    194194          else if (values[columnIndex] is List<string> && !(element is string))
    195             values[columnIndex].Add(string.Empty);
     195            values[columnIndex].Add(element.ToString());
    196196          else
    197197            values[columnIndex].Add(element);
Note: See TracChangeset for help on using the changeset viewer.