Skip to content
Prev Previous commit
Remove superfluous if statement
  • Loading branch information
avinashpancham committed Dec 29, 2020
commit ae41d91010c5ab04bc6ca3df48e41da9e17965c5
2 changes: 0 additions & 2 deletions pandas/io/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -1501,7 +1501,6 @@ def to_sql(
else:
dtype = cast(dict, dtype)

if dtype is not None:
from sqlalchemy.types import TypeEngine, to_instance

for col, my_type in dtype.items():
Expand Down Expand Up @@ -1970,7 +1969,6 @@ def to_sql(
else:
dtype = cast(dict, dtype)

if dtype is not None:
for col, my_type in dtype.items():
if not isinstance(my_type, str):
raise ValueError(f"{col} ({my_type}) not a string")
Expand Down