<p dir="auto"><em>/usr/local/lib/python3.5/dist-packages/IPython/core/interactiveshell.py:2728: DtypeWarning: Columns (17) have mixed types. Specify dtype option on import or set low_memory=False.<br>
interactivity=interactivity, compiler=compiler, result=result</em>)</p>
<h4 dir="auto">Problem description</h4>
<p dir="auto">I'm getting a mixed data type warning in a column. The column number is shown as 17. However it isn't clear if the error is in 18 th column considering the column index starts at 0 or 17th column by general counting.</p>
<p dir="auto">It would be better and easier if the column name also shows up in the warning message to avoid ambiguity and confusion.</p>
<p dir="auto">Thanks,<br>
Arun</p>
<p dir="auto">The output columns from <code class="notranslate">get_dummies()</code> are binary by nature, changing this default from float64 to int8 would save 7 bytes per dummy.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="df=pd.DataFrame({ 'x':[1,2,3] })
pd.get_dummies(df.x)"><pre class="notranslate"><code class="notranslate">df=pd.DataFrame({ 'x':[1,2,3] })
pd.get_dummies(df.x)
</code></pre></div>