You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default NaN recognized values are ['-1.#IND', '1.#QNAN', '1.#IND', '-1.#QNAN', '#N/A','N/A', 'NA', '#NA', 'NULL', 'NaN', '-NaN', 'nan', '-nan'].
However, this list is not complete.
If it was, these two pieces of code should produce the same result
The actual default values:
import pandas as pd
from StringIO import StringIO
sio = StringIO()
sio.write('"foo","bar"\n"1",""\n"NA","4"')
sio.seek(0)
pd.read_csv(sio, sep=",", quotechar='"')
foo bar
0 1 NaN
1 NaN 4
I would just update the docs slightly (and not put it in the list, but just say that it treates 0-len strings as missing as well). As these are not tokens that are nan-converted, but a missing token (between the delimeter), and that's why its not directly in the list.
Recreating my original post from here: http://stackoverflow.com/questions/26659941/what-are-the-default-na-values-when-pandas-loads-data/31705571#31705571
This documentation http://pandas.pydata.org/pandas-docs/stable/io.html#na-values states:
However, this list is not complete.
If it was, these two pieces of code should produce the same result
The actual default values:
The default values copied and given:
Pandas version:
The text was updated successfully, but these errors were encountered: