I'm wondering if I could use pandas to guess what the type of each column is. For example, if I have the following string passsed to pandas:
("store_location_1", 1.23, 1, 2015-02-02)
Is there any way pandas could guess that the types for the columns are VARCHAR, FLOAT, INTEGER, and DATETIME, respectively?
My end goal is to use pandas to correctly create a schema given a CSV header. The example string above could be the first data row in a large CSV file that I need to import into a PostgreSQL database. But in order to do this, I have to create a table first, and hence, I'd need a table schema first.
Thank you for your suggestions!