Update data_to_db_2.py

- Table bug corrected
- cleaned a bit the code