Regarding Data type consideration

41 views
Skip to first unread message

Mohan Raj

unread,
Aug 18, 2019, 5:24:09 AM8/18/19
to sqlalchemy
Hi,

I used "sqlalchemy" in my python code for inserting a Dataframe from Pandas(0.25.0) to Microsoft SQL Server 2014.

While inserting the data, all the columns are considered as varchar type, instead there are integer values in the column. I need to consider the data type based on second row of Dataframe instead of first row.

Help me to resolve the above mentioned query.

Regards

Mike Bayer

unread,
Aug 18, 2019, 10:55:59 AM8/18/19
to noreply-spamdigest via sqlalchemy
I've reached out on Twitter to see if I can attract more Pandas users to this list as this is a pandas-specific issue for which I don't have the expertise to answer.
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
 
 
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+...@googlegroups.com.

waleed saud

unread,
Aug 18, 2019, 11:42:10 AM8/18/19
to sqlalchemy
I think Mohan means the header row like CSV  which indicate the column name and when he say the second row he means the the row that the real data start which is the second row .

correct me here Mohan if I am wrong ?


بتاريخ الأحد، 18 أغسطس، 2019 5:55:59 م UTC+3، كتب Mike Bayer:
I've reached out on Twitter to see if I can attract more Pandas users to this list as this is a pandas-specific issue for which I don't have the expertise to answer.


On Sun, Aug 18, 2019, at 5:24 AM, Mohan Raj wrote:
Hi,

I used "sqlalchemy" in my python code for inserting a Dataframe from Pandas(0.25.0) to Microsoft SQL Server 2014.

While inserting the data, all the columns are considered as varchar type, instead there are integer values in the column. I need to consider the data type based on second row of Dataframe instead of first row.

Help me to resolve the above mentioned query.

Regards


--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
 
 
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlal...@googlegroups.com.

Andrew Martin

unread,
Aug 18, 2019, 2:18:36 PM8/18/19
to sqlalchemy
Hi Mohan,

Could you give us some more information about the structure of your Dataframe and how you are using SqlAlchemy?
Reply all
Reply to author
Forward
0 new messages