ENH: dtype costumization on to_sql (GH8778)

This is the proposed general gist of the changes. My ad-hoc testing suggests that this might work. If this is an acceptible design, I will proceed to make the formal test and change the docs (including docstrings)

Closes #8778
I was in auto-mode looking for this on my patch. This was completely
unintended. Sorry. Will correct.

On 2 December 2014 at 09:06, Joris Van den Bossche <notifications@github.com
> wrote:

> In pandas/io/sql.py:
>
> > @@ -857,7 +860,7 @@ def _harmonize_columns(self, parse_dates=None):
> >                  col_type = self._numpy_type(sql_col.type)
> >
> >                  if col_type is datetime or col_type is date:
> > -                    if not issubclass(df_col.dtype.type, np.datetime64):
> > +                    if not isinstance(df_col.dtype.type, np.datetime64):
>
> Is there a reason for this change? (because if so, better to do in a
> separate commit + a test for the case this change was needed)
>
> --
> Reply to this email directly or view it on GitHub
> <https://github.com/pydata/pandas/pull/8926/files#r21146521>.
>



-- 
*Homo homini lupus est (Plautus)*