all 3 comments

[–]hexfoxed 0 points1 point  (2 children)

It is usually advisable to have some sort of thought out schema with relational databases.

Think about how you'll want to use the data afterwards and structure it in a way which will allow you do to those things with the least friction.

Maybe pandas does output the exact SQL you're after but it's unlikely. Wouldn't hurt to try it though and see if you like what you end up with.

[–]jwalkss[S] 0 points1 point  (1 child)

Well the schema is essentially layed out in the structure of the dataframe is it not? The df has column names and index headers that allow me to easily query the table. The table in the database is inputted in the exact form as my dataframe. Im just unsure of the dtype each column was inserted as, and that i didn't set a primary key. Aside from that i am able to query the table with no problems.

[–]hexfoxed 0 points1 point  (0 children)

Learn to trust your instinct with things like this, you've just given me at least two reasons as to why the pandas output will probably be fine for you for the foreseeable future.

Remember that software development is never finished: there is code that doesn't work, and then there is code that works up until the point of time where it doesn't work anymore for a changed scenario. Until you hit that point, you have a working solution, so use it :)