Data cleaning: Difference between revisions
Jump to navigation
Jump to search
→Check if the column value is numeric
Tags: Mobile edit Mobile web edit |
Tags: Mobile edit Mobile web edit |
||
| Line 293: | Line 293: | ||
PHP: | PHP: | ||
* [http://php.net/manual/en/function.is-numeric.php is_numeric] | * [http://php.net/manual/en/function.is-numeric.php is_numeric] function | ||
* [https://www.php.net/manual/en/function.is-int.php is_int] function | |||
| Line 305: | Line 305: | ||
** Return 1 if the cell value is (1) Numbers (2) Numbers that are stored as text e.g. {{code | code = <nowiki>="5"</nowiki>}} | ** Return 1 if the cell value is (1) Numbers (2) Numbers that are stored as text e.g. {{code | code = <nowiki>="5"</nowiki>}} | ||
** Return 0 if the cell value is (1) Text (2) Numbers in scientific (exponential) notation e.g. {{code | code = <nowiki>1.23E+16</nowiki>}} (3) Decimal numbers e.g. {{code | code = <nowiki>3.141592654</nowiki>}} (4) Negative numbers | ** Return 0 if the cell value is (1) Text (2) Numbers in scientific (exponential) notation e.g. {{code | code = <nowiki>1.23E+16</nowiki>}} (3) Decimal numbers e.g. {{code | code = <nowiki>3.141592654</nowiki>}} (4) Negative numbers | ||
=== Time data: Validate the data format === | === Time data: Validate the data format === | ||