BUG: SEGFAULT when assigning nan via iloc · Issue #6056 · pandas-dev/pandas (original) (raw)
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?