<p dir="auto">Here is the text data I would like to read as a data frame:</p>
<p dir="auto">data3="Date Open High Low Close Volume\nMay 16, 2014 2.92 2.93 2.82 2.85 25,715,748\nMay 15, 2014 3.02 3.05 2.88 2.92 28,311,224\nAug 8, 2013 1.97 1.98 1.94 1.95 20,100,154\nAug 7, 2013 1.89 1.97 1.87 1.95 29,206,564\nAug 6, 2013 1.95 2.01 1.88 1.90 52,198,842\nAug 5, 2013 1.88 1.94 1.88 1.92 29,041,924\nAug 2, 2013 1.86 1.88 1.83 1.86 22,169,076"</p>
<p dir="auto">It's from an Html table of 6 columns: Date Open High Low Close Volume.</p>
<p dir="auto">When I use wether the wether read_csv or read_table, I have a weird output.<br>
Here is my script:</p>
<p dir="auto">in [0] :<br>
import StringIO as s<br>
import pandas as pd</p>
<p dir="auto">data3="Date Open High Low Close Volume\nMay 16, 2014 2.92 2.93 2.82 2.85 25,715,748\nMay 15, 2014 3.02 3.05 2.88 2.92 28,311,224\nAug 8, 2013 1.97 1.98 1.94 1.95 20,100,154\nAug 7, 2013 1.89 1.97 1.87 1.95 29,206,564\nAug 6, 2013 1.95 2.01 1.88 1.90 52,198,842\nAug 5, 2013 1.88 1.94 1.88 1.92 29,041,924\nAug 2, 2013 1.86 1.88 1.83 1.86 22,169,076"</p>
<p dir="auto">pd.read_table(s.StringIO(data3),<br>
header=0,<br>
thousands=',',<br>
sep=" ",<br>
parse_dates=False)</p>
<p dir="auto">out[0] :<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5865600/3008327/a4535af4-deb8-11e3-931f-8c1ec97c41e5.png"><img src="https://cloud.githubusercontent.com/assets/5865600/3008327/a4535af4-deb8-11e3-931f-8c1ec97c41e5.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">And I would like to have:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5865600/3008341/ec649ad8-deb8-11e3-9207-02e3051cc9d8.png"><img src="https://cloud.githubusercontent.com/assets/5865600/3008341/ec649ad8-deb8-11e3-9207-02e3051cc9d8.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">And if I set the parameter parse_dates to TRUE, I got this:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5865600/3008347/148e7876-deb9-11e3-9997-b0dd99239276.png"><img src="https://cloud.githubusercontent.com/assets/5865600/3008347/148e7876-deb9-11e3-9997-b0dd99239276.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Even weirder !!</p>
<p dir="auto">Im not sure if it is a bug or I did something wrong but if someone can give us a clue.....it would be welcome.</p>
<p dir="auto">Thanks</p>
<p dir="auto">Rgds,</p>
<p dir="auto">Mickael</p>
<p dir="auto">Input:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import pandas as pd

values = ['11', '23', '45', '98']
noindex = pd.Series(data=values, index=None)
yesindex = pd.Series(data=values, index=list('abcd'))

extractno = noindex.str.extract('(\d)')
print extractno

extractyes = yesindex.str.extract('(\d)')
print extractyes"><pre class="notranslate"><code class="notranslate">import pandas as pd

values = ['11', '23', '45', '98']
noindex = pd.Series(data=values, index=None)
yesindex = pd.Series(data=values, index=list('abcd'))

extractno = noindex.str.extract('(\d)')
print extractno

extractyes = yesindex.str.extract('(\d)')
print extractyes
</code></pre></div>
<p dir="auto">Output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="0    1
1    2
2    4
3    9
dtype: object
a    NaN
b    NaN
c    NaN
d    NaN
dtype: object"><pre class="notranslate"><code class="notranslate">0    1
1    2
2    4
3    9
dtype: object
a    NaN
b    NaN
c    NaN
d    NaN
dtype: object
</code></pre></div>