HasMissing() public method

Check to see if there are any missing values on the current row.
public HasMissing ( ) : bool
return bool
        /// <summary>
        /// Analyze the file.
        /// </summary>
        private void AnalyzeFile()
        {
            ScriptProperties prop = _analyst.Script.Properties;

            // get filenames, headers & format
            String sourceID = prop.GetPropertyString(
                ScriptProperties.HeaderDatasourceRawFile);

            FileInfo sourceFile = _analyst.Script.ResolveFilename(sourceID);
            CSVFormat format = _analyst.Script.DetermineFormat();
            bool headers = _analyst.Script.ExpectInputHeaders(sourceID);

            // read the file
            _rowCount = 0;
            _missingCount = 0;

            var csv = new ReadCSV(sourceFile.ToString(), headers, format);
            while (csv.Next())
            {
                _rowCount++;
                if (csv.HasMissing())
                {
                    _missingCount++;
                }
            }
            csv.Close();
        }
Beispiel #2
0
 private void x076efb43809972d8()
 {
     string str;
     FileInfo info;
     CSVFormat format;
     bool flag;
     ScriptProperties properties = this._x554f16462d8d4675.Script.Properties;
     Label_00AD:
     str = properties.GetPropertyString("HEADER:DATASOURCE_rawFile");
     do
     {
         info = this._x554f16462d8d4675.Script.ResolveFilename(str);
         if (((uint) flag) < 0)
         {
             goto Label_00AD;
         }
         format = this._x554f16462d8d4675.Script.DetermineInputFormat(str);
         flag = this._x554f16462d8d4675.Script.ExpectInputHeaders(str);
     }
     while (0 != 0);
     this._x0fe0496cde3d05e3 = 0;
     if (0 == 0)
     {
         this._xed3494f8db69efb7 = 0;
         ReadCSV dcsv = new ReadCSV(info.ToString(), flag, format);
         while (dcsv.Next())
         {
             this._x0fe0496cde3d05e3++;
             if (dcsv.HasMissing())
             {
                 this._xed3494f8db69efb7++;
             }
         }
         dcsv.Close();
         if (((uint) flag) > uint.MaxValue)
         {
             goto Label_00AD;
         }
     }
 }