Skip to content

BUG: SEGFAULT when assigning nan via iloc #6056

Closed
@aldanor

Description

@aldanor

I have a DataFrame that looks like this:

>>> df.dtypes
ask                 float64
bbg                  object
bid                 float64
last                float64
quotetime            object
size                float64
snap                 object
snaptime            float64
tradedate    datetime64[ns]
tradetime            object
sec_type             object
dtype: object

>>> df.shape
(164618, 11)

df.sec_type.head()
0    Equity
1    Equity
2    Equity
3    Equity
4    Equity
Name: sec_type, dtype: object

Now, this segfaults:

>>> df.sec_type.iloc[0] = np.nan
fish: Job 1, 'ipython --pdb' terminated by signal SIGSEGV (Address boundary error)

This also segfaults, but not right away:

>>> df.sec_type.iloc[0] = None
>>> df.iloc[:10]
fish: Job 1, 'ipython --pdb' terminated by signal SIGSEGV (Address boundary error)

And this:

>>> df.sec_type.ix[0] = np.nan
>>> df.sec_type.head()
fish: Job 1, 'ipython --pdb' terminated by signal SIGSEGV (Address boundary error)

However this doesn't:

s = df.sec_type.copy()
s.iloc[0] = np.nan

I tried recreating the error with a minimal case but couldn't since small trivial examples don't seem to segfault; debugging is also kinda hard cause it goes deep into pandas guts..

This happened right after I updated to 0.13, never happened before.

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions