I have a big Pandas data frame with many columns, say, 25. Now I need to create a table in the SQL Server database to store the content of the data frame. How to avoid manually describing each column parameters in the CREATE TABLE
command? Is there any solution that uses the data frame columns as a template? Maybe is there some way to run pandas.to_sql
, but without subsequent insertion of rows?
I don't want to insert the rows into the table using pandas.to_sql
, because I have too many rows, and this command does not work. I have to export into csv and then use the bcp
utility.