This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # dependencies = ["numpy"] | |
| # /// | |
| """ | |
| Goal: | |
| Compare performance of two strategies to check if a string | |
| can be converted to a float: | |
| 1) using try/except around float() | |
| 2) using a regular expression to match float shape |