Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: unpin pymysql, sync min version, and skip failing test #40696

Merged
merged 14 commits into from
Apr 9, 2021

Conversation

fangchenli
Copy link
Member

@fangchenli fangchenli commented Mar 30, 2021

xref #36465

@fangchenli fangchenli added the IO SQL to_sql, read_sql, read_sql_query label Mar 30, 2021
@jreback jreback added this to the 1.3 milestone Mar 30, 2021
@jreback
Copy link
Contributor

jreback commented Mar 30, 2021

thanks @fangchenli

@jreback
Copy link
Contributor

jreback commented Mar 31, 2021

hmm

FAILED pandas/tests/io/test_sql.py::TestMySQLAlchemy::test_to_sql_with_negative_npinf[load_iris_data0-input2]
FAILED pandas/tests/io/test_sql.py::TestMySQLAlchemyConn::test_to_sql_with_negative_npinf[load_iris_data0-input2]

on the database build

@fangchenli
Copy link
Member Author

When one column is infe0, df that contains np.nan actually could be converted to SQL table. That's why we don't catch any error.

import pandas
import numpy

from sqlalchemy import create_engine

engine = create_engine('mysql+pymysql://root:@localhost/foobar')

table = "foobar"
pandas.DataFrame({'foo': [-numpy.inf, 3], 'infe0': ['bar', 3]}).to_sql(table, engine, index=False)
import pandas.io.sql as sql
res = sql.read_sql_table(table, engine)
print(res)
   foo infe0
0  NaN   bar
1  3.0     3

But that column name must be infe0. I'm not sure why it's special.

@fangchenli fangchenli changed the title CI: unpin pymysql CI: unpin pymysql, sync min version, and skip failing test Mar 31, 2021
pandas/tests/io/test_sql.py Outdated Show resolved Hide resolved
@jreback jreback merged commit 29b7b61 into pandas-dev:master Apr 9, 2021
@jreback
Copy link
Contributor

jreback commented Apr 9, 2021

thanks @fangchenli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO SQL to_sql, read_sql, read_sql_query
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants