<p dir="auto">Calling pandas.io.sql.read_frame can results in data frame with duplicate column names. For example when SQL query contains joins on tables with duplicate columns.</p>
<p dir="auto">Data frames with duplicate column names cause errors in many pandas functions. I can't even rename columns as df.columns = new_columns generates errors.</p>
<p dir="auto">I think correct behavior would be for pandas.io.sql.read_frame have an option to "deduplicate" column names (for example by adding a number) or generate an error with duplicate column names.</p>
<p dir="auto">tz naive case:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="index = pd.Index([23, 26, 30])
dti = pd.DatetimeIndex(['2015-09-23', '2015-09-26', '2015-09-30'])
ser = pd.Series(dti, index=index).reindex(range(23, 31))
df = pd.DataFrame(ser)

&gt;&gt;&gt; ser    # for reference
23   2015-09-23
24          NaT
25          NaT
26   2015-09-26
27          NaT
28          NaT
29          NaT
30   2015-09-30
dtype: datetime64[ns]

&gt;&gt;&gt; ser.interpolate()
23   2015-09-23
24          NaT
25          NaT
26   2015-09-26
27          NaT
28          NaT
29          NaT
30   2015-09-30
dtype: datetime64[ns]

&gt;&gt;&gt; df.interpolate()
            0
23 2015-09-23
24        NaT
25        NaT
26 2015-09-26
27        NaT
28        NaT
29        NaT
30 2015-09-30"><pre class="notranslate"><code class="notranslate">index = pd.Index([23, 26, 30])
dti = pd.DatetimeIndex(['2015-09-23', '2015-09-26', '2015-09-30'])
ser = pd.Series(dti, index=index).reindex(range(23, 31))
df = pd.DataFrame(ser)

&gt;&gt;&gt; ser    # for reference
23   2015-09-23
24          NaT
25          NaT
26   2015-09-26
27          NaT
28          NaT
29          NaT
30   2015-09-30
dtype: datetime64[ns]

&gt;&gt;&gt; ser.interpolate()
23   2015-09-23
24          NaT
25          NaT
26   2015-09-26
27          NaT
28          NaT
29          NaT
30   2015-09-30
dtype: datetime64[ns]

&gt;&gt;&gt; df.interpolate()
            0
23 2015-09-23
24        NaT
25        NaT
26 2015-09-26
27        NaT
28        NaT
29        NaT
30 2015-09-30
</code></pre></div>
<p dir="auto">tz-aware case</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="index = pd.Index([23, 26, 30])
dti = pd.DatetimeIndex(['2015-09-23', '2015-09-26', '2015-09-30'], tz='US/Central')
ser = pd.Series(dti, index=index).reindex(range(23, 31))
df = pd.DataFrame(ser)

&gt;&gt;&gt; ser
23   2015-09-23 00:00:00-05:00
24                         NaT
25                         NaT
26   2015-09-26 00:00:00-05:00
27                         NaT
28                         NaT
29                         NaT
30   2015-09-30 00:00:00-05:00
dtype: datetime64[ns, US/Central]

&gt;&gt;&gt; ser.interpolate()
23   2015-09-23 00:00:00-05:00
24                         NaT
25                         NaT
26   2015-09-26 00:00:00-05:00
27                         NaT
28                         NaT
29                         NaT
30   2015-09-30 00:00:00-05:00
dtype: datetime64[ns, US/Central]

&gt;&gt;&gt; df.interpolate()
Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/usr/local/lib/python2.7/site-packages/pandas/core/generic.py&quot;, line 4738, in interpolate
    'object') == len(_maybe_transposed_self.T):
  File &quot;/usr/local/lib/python2.7/site-packages/pandas/core/frame.py&quot;, line 1909, in transpose
    return super(DataFrame, self).transpose(1, 0, **kwargs)
  File &quot;/usr/local/lib/python2.7/site-packages/pandas/core/generic.py&quot;, line 599, in transpose
    new_values = self.values.transpose(axes_numbers)
  File &quot;/usr/local/lib/python2.7/site-packages/pandas/core/base.py&quot;, line 696, in transpose
    nv.validate_transpose(args, kwargs)
  File &quot;/usr/local/lib/python2.7/site-packages/pandas/compat/numpy/function.py&quot;, line 54, in __call__
    self.defaults)
  File &quot;/usr/local/lib/python2.7/site-packages/pandas/util/_validators.py&quot;, line 218, in validate_args_and_kwargs
    validate_kwargs(fname, kwargs, compat_args)
  File &quot;/usr/local/lib/python2.7/site-packages/pandas/util/_validators.py&quot;, line 157, in validate_kwargs
    _check_for_default_values(fname, kwds, compat_args)
  File &quot;/usr/local/lib/python2.7/site-packages/pandas/util/_validators.py&quot;, line 69, in _check_for_default_values
    format(fname=fname, arg=key)))
ValueError: the 'axes' parameter is not supported in the pandas implementation of transpose()"><pre class="notranslate"><code class="notranslate">index = pd.Index([23, 26, 30])
dti = pd.DatetimeIndex(['2015-09-23', '2015-09-26', '2015-09-30'], tz='US/Central')
ser = pd.Series(dti, index=index).reindex(range(23, 31))
df = pd.DataFrame(ser)

&gt;&gt;&gt; ser
23   2015-09-23 00:00:00-05:00
24                         NaT
25                         NaT
26   2015-09-26 00:00:00-05:00
27                         NaT
28                         NaT
29                         NaT
30   2015-09-30 00:00:00-05:00
dtype: datetime64[ns, US/Central]

&gt;&gt;&gt; ser.interpolate()
23   2015-09-23 00:00:00-05:00
24                         NaT
25                         NaT
26   2015-09-26 00:00:00-05:00
27                         NaT
28                         NaT
29                         NaT
30   2015-09-30 00:00:00-05:00
dtype: datetime64[ns, US/Central]

&gt;&gt;&gt; df.interpolate()
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "/usr/local/lib/python2.7/site-packages/pandas/core/generic.py", line 4738, in interpolate
    'object') == len(_maybe_transposed_self.T):
  File "/usr/local/lib/python2.7/site-packages/pandas/core/frame.py", line 1909, in transpose
    return super(DataFrame, self).transpose(1, 0, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/pandas/core/generic.py", line 599, in transpose
    new_values = self.values.transpose(axes_numbers)
  File "/usr/local/lib/python2.7/site-packages/pandas/core/base.py", line 696, in transpose
    nv.validate_transpose(args, kwargs)
  File "/usr/local/lib/python2.7/site-packages/pandas/compat/numpy/function.py", line 54, in __call__
    self.defaults)
  File "/usr/local/lib/python2.7/site-packages/pandas/util/_validators.py", line 218, in validate_args_and_kwargs
    validate_kwargs(fname, kwargs, compat_args)
  File "/usr/local/lib/python2.7/site-packages/pandas/util/_validators.py", line 157, in validate_kwargs
    _check_for_default_values(fname, kwds, compat_args)
  File "/usr/local/lib/python2.7/site-packages/pandas/util/_validators.py", line 69, in _check_for_default_values
    format(fname=fname, arg=key)))
ValueError: the 'axes' parameter is not supported in the pandas implementation of transpose()
</code></pre></div>
<p dir="auto">The ValueError for the DataFrame case is in issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="287989505" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/19198" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/19198/hovercard" href="https://github.com/pandas-dev/pandas/issues/19198">#19198</a>.</p>