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

PEP8: fix sql.py and test_sql.py #12263

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pandas/io/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from pandas.core.base import PandasObject
from pandas.core.dtypes import DatetimeTZDtype
from pandas.tseries.tools import to_datetime
from pandas.util.decorators import Appender

from contextlib import contextmanager

Expand Down
6 changes: 3 additions & 3 deletions pandas/io/tests/test_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -2324,7 +2324,7 @@ def _check_roundtrip(self, frame):
frame2['Idx'] = Index(lrange(len(frame2))) + 10
sql.to_sql(frame2, name='test_table2', con=self.conn, index=False)
result = sql.read_sql("select * from test_table2", self.conn,
index_col='Idx')
index_col='Idx')
expected = frame.copy()
expected.index = Index(lrange(len(frame2))) + 10
expected.index.name = 'Idx'
Expand Down Expand Up @@ -2672,7 +2672,7 @@ def _check_roundtrip(self, frame):
sql.to_sql(frame2, name='test_table2',
con=self.conn, flavor='mysql', index=False)
result = sql.read_sql("select * from test_table2", self.conn,
index_col='Idx')
index_col='Idx')
expected = frame.copy()

# HACK! Change this once indexes are handled properly.
Expand Down Expand Up @@ -2738,7 +2738,7 @@ def test_keyword_as_column_names(self):
_skip_if_no_pymysql()
df = DataFrame({'From': np.ones(5)})
sql.to_sql(df, con=self.conn, name='testkeywords',
if_exists='replace', flavor='mysql', index=False)
if_exists='replace', flavor='mysql', index=False)

def test_if_exists(self):
_skip_if_no_pymysql()
Expand Down