Convert an Object dtype column to Number Dtype in a datafrane Pandas
<p>Trying to answer this question <a href="https://stackoverflow.com/questions/39647978/get-list-of-unique-string-values-per-column-in-a-dataframe-using-python">Get List of Unique String per Column</a> we ran into a different problem from my dataset. When I import this CSV file to the dataframe every column is OBJECT type, we need to convert the columns that are just number to real (number) dtype and those that are not number to String dtype.</p>

<p>Is there a way to achieve this?</p>

<p><a href="https://www.dropbox.com/s/thtxso04c1y13xl/HistorianDataSample.zip?dl=0" rel="nofollow noreferrer">Download the data sample from here</a></p>

<p>I have tried following code from following article <a href="https://stackoverflow.com/questions/15891038/pandas-change-data-type-of-columns">Pandas: change data type of columns</a> but did not work.</p>

<pre><code>df = pd.DataFrame(a, columns=['col1','col2','col3'])
</code></pre>

<p>As always thanks for your help</p>