-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
BugDtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsIO DataIO issues that don't fit into a more specific labelIO issues that don't fit into a more specific labelIO SQLto_sql, read_sql, read_sql_queryto_sql, read_sql, read_sql_query
Milestone
Description
UPDATE from @jorisvandenbossche:
Overview of current status writing nan values (see also tests added in #7100):
- For MySQL using pymysql/MySQLdb nothing works: you get message
Unknown column 'nan' in 'field list'
(see also eg http://stackoverflow.com/questions/23353732/python-pandas-write-to-sql-with-nan-values) - Numeric columns:
- working for sqlite and postgres
- Only full NaN columns stay
None
in sqlite
- Object columns (eg strings)
- for postgresql: NaN is converted to the string
u'NaN'
, which is not really what we want - for sqlite it is returned as
None
- for postgresql: NaN is converted to the string
NaT
:- postgresql: gives error on inserting "0001-255-255T00:00:00"
- sqlite3: writing works, but reading it with query returns
'-001--1--1 -1:-1:-1.-00001'
- MSSQL: not working with message "The supplied value is not a valid instance of data type float", see Write Null values to mssql table #8088 for more details
not sure exactly what sql expects (Nones?) rather than np.nan (or NaT)
https://groups.google.com/forum/?fromgroups#!topic/pydata/lxhnFtuzvWQ
also provide pandas datetime64[ns]
, instead of datetime/date
types
#3532
Metadata
Metadata
Assignees
Labels
BugDtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsIO DataIO issues that don't fit into a more specific labelIO issues that don't fit into a more specific labelIO SQLto_sql, read_sql, read_sql_queryto_sql, read_sql, read_sql_query