Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: fillna upconversion on Frame #3386

Closed
jreback opened this issue Apr 17, 2013 · 1 comment
Closed

BUG: fillna upconversion on Frame #3386

jreback opened this issue Apr 17, 2013 · 1 comment
Labels
Bug Dtype Conversions Unexpected or buggy dtype conversions
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Apr 17, 2013

Thought had fixed this.....but guess not

http://stackoverflow.com/questions/16067144/in-pandas-how-to-use-fillna-to-fill-the-whole-columns-with-string-if-the-column/16067653#16067653

In [2]: csv=u"""a,a,,a
b,b,,b
c,c,,c
"""

In [3]: df = pd.read_csv(StringIO(csv), header=None)

In [4]: df
Out[4]: 
   0  1   2  3
0  a  a NaN  a
1  b  b NaN  b
2  c  c NaN  c

In [5]: df.dtypes
Out[5]: 
0     object
1     object
2    float64
3     object
dtype: object

In [6]: df.fillna({ 2: 'foo' })

ValueError: could not convert string to float: foo

@jreback
Copy link
Contributor Author

jreback commented Aug 16, 2013

closed by #3482

@jreback jreback closed this as completed Aug 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Dtype Conversions Unexpected or buggy dtype conversions
Projects
None yet
Development

No branches or pull requests

1 participant