This is a Python 3 script that converts database columns from varchar to float. Triying agressively to cast the column data. Originally intended for MS SQL Server, but it can work with any database, you will have to change the column type manually, or adapt the Stored Procedure provided here.
- pyodbc
- msSQLBridge (pyodbc bridge class provided here)
- Install pyodbc ($ pip install pyodbc)
- Clone the repo
- First insert the Stored Procedure into database
- Check/modify example file provided here
- Run the script
- Done!
- StackOverflow ;)