Closed
Description
Pandas stores strings (str and unicode) with dtype=object. As such, some unexpected things happen, like empty fields being filled with nan, which is a float. Expected behavior should fill with empty string "" or at least None.
>>> import pandas as pd
>>> from StringIO import StringIO
>>> pd.read_csv(StringIO('col1,col2,col3\nfoo,,bar'),dtype=str)
col1 col2 col3
0 foo NaN bar
>>> type(pd.read_csv(StringIO('col1,col2,col3\nfoo,,bar'),dtype=str).iloc[0,1])
float