Large datasets into Postresql. Revisit Python code