<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<h1 dir="auto">Your code here</h1>
<p dir="auto">import sqlite3<br>
import pandas as pd<br>
cnx = sqlite3.connect('database.sqlite')<br>
df = pd.read_sql_query("SELECT * FROM Player_Attributes", cnx)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#### Problem description
AttributeError: module 'pandas' has no attribute 'read'

**Note**: We receive a lot of issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates!

**Note**: Many problems can be resolved by simply upgrading `pandas` to the latest version. Before submitting, please check if that solution works for you. If possible, you may want to check if `master` addresses this issue, but that is not necessary.

For documentation-related issues, you can check the latest versions of the docs on `master` here:

https://pandas-docs.github.io/pandas-docs-travis/

If the issue has not been resolved there, go ahead and file it in the issue tracker.

#### Expected Output

#### Output of ``pd.show_versions()``

&lt;details&gt;

[paste the output of ``pd.show_versions()`` here below this line]

&lt;/details&gt;"><pre class="notranslate"><code class="notranslate">#### Problem description
AttributeError: module 'pandas' has no attribute 'read'

**Note**: We receive a lot of issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates!

**Note**: Many problems can be resolved by simply upgrading `pandas` to the latest version. Before submitting, please check if that solution works for you. If possible, you may want to check if `master` addresses this issue, but that is not necessary.

For documentation-related issues, you can check the latest versions of the docs on `master` here:

https://pandas-docs.github.io/pandas-docs-travis/

If the issue has not been resolved there, go ahead and file it in the issue tracker.

#### Expected Output

#### Output of ``pd.show_versions()``

&lt;details&gt;

[paste the output of ``pd.show_versions()`` here below this line]

&lt;/details&gt;
</code></pre></div>
<p dir="auto">Struggled with this for a while to work out why I was getting <code class="notranslate">TypeError: incompatible index of inserted column with frame index</code> when doing df['new_col'] = my_series.</p>
<p dir="auto">Turns out the the series had duplicates in its index. This occured because I was importing a CSV and then setting the index. Perhaps we need a warning when setting an index with duplicate values?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [2]: df = pd.DataFrame({'foo':['a', 'b', 'c'], 'bar':[1,2,3], 'baz':['d','e','f']}).set_index('foo')

In [3]: df
Out[3]:
     bar baz
foo
a      1   d
b      2   e
c      3   f

[3 rows x 2 columns]

In [5]: ser = pd.DataFrame({'foo':['a', 'b', 'c', 'a'], 'fiz':['g','h','i','j']}).set_index('foo')

In [6]: ser
Out[6]:
    fiz
foo
a     g
b     h
c     i
a     j

[4 rows x 1 columns]
In [8]: df['newcol'] = ser
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
&lt;ipython-input-8-a8d535085de2&gt; in &lt;module&gt;()
----&gt; 1 df['newcol'] = ser

C:\WinPython-64bit-2.7.5.2\python-2.7.5.amd64\lib\site-packages\pandas-0.13.1-py2.7-win-amd64.egg\pandas\core\frame.pyc in __setitem__(self, key, value)
   1885         else:
   1886             # set column
-&gt; 1887             self._set_item(key, value)
   1888
   1889     def _setitem_slice(self, key, value):

C:\WinPython-64bit-2.7.5.2\python-2.7.5.amd64\lib\site-packages\pandas-0.13.1-py2.7-win-amd64.egg\pandas\core\frame.pyc in _set_item(self, key, value)
   1965         is_existing = key in self.columns
   1966         self._ensure_valid_index(value)
-&gt; 1967         value = self._sanitize_column(key, value)
   1968         NDFrame._set_item(self, key, value)
   1969

C:\WinPython-64bit-2.7.5.2\python-2.7.5.amd64\lib\site-packages\pandas-0.13.1-py2.7-win-amd64.egg\pandas\core\frame.pyc in _sanitize_column(self, key, value)
   2008                     value = value.reindex(self.index).values
   2009                 except:
-&gt; 2010                     raise TypeError('incompatible index of inserted column '
   2011                                     'with frame index')
   2012

TypeError: incompatible index of inserted column with frame index"><pre class="notranslate"><code class="notranslate">In [2]: df = pd.DataFrame({'foo':['a', 'b', 'c'], 'bar':[1,2,3], 'baz':['d','e','f']}).set_index('foo')

In [3]: df
Out[3]:
     bar baz
foo
a      1   d
b      2   e
c      3   f

[3 rows x 2 columns]

In [5]: ser = pd.DataFrame({'foo':['a', 'b', 'c', 'a'], 'fiz':['g','h','i','j']}).set_index('foo')

In [6]: ser
Out[6]:
    fiz
foo
a     g
b     h
c     i
a     j

[4 rows x 1 columns]
In [8]: df['newcol'] = ser
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
&lt;ipython-input-8-a8d535085de2&gt; in &lt;module&gt;()
----&gt; 1 df['newcol'] = ser

C:\WinPython-64bit-2.7.5.2\python-2.7.5.amd64\lib\site-packages\pandas-0.13.1-py2.7-win-amd64.egg\pandas\core\frame.pyc in __setitem__(self, key, value)
   1885         else:
   1886             # set column
-&gt; 1887             self._set_item(key, value)
   1888
   1889     def _setitem_slice(self, key, value):

C:\WinPython-64bit-2.7.5.2\python-2.7.5.amd64\lib\site-packages\pandas-0.13.1-py2.7-win-amd64.egg\pandas\core\frame.pyc in _set_item(self, key, value)
   1965         is_existing = key in self.columns
   1966         self._ensure_valid_index(value)
-&gt; 1967         value = self._sanitize_column(key, value)
   1968         NDFrame._set_item(self, key, value)
   1969

C:\WinPython-64bit-2.7.5.2\python-2.7.5.amd64\lib\site-packages\pandas-0.13.1-py2.7-win-amd64.egg\pandas\core\frame.pyc in _sanitize_column(self, key, value)
   2008                     value = value.reindex(self.index).values
   2009                 except:
-&gt; 2010                     raise TypeError('incompatible index of inserted column '
   2011                                     'with frame index')
   2012

TypeError: incompatible index of inserted column with frame index
</code></pre></div>