static/js/rule.js
/**
 * Check if a string represents a missing value.
 * @function isMissing
 * @param {string} str - string to check
 * @returns {boolean} check result
 * @description This is only a subset of Pandas default missing values.
 * @see {@link https://pandas.pydata.org/docs/reference/api/
 * pandas.read_table.html}
 */
Check if a string represents a missing value.
@function isMissing
@param {string} str - string to check
@returns {boolean} check result
@description This is only a subset of Pandas default missing values.
Check if a string represents a missing value . @function isMissing @param { string } str - string to check @returns { boolean } check result @description This is only a subset of Pandas default missing values .
function isMissing(str) {
  const nulls = ['na', 'n/a', 'nan', 'null', ''];
  try {
    str = str.replace(/^[#-]+/, '');
  } catch (e) {
    throw new Error(e.message + ' ' + str);
  }
  return nulls.includes(str.toLowerCase());
}
function isMissing ( str ) { const nulls = [ 'na' , 'n/a' , 'nan' , 'null' , '' ] ; try { str = str . replace ( / ^[#-]+ / , '' ) ; } catch ( e ) { throw new Error ( e . message + ' ' + str ) ; } return nulls . includes ( str . toLowerCase ( ) ) ; }
Check if a string represents a missing value.
Check if a string represents a missing value .